banner plugins (772x250) (2)

Actions and Filters for Eazyest Gallery

A passage from the WordPress Plugin API:

Hooks are provided by WordPress to allow your plugin to 'hook into' the rest of WordPress; that is, to call functions in your plugin at specific times, and thereby set your plugin in motion. There are two kinds of hooks:

  1. Actions: Actions are the hooks that the WordPress core launches at specific points during execution, or when specific events occur. Your plugin can specify that one or more of its PHP functions are executed at these points, using the Action API.
  2. Filters: Filters are the hooks that WordPress launches to modify text of various types before adding it to the database or sending it to the browser screen. Your plugin can specify that one or more of its PHP functions is executed to modify specific types of text at these times, using the Filter API.

Eazyest Gallery provides also actions and filters for themes and plugins to 'hook into'. This article is about the API of "Filters" and "Actions", that Eazyest Gallery offers you to interact and change the workings and output.

Actions

This is a list of the action hooks available for use in plugin and theme development for Eazyest Gallery

Actions that Run Always

eazyest_gallery_init
Triggered by the WordPress init action. This fires all the Eazyest Gallery initialization procedures.
eazyest_gallery_ready
After all parts of Eazyest Gallery have initialized. Use this hook if you want to remove Eazyest Gallery filters.

Action Run during Admin Page requests

eazyest_gallery_activation
Runs when an administrator activates Eazyest Gallery in the plugins screen.
eazyest_gallery_collect_folders
Runs when the 'All Folders' screen and the 'Edit Folder' screen is compiled. This triggers the procedure to check for (ftp) uploaded new folders. If you only use WordPress admin to add images, you may disable automatic indexing of folders by removing this action.

 
eazyest_gallery_before_list_items
Runs before the attachments list is inserted in the Edit → Folder screen. It passes the Folder ID (integer) as parameter.
eazyest_gallery_attachment_list_edit
Runs at the end of compiling the 'Content' table cell for an attachment in the attachments in the Edit → Folder screen. It allows you to add output to this cell. It passes the attachment (object WP_Post) as parameter
eazyest-gallery-attachment-field_{$field['name']}
Runs in the Edit → Folder to edit extra fields, if you have enabled them. You can output input elements or other markup to edit a specific extra field. If you have an extra field with the slug 'myfield', add an action like this:

 

This action passes the post ID (integer) as first parameter and the field ( array( 'name' => $slug, 'display' => $title, 'edit' => bool, 'frontend' => bool ) ) as second parameter.

this page as not ready yet. more content will follow shortly

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>