EG-Attachments 1.2.0

This version 1.2 mainly adds two new features: first we have now the ability to automatically display lists of attachments, without adding shortcode in posts or pages, and an option allows to force the browser behavior, in order to display « Save As » dialog box rather than display attachment itself.

New options

Auto Shortcode

In previous versions, we have two ways to add lists of attachments:

  • add the shortcode to posts or pages,
  • modify templates files.

The option Auto Shortcode allows to add lists of attachments in posts or pages, without adding any shortcode, or without modifying templates. Once the options is activated, lists of attachments are automaticaly added at the end of posts or pages (of course if attachments exist)

Force « Save as » mode

Request from Andrew.
With HTML, links to documents can generate several browser behaviors. If the type of the document is known, the browser displays it directly. If the type is unknown, browser displays a dialog box, to allow users to choose between « Run » and « Save as ».
The option « Force Save as » allows to display the dialog box in all cases.

This option can be set through the administration interface. At this level, this is the default behavior of the shortcode in all posts and pages. But this setting is also available as shortcode option. In this cas, the setting is only for the current shortcode. With these two levels, you can set a default behavior, and then set specific behavior in some posts or pages.

Other option

Request from Ross, the shortcode allows now to select the first or the last attachment of the list. The syntax is simple: [ attachments docid=<first or last>] will display only the first or the last attachment. Be careful, first or last can change according the sort option !

Administration interface

All of these new options are available in the WordPress administration interface, in the Settings / EG-Attachments menu.

EG-Attachments options page
EG-Attachments options page

You can download the plugin in the WordPress Repository.

The documentation is available HERE.