Home Code Reference WordPress Repository Plugins Aviation Quotes

Aviation Quotes

This page exists as a landing page to support the Quotes WordPress plugin. You may find additional information on our blog by searching the quotes Tag: quotes tag.

The aviation quotes database was built to support a need on our FLIGHT website. The database is updated manually and via automated means on a daily basis – so it’s always growing.

The result of this function will render something like this on your website:

““Don't be a show-off. Never be too proud to turn back. There are old pilots and bold pilots, but no old, bold pilots.” -- E. Hamilton Lee, 'Ham' Lee began his career as an instructor during WWI. The statement was made on his retirement from United Air Lines in 1949. 'Ham' Lee did indeed become an old pilot. On his 100th birthday he fly a restored United Airlines DC-3.“

Because we’re retrieving two individual attributes (text and author) from the XML, it’s easy to style the quote in a manner that’s most fitting.

Shortcode Attributes

cache

We cache the quote for one hour by default (3600 seconds). To cache the result for 30 minutes use cache="1800".

sep

By default we’ll use two hyphens between the quote text and the attribution. To alter, use something like sep="::".

tags

If you choose to alter the basic style applied to the attribution text, use tags="em" (in this case outputting the attribution in italics without the < or >) Each tag must be separated by a comma. If there’s no attribution supplied nothing will be displayed.

p

To wrap the quote in paragraph tags, use p="1" (false by default).

Usage

Insert the shortcode of [aviationquote] wherever it is you want your quote to be rendered. Note that the attribution text will only render if it exists.

The first basic example simply outputs a default quote (in paragraph tags). We’ve used [aviationquote p="1"].

“Don't be a show-off. Never be too proud to turn back. There are old pilots and bold pilots, but no old, bold pilots.” -- E. Hamilton Lee, 'Ham' Lee began his career as an instructor during WWI. The statement was made on his retirement from United Air Lines in 1949. 'Ham' Lee did indeed become an old pilot. On his 100th birthday he fly a restored United Airlines DC-3.

In the second example we’ll use bold and italic tags for the attribution (in paragraph). Usage is as follows: [aviationquote p="1" tags="strong,em"].

“Don't be a show-off. Never be too proud to turn back. There are old pilots and bold pilots, but no old, bold pilots.” -- E. Hamilton Lee, 'Ham' Lee began his career as an instructor during WWI. The statement was made on his retirement from United Air Lines in 1949. 'Ham' Lee did indeed become an old pilot. On his 100th birthday he fly a restored United Airlines DC-3.

In the final example we’ll use bold tags for the attribution (in paragraph), and use a single long dash as the separator between the text and attribution. Usage is as follows: [aviationquote p="1" tags="strong" sep="—"].

“Don't be a show-off. Never be too proud to turn back. There are old pilots and bold pilots, but no old, bold pilots.” — E. Hamilton Lee, 'Ham' Lee began his career as an instructor during WWI. The statement was made on his retirement from United Air Lines in 1949. 'Ham' Lee did indeed become an old pilot. On his 100th birthday he fly a restored United Airlines DC-3.

In second and third examples above the quote is wrapped in <blockquote> tags.

Plugin Title: Aviation Quotes
Description: Display an aviation quote in your WordPress website with shortcode.
Download (downloaded 774 times) | Plugin Page