Zenphoto filters

Filters modify the behavior of existing Zenphoto functions and can be used by any of the plugin types. Examples of filter use are found noted with each filter. Filters are applied to the output of other functions and may make modifications to that output. So, for instance, filter_zenphoto_seo has a filter for the seoFriendlyURL function that changes accented characters into non accented equivalents.

Filters are added to a function (which has filtering support) by using the function zp_register_filter function($hook, $function_name, $priority). $hook is the name of the filter item, $function_name is the function that will be invoked to filter the item, and $priority is the rank of this filter among the list of filters for this item (defaults to plugin's priority as set with $plugin_is_filter). Filters are applied in ascending $priority order.

The registered function will be passed the parameters(with the exception of the filter name string) from the zp_apply_filter() call. The function must always return the initial parameter of the list (if it exists) as this is then passed on to subsequent filters in the chain. This provides a means of filters operating on the changes made by other filters.

You find some example or template filter plugins to build your own here:
http://www.zenphoto.org/category/extensions/example-plugins/

Zenphoto currently provides filter invocation for the following. Function parameters are indicated within the parens: