WordPress.org

Plugin Directory

Media Library Assistant

Enhances the Media Library; powerful [mla_gallery], taxonomy support, IPTC/EXIF/PDF processing, bulk/quick edit actions and where-used reporting.

How can I sort the Media/Assistant submenu table on values such as File Size?

You can add support for many attachment metadata values such as file size by visiting the Custom Fields tab on the Settings page. There you can define a rule that maps the data to a WordPress custom field and check the "MLA Column" box to make that field a sortable column in the Media/Assistant submenu table. You can also use the field in your [mla_gallery] shortcodes. For example, this shortcode displays a gallery of the ten largest images in the "general" category, with a custom caption:

[mla_gallery category="general" mla_caption="{+caption+}<br>{+custom:File Size+}" meta_key="File Size" orderby="meta_value" order="DESC" numberposts=10]

How can I use Categories, Tags and custom taxonomies to select images for display in my posts and pages?

The powerful [mla_gallery] shortcode supports almost all of the query flexibility provided by the WP_Query class. You can find complete documentation in the Settings/Media Library Assistant Documentation tab. A simple example is in the preceding question. Here's an example that displays PDF documents with Att. Category "fauna" or Att. Tag "animal":

[mla_gallery post_mime_type="application/pdf" size=icon mla_caption="{+title+}" tax_query="array(array('taxonomy'=>'attachment_category','field'=>'slug','terms'=>'fauna'),array('taxonomy'=>'attachment_tag','field'=>'slug','terms'=>'animal'),'relation'=>'OR')"]

Can I use [mla_gallery] for attachments other than images?

Yes! The [mla_gallery] shortcode supports all MIME types when you add the post_mime_type parameter to your query. You can build a gallery of your PDF documents, plain text files and other attachments. You can mix images and other MIME types in the same gallery, too. Here's an example that displays a gallery of PDF documents, using the Google File Viewer to show the first page of each document as a thumbnail:

[mla_gallery post_mime_type=application/pdf post_parent=all link=file mla_viewer=true columns=1 orderby=date order=desc]

Can I attach an image to more than one post or page?

No; that's a structural limitation of the WordPress database. However, you can use Categories, Tags and custom taxonomies to organize your images and associate them with posts and pages in any way you like. The [mla_gallery] shortcode makes it easy. You can also use the ids= parameter to compose a gallery from a list of specific images.

Can the Assistant use the standard WordPress post Categories and Tags?

Yes! You can activate or deactivate support for Categories and Tags at any time by visiting the Media Library Assistant Settings page.

Do I have to use the WordPress post Categories and Tags?

No! The Assistant supplies pre-defined Att. Categories and Att. Tags; these are WordPress custom taxonomies, with all of the API support that implies. You can activate or deactivate the pre-defined taxonomies at any time by visiting the Media Library Assistant Settings page.

Can I add my own custom taxonomies to the Assistant?

Yes. Any custom taxonomy you register with the Attachment post type will appear in the Assistant UI. Use the Media Library Assistant Settings page to add support for your taxonomies to the Assistant UI.

Can I use Jetpack Tiled Gallery or a lightbox plugin to display my gallery?

You can use other gallery-generating shortcodes to give you the data selection power of [mla_gallery] and the formatting/display power of popular alternatives such as the WordPress.com Jetpack Carousel and Tiled Galleries modules. Any shortcode that accepts "ids=" or a similar parameter listing the attachment ID values for the gallery can be used. Here's an example of a Jetpack Tiled gallery for everything except vegetables:

[mla_gallery attachment_category=vegetable tax_operator="NOT IN" mla_alt_shortcode=gallery type="rectangular"]

Most lightbox plugins use HTML class= and/or rel= tags to activate their features. [mla_gallery] lets you add this tag information to your gallery output. Here's an example that opens PDF documents in a shadowbox using Easy Fancybox:

[mla_gallery post_mime_type=application/pdf post_parent=all link=file size=icon mla_caption='<a class="fancybox-iframe fancybox-pdf" href={+filelink_url+} target=_blank>{+title+}</a>' mla_link_attributes='class="fancybox-pdf fancybox-iframe"']

In the example, the mla_caption= parameter turns the document title into a link to the shadowbox display so you can click on the thumbnail image or the caption to activate the display.

Why don't the "Posts" counts in the taxonomy edit screens match the search results when you click on them?

This is a known WordPress problem with multiple support tickets already in Trac, e.g., Ticket #20708(closed defect (bug): duplicate) Wrong posts count in taxonomy table, Ticket #14084(assigned defect (bug)) Custom taxonomy count includes draft & trashed posts, and Ticket #14076(closed defect (bug): duplicate) Misleading post count on taxonomy screen.

For example, if you add Tags support to the Assistant and then assign tag values to your attachments, the "Posts" column in the "Tags" edit screen under the Posts admin section includes attachments in the count. If you click on the number in that column, only posts and pages are displayed. There are similar issues with custom post types and taxonomies (whether you use the Assistant or not). The "Attachments" column in the edit screens added by the Assistant shows the correct count because it works in a different way.

How do I "unattach" an item?

Hover over the item you want to modify and click the "Edit" or "Quick Edit" action. Set the ID portion of the Parent Info field to zero (0), then click "Update" to record your changes. If you change your mind, click "Cancel" to return to the main page without recording any changes. You can also click the "Select" button to bring up a list of posts//pages and select one to be the new parent for the item. The "Set Parent" link in the Media/Assistant submenu table also supports changing the parent and unattaching an item.

The Media/Assistant submenu seems sluggish; is there anything I can do to make it faster?

Some of the MLA features such as where-used reporting and ALT Text sorting/searching require a lot of database processing. If this is an issue for you, go to the Settings page and adjust the "Where-used database access tuning" settings. For any where-used category you can enable or disable processing. For the "Gallery in" and "MLA Gallery in" you can also choose to update the results on every page load or to cache the results for fifteen minutes between updates. The cache is also flushed automatically when posts, pages or attachments are inserted or updated.

Are other language versions available?

Not yet, but all of the internationalization work in the plugin source code has been completed and there is a Portable Object Template (.POT) available in the "/languages" directory. I don't have working knowledge of anything but English, but if you'd like to volunteer to produce a translation, I would be delighted to work with you to make it happen. Have a look at the "MLA Internationalization Guide.pdf" file in the languages directory and get in touch.

What's in the "phpDocs" directory and do I need it?

All of the MLA source code has been annotated with "DocBlocks", a special type of comment used by phpDocumentor to generate API documentation. If you'd like a deeper understanding of the code, click on "index.html" in the phpDocs directory and have a look. Note that these pages require JavaScript for much of their functionality.

Requires: 3.5.0 or higher
Compatible up to: 4.2.2
Last Updated: 2015-6-17
Active Installs: 20,000+

Ratings

4.7 out of 5 stars

Support

39 of 55 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

1 person says it works.
1 person says it's broken.

0,1,0 100,1,1
100,1,1 100,4,4 100,2,2 100,1,1 100,1,1
100,3,3
100,2,2 100,1,1 100,1,1 100,2,2 100,1,1
0,1,0 100,3,3
50,2,1
100,2,2 50,2,1
100,2,2 100,1,1
100,1,1
100,1,1
100,1,1 100,3,3
100,2,2 0,1,0
100,2,2 100,2,2
100,1,1 100,1,1
100,1,1 100,3,3
100,1,1
100,1,1
100,1,1
100,1,1 50,2,1