This wiki is for the exclusive use of my friends and colleagues. Account creation and anonymous editing have been turned off.

If you are a friend or colleague of mine, and would like to participate in this project, please send me a message.

If you find these pages useful, please donate to help cover server costs. Thanks!

D12 MLA Citations Technical Information

From OdleWiki

Plugins Icon.png

d12 MLA Citations Plugin
Easily add MLA style citations to your WordPress pages and posts.


Technical Overview

This plugin adds several shortcodes to a WordPress installation:

  • [mlaworks] and [/mlaworks] wrap the entire works cited section, add the title "Works Cited" at the top, and add a non-printing border.
  • [mlabook] is used to cite a book.
  • [mlamagazine] is used to cite a non-scholarly magazine.
  • [mlajournal] is used to cite an article in a scholarly journal.
  • [note] is used to add a note to a citation.
  • [hly] highlights a portion of text by adding a yellow background. This is useful when you want to call attention to text in a quotation without using italics or bold print.
  • [clear], [clearleft], and [clearright] clear floats around images and other block-level elements.
  • [smalltext] makes the text contained within it 90% smaller than the rest of the text on page. This is useful for footnotes.

Variables

[mlabook], [mlamagazine], and [mlajournal] all use variables to properly format citation information.

[mlabook] Variables

The [mlabook] shortcode uses the following variables:

  • "author" for the author of the book.
  • "title" for the title of the book, which will be italicized automatically.
  • "city" for the city of publication.
  • "publisher" for the publisher.
  • "year" for the year of publication.
  • "medium" for the publication medium. (Either "Print" or "Web".)
  • "addt" for additional information which gets added to the end of the citation.

[mlamagazine] Variables

The [mlamagazine] shortcode uses the following variables:

"author" for the author of the article. "title" for the title of the article, which will be set in double smart quotation marks automatically. "magazine" for the name of the magazine, which will be italicized automatically. "date" for the publication date of the issue. "pages" for the pages the article is on. "medium" for the publication medium. (Either "Print" or "Web".) "addt" for additional information which gets added to the end of the citation.

[mlajournal] Variables

The [mlajournal] shortcode uses the following variables:

"author" for the author of the article. "title" for the title of the article, which will be set in double smart quotation marks automatically. "journal" for the name of the journal, which will be italicized automatically. "volume" for the volume number of the issue. "issue" for the issue number of the issue. "year" for the publication year. "pages" for the pages the article is on. "medium" for the publication medium. (Either "Print" or "Web".) "addt" for additional information which gets added to the end of the citation.

The [note] Shortcode

The [note] shortcode allows you to add a note to a citation. This note will appear on a separate line, and will be indented.

The shortcode [note] must appear on the same line as the shortcode for the citation you are annotating, or WordPress will add an additional paragraph tag, which will throw off the line spacing.

Additional Notes on Variables.

  1. With the exception of italicizing publication titles, and adding quotation marks around article titles, this plugin will not check to see if you entered everything correctly. For example, author names should be in the form last name, comma, first name. If you enter first name last name, the plugin will not correct that.
  2. Punctuation will be added in the correct form. Do not add punctuation to your variables, or it will appear twice in the post.
  3. These variables will pass HTML, so if you want to boldface or italicize something (which may be needed in the "addn" variable), you can.
  4. All variables must be on the same line as the shortcode, as in the examples below. Do not press the enter key after adding each variable.
  5. If an article or book does not have an author, you can omit that variable. The plugin will still punctuate the citation correctly.
  6. If you do not use the "addn" variable, the plugin will properly punctuate the citation and not add an additional space at the end.
  7. However, if you omit any other variable, the resulting citation will be punctuated incorrectly.

Technical Example

The best way to learn how this works is by looking at an example:

[mlaworks]

[mlabook author="Smith, John" title="A History of Balloons" city="New York" publisher="Penguin" year="1988" medium="Print" addt="This is additional <b>information</b> that will hopefully cause this entry to swing down onto the next line so that we can see what a hanging indent looks like here."][note]This is a note about the above book. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel "quam" condimentum, suscipit arcu ut, viverra sem. Maecenas tincidunt, dolor sit amet volutpat tempor, ligula magna suscipit diam, id faucibus nisi tortor id nibh. [/note]

[mlabook author="" title="A History of Balloons" city="New York" publisher="Penguin" year="1988" medium="Print" addt="This entry does not have an author."]

[mlabook author="Smith, John" title="A History of Balloons" city="New York" publisher="Penguin" year="1988" medium="Print"][note]This entry does not have additional information. [/note]

[mlajournal author="Smith, John" title="A Shorter History of Balloons" journal="New Balloon Technologies" volume="42" issue="3" year="2013" pages="41-67" medium="Print"]

[mlamagazine author="Smith, John" title="The Montgolfier Brothers: Pioneers of Ballooning" magazine="Modern Ballooning" date="March, 2013" pages="41-67" medium="Print" addt=" Same entry, but with additional information."]

[/mlaworks]

The above code produces this output:

D12 mla citations example.png