COP PDF Attachment Menu

0

Adds a shortcode [pdfmenu] and a widget that defaults to displaying an unordered list of all pdf’s attached to the current page or post. There are options for both altering the query

Version
Last updated
Active installations
WordPress Version
Tested up to
Rating
Total ratings
Tag
This plugin is outdated and might not be supported anymore.

Description

Adds a shortcode [pdfmenu] and a widget that defaults to displaying an unordered list of all pdf’s attached to the current page or post.

There are options for both altering the query to return a different set of attachments and for formatting the output.

This plugin should always default to:

<ul class="cop_pdfmenu">
    <li class="attachment/pdf"><a href="(direct uri to attachment)" target="_blank" title="(attachment title)">(attachment title)</a>
</ul>

The attachments will be ordered by date in the ascending order by default.

Shortcode Options include:

  • Change list types ol, li, div (nested divs).
    • [pdfmenu list_type=”ul”]
    • [pdfmenu list_type=”ol”]
    • [pdfmenu list_type=”div”]
  • Set a different class on the container.
    • [pdfmenu class=”differentclass”]
  • Set a different target.
    • [pdfmenu target=”differenttarget”]
  • Get a list of pdfs from a different parent.
    • [pdfmenu post_parent=”1″]
  • Change the number of pdfs to return. (currently no paging).
    • [pdfmenu numberposts=”-1″] (returns all attachments)
  • Change the post_mime_type to query for a different type or multiple types.
    • [pdfmenu post_mime_type=”application/zip”]
  • Force download of the attachments
    • [pdfmenu dowload=”all”] (force download of all listed attachments)
    • [pdfmenu dowload=”application/pdf”] (force download of a single mime type)

Widget Options include all of the shortcode options and add some selectors for altering the query and output.