Shortcode AddOn enhanced

The most recent release of the Shortcode AddOn has been enhanced to support setting array elements in the pcustom shortcode.

A number of other plugins add custom fields to posts to support their specific functionality. Some of the plugins use arrays rather than multiple simple values. This update allows you to set the array element values in those cases.

For example:

[pcustom name="myarray{name}" value="Wayne"]
[pcustom name="myarray{email}" value="wayne@postieplugin.com"]

This will set the element “name” of myarray to “wayne” and the element “email” of myarray to “wayne@postieplugin.com”

This is the PHP equivalent of:

$myarray['name'] = 'Wayne';
$myarray['email'] = 'wayne@postieplugin.com';

Because WordPress does not allow square brackets (“[” and “]”) in shortcode values Postie uses curly brackets instead.