Jared Quinn

IT Consulting :: Design :: Events Management

ATEM - Reverse Recurse Meta

Name: atem
Version: 0.1
License: GPL

Provides a method of recursively traversing the ancestorage of a WordPress object to collect the youngest specified object with a particular custom keyword and return it.

Comments, Questions, Queries and Suggestions should all be made as comments on the “Download” page for the version you are currently using. It is recommended that you upgrade to the latest version before reporting any issues.

Possible Uses

This Plugin was designed to specify a value on a parent page and have it apply to all child pages unless it is specifically overwritten. It was intended to be used for an image name, but it’s uses are far further reaching then that.

Installation Instructions

  • Install the plugin by placing it in your wp-content/plugins directory.
  • Activate the plugin in the Plugins section of the WordPress admin panel

Invoking the Plugin

Embedding inside a post/page

The following code can be inserted in to your page where you wish to display the content of the Custom Keyword (Meta):

<!–atem keyword="Custom Keyword"–>

Embedding inside a php template

The following code can be inserted in a template (or other PHP code) to call the plugin:

$o = atem_getmeta(‘Custom Keyword’, true);

The second parameter specifies if ATEM should return a single value instead of an array. Alternatively, if you wish ATEM to directly output its results the following function can be used:

atem_metawrite(‘Custom Keyword’, ‘%s’, ‘Not Specified’);

The second parameter is a string to output where %s is replaced with the value found by ATEM. If no value is found then the third parameter is outputted with no modification.

History

  • Version 0.1
    • Initial Version.

Download