##### Admin filters

These filters allow for the extension of the Zenphoto administrator interface.

###### Comment

- `comment_approve`(comment)

  Invoked when an administrator marks a comment.

  Invoked from:

  - admin-comments.php

- `comment_disapprove`(comment)

  Invoked when an administrator marks a comment as SPAM.

  Invoked from:

  - admin-comments.php

- `edit_comment_custom_data`(string, custom_data)

  Allows a plugin to manage custom data for comments. This invocation is for when the comment is presented for editing.

  For example see plugin/comment_form.php

  Invoked from:

  - admin-comments.php

- `options_comments`(string)

  Allows plugins to add options to the comment option tab.

  For example see plugin/comment_form.php

  Invoked from:

  - admin-options.php

- `save_comment_custom_data`(string)

  Allows a plugin to manage custom data for comments. This invocation is for when the comment is saved.

  For example see plugin/comment_form.php

  Invoked from:

  - admin-comments.php

###### Media

- `admin_managed_albums_access`(bool, return)

  This filter allows a plugin to intervene when a request to edit an album is being denied for insufficient permissions.

  For example see plugin/security-logger.php

  Invoked from:

  - admin-albumsort.php
  - admin-dynamic-album.php
  - admin-edit.php
  - admin-httpupload/uploader.php
  - ...

- `edit_album_custom_data`(string, album, prefix)

  Allows a plugin to manage custom data for images. This invocation is for when the image is presented for editing.

  Invoked from:

  - admin-functions.php

- `edit_album_utilities`(string, album, prefix)

  Allows a plugin to place items in the utilities area for albums. This invocation is for when the album is presented for editing.

  For example see plugin/rating.php

  Invoked from:

  - admin-functions.php

- `edit_error`(string)

  Provides an interface for plugins to report errors when processing image or album saves.

  For example see plugin/admin-approval.php

  Invoked from:

  - admin-edit.php

- `edit_image_custom_data`(string, image, currentimage)

  Allows a plugin to manage custom data for images. This invocation is for when the comment is presented for editing.

  Invoked from:

  - admin-edit.php

- `edit_image_utilities`(string, image, currentimage, pagenum, tagsort)

  Allows a plugin to place items in the utilities area for images. This invocation is for when the image is presented for editing.

  For example see plugin/rating.php

  Invoked from:

  - admin-edit.php

- `save_album_custom_data`(custom, prefix)

  Allows a plugin to manage custom data for albums. This invocation is for when the album object is saved.

  Invoked from:

  - admin-functions.php

- `save_album_utilities_data`(album, prefix)

  Allows a plugin to process saves of items in the album Utilities area.

  For example see plugin/admin-approval.php

  Invoked from:

  - admin-functions.php

- `save_image_custom_data`(custom, i)

  Allows a plugin to manage image data for comments. This invocation is for when the comment is saved.

  Invoked from:

  - admin-edit.php

- `save_image_utilities_data`(image, i)

  Allows a plugin to place items in the utilities area for images. This invocation is for when the image is saved.

  For example see plugin/admin-approval.php

  Invoked from:

  - admin-edit.php

###### Miscellaneous

- `admin_XSRF_access`(bool, action)

  Invoked when Zenphoto detects an attempt at Cross Site Reference Forgery.

  For example see plugin/security-logger.php

  Invoked from:

  - admin-functions.php

- `admin_allow_access`(bool, returnurl)

  Allows mitigation of the normal Zenphoto back-end security checks.

  For example see plugin/failed_access_blocker.php

  Invoked from:

  - admin-functions.php

- `admin_general_data`()

  Allows plugins to insert items onto the <general%gt; tab.

  Invoked from:

  - admin-options.php

- `admin_head`(string)

  Allows plugins to place HTML into the <head> region of admin pages.

  For example see plugin/colorbox.php

  Invoked from:

  - admin-functions.php

- `admin_headers`()

  Allows plugins to place HTML into the header region of admin pages.

  Invoked from:

  - admin-functions.php

- `admin_log_actions`(bool, file, action)

  Reports when a log has been deleted, cleared, or downloaded.

  For example see plugin/security-logger.php

  Invoked from:

  - admin-logs.php3 (3)

- `admin_note`(string, string)

  This filter is invoked at the head of each admin page to allow a filter to place a note there.

  For example see plugin/user-expiry.php

  Invoked from:

  - admin-albumsort.php2 (2)
  - admin-comments.php
  - admin-dynamic-album.php
  - admin-edit.php4 (4)
  - ...

- `admin_overview`(string)

  Allows plugins to add items to the Overview page on the back-end.

  For example see plugin/zenphoto_news.php

  Invoked from:

  - admin.php2 (2)

- `admin_tabs`(zenphoto_tabs, _zp_admin_tab)

  Allows plugins to add Tabs to the administrative pages.

  For example see plugin/user-expiry.php

  Invoked from:

  - admin-functions.php

- `admin_utilities_buttons`(buttonlist)

  Allows plugins to add buttons to the admin utilities box on the overview page.

  For example see plugin/search_statistics.php

  Invoked from:

  - admin.php

- `custom_option_save`(string, themename, themealbum)

  Invoked when options are saved to allow processing of the POST of plugin custom options.

  For example see plugin/register_user.php

  Invoked from:

  - admin-options.php

- `save_admin_general_data`(string)

  Allows plugins to insert items onto the <general%gt; tab. This is the "save" interface.

  Invoked from:

  - admin-options.php

- `seoFriendly_js`(defaultjs)

  Allows a plugin to provide a JavaScript function to names that might contain diacritical marks into text that does not.

  For example see plugin/zenphoto_seo.php

  Invoked from:

  - admin-upload.php

###### Zenpage

- `edit_article_custom_data`(string, result)

  Allows a plugin to manage custom data for News articles. This invocation is for when the news article is presented for editing.

  Invoked from:

  - plugin/zenpage/admin-edit.php

- `edit_category_custom_data`(string, result)

  Allows a plugin to manage custom data for Zenpage categories. This invocation is for when the category is presented for editing.

  Invoked from:

  - plugin/zenpage/admin-edit.php

- `edit_page_custom_data`(string, result)

  Allows a plugin to manage custom data for Zenpage pages. This invocation is for when the page object is presented for editing.

  Invoked from:

  - plugin/zenpage/admin-edit.php

- `general_zenpage_utilities`(string, result)

  Allows plugins to add items to the General area of the Zenpage edit pages.

  For example see plugin/tweet_news.php

  Invoked from:

  - plugin/zenpage/admin-edit.php

- `new_article`(string, article)

  Invoked when a new news article is created.

  For example see plugin/admin-approval.php

  Invoked from:

  - plugin/zenpage/zenpage-admin-functions.php

- `new_category`(string, cat)

  Invoked when a new Zenpage category is created.

  For example see plugin/multiple_layouts.php

  Invoked from:

  - plugin/zenpage/zenpage-admin-functions.php

- `new_page`(string, page)

  Invoked when a new Zenpage page is created.

  For example see plugin/admin-approval.php

  Invoked from:

  - plugin/zenpage/zenpage-admin-functions.php

- `publish_article_utilities`(string, result)

  Allows a plugin to process saves of items in the news article Utilities area.

  For example see plugin/multiple_layouts.php

  Invoked from:

  - plugin/zenpage/admin-edit.php

- `publish_category_utilities`(string, result)

  Allows a plugin to process saves of items in the Zenpage category Utilities area.

  For example see plugin/multiple_layouts.php

  Invoked from:

  - plugin/zenpage/admin-edit.php

- `publish_page_utilities`(string, result)

  Allows a plugin to process saves of items in the Zenpage page Utilities area.

  For example see plugin/multiple_layouts.php

  Invoked from:

  - plugin/zenpage/admin-edit.php

- `save_article_custom_data`(custom, article)

  Allows a plugin to manage custom data for news articles. This invocation is for when the article is saved.

  For example see plugin/tweet_news.php

  Invoked from:

  - plugin/zenpage/zenpage-admin-functions.php2 (2)

- `save_category_custom_data`(custom, cat)

  Allows a plugin to manage custom data for Zenpage categories. This invocation is for when the category is saved.

  Invoked from:

  - plugin/zenpage/zenpage-admin-functions.php2 (2)

- `save_page_custom_data`(custom, page)

  Allows a plugin to manage image data for Zenpage page. This invocation is for when the page is saved.

  For example see plugin/tweet_news.php

  Invoked from:

  - plugin/zenpage/zenpage-admin-functions.php2 (2)

- `update_article`(string, article, oldtitlelink)

  Invoked when a news article is updated.

  For example see plugin/admin-approval.php

  Invoked from:

  - plugin/zenpage/zenpage-admin-functions.php

- `update_category`(string, cat, oldtitlelink)

  Invoked when a Zenpage category is updated.

  For example see plugin/multiple_layouts.php

  Invoked from:

  - plugin/zenpage/zenpage-admin-functions.php

- `update_page`(string, page, oldtitlelink)

  Invoked when a Zenpage page is updated.

  For example see plugin/admin-approval.php

  Invoked from:

  - plugin/zenpage/zenpage-admin-functions.php

##### Miscellaneous filters

- `comment_form_data`(string, string)

  Allows a plugin to provide data for the comment form.

  Invoked from:

  - plugin/comment_form.php

- `comment_post`(commentobj, receiver)

  Invoked when a comment has been posted.

  For example see plugin/comment_form.php

  Invoked from:

  - functions.php

- `load_request`(bool)

  Invoked by the front-end when a page is being loaded. The filter may cause the page load to be aborted.

  For example see plugin/seo_locale.php

  Invoked from:

  - functions-controller.php

- `log_setup`(bool, string, string)

  Invoked when `setup` creates the setup log.

  For example see plugin/security-logger.php

  Invoked from:

  - setup/setup-option-defaults.php

- `sendmail`(string, email_list, subject, message, from_mail, from_name, cc_addresses)

  Invoked when Zenphoto attempts to send an e-mail. The plugin is presumed to handle the mailing.

  For example see plugin/zenphoto_sendmail.php

  Invoked from:

  - functions.php2 (2)

- `seoFriendly`(source)

  Invoked to transform names that might contain diacritical marks into text that does not.

  For example see plugin/zenphoto_seo.php

  Invoked from:

  - functions.php

- `setupTheme`(theme)

  Allows a plugin to override the theme that Zenphoto will use to display WEB pages.

  Invoked from:

  - functions.php

- `texteditor_config`(string, string)

  Provides configuration information to the Text Editor plugin (normally TinyMCE).

  For example see plugin/tiny_mce.php

  Invoked from:

  - admin-edit.php
  - admin-options.php
  - admin-plugins.php
  - plugin/zenpage/admin-categories.php

##### Object filters

These filters provide modifications to the behavior of object methods.

###### Media

- `album_filter`(files)

  Allows plugins to remove some folders from the list of album folders that Zenphoto discovers.

  Invoked from:

  - class-album.php

- `album_instantiate`(object)

  Invoked when an album is instantiated.

  For example see plugin/xmpMetadata.php

  Invoked from:

  - class-album.php

- `album_refresh`(album)

  Invoked during garbage collection when album object properties are updated.

  For example see plugin/xmpMetadata.php

  Invoked from:

  - class-gallery.php2 (2)

- `album_rename_move`(this->name, newfolder)

  Invoked when an album is renamed/moved.

  Invoked from:

  - class-album.php2 (2)

- `image_filter`(files)

  Allow a plugin to remove files from the list of images found in an album so that they are not treated as images.

  Invoked from:

  - class-album.php

- `image_instantiate`(image)

  Invoked when an image object in instantiated.

  For example see plugin/xmpMetadata.php

  Invoked from:

  - class-image.php

- `image_metadata`(object)

  Allows a plugin to modify image metadata when a new image is detected or when its metadata is refreshed.

  For example see plugin/xmpMetadata.php

  Invoked from:

  - class-image.php

- `image_refresh`(imageobj)

  Invoked when an image object is refreshed during a garbage collect.

  For example see plugin/quota_manager.php

  Invoked from:

  - class-gallery.php

- `new_album`(object)

  Invoked when a new album is discovered.

  For example see plugin/xmpMetadata.php

  Invoked from:

  - class-album.php

- `new_image`(object)

  Invoked when a new image is discovered.

  For example see plugin/quota_manager.php

  Invoked from:

  - class-image.php
  - plugin/class-textobject/class-textobject_core.php

###### Root_class

- `check_credentials`(bool, object, action)

  Called when an object is requested to verify that the logged on user is allowed to perform the action on the item.

  Invoked from:

  - classes.php

- `copy_object`(bool, object, new_unique_set)

  Invoked when an object"s `copy` method is called.

  For example see plugin/multiple_layouts.php

  Invoked from:

  - classes.php2 (2)

- `move_object`(bool, object, new_unique_set)

  Invoked when an object"s `move` method is called.

  Invoked from:

  - classes.php

- `remove_object`(bool, object)

  Invoked when an object"s `remove` method is called.

  For example see plugin/multiple_layouts.php

  Invoked from:

  - classes.php

- `save_object`(bool, object)

  Invoked when an object"s `save` method is invoked.

  Invoked from:

  - classes.php

- `show_change`(object)

  This filter is invoded whenever the state of the `show` property changes.

  For example see plugin/tweet_news.php

  Invoked from:

  - classes.php

###### Search

- `search_criteria`(result)

  Allows a filter to modify a search.

  Invoked from:

  - class-search.php

- `search_statistics`(searchstring, string, string)

  Allows a plugin to record statistics about searches.

  For example see plugin/search_statistics.php

  Invoked from:

  - class-search.php4 (4)

##### Template filters

These filters modify behavior of the functions that support Zenphoto themes.

- `admin_toolbox_album`(albumname)

  Allows plugins to insert links into the album part of the "admin toolbox".

  Invoked from:

  - template-functions.php

- `admin_toolbox_gallery`()

  Allows plugins to insert links into the gallery part of the "admin toolbox".

  Invoked from:

  - template-functions.php

- `admin_toolbox_global`()

  Allows plugins to insert links into the general part of the "admin toolbox".

  Invoked from:

  - template-functions.php

- `admin_toolbox_image`(albumname, imagename)

  Allows plugins to insert links into the image part of the "admin toolbox".

  For example see plugin/crop_image.php

  Invoked from:

  - template-functions.php

- `admin_toolbox_news`(titlelink)

  Allows plugins to insert links into the news part of the "admin toolbox".

  Invoked from:

  - template-functions.php

- `admin_toolbox_page`(titlelink)

  Allows plugins to insert links into the Zenpage page part of the "admin toolbox".

  Invoked from:

  - template-functions.php

- `admin_toolbox_search`()

  Allows plugins to insert links into the search part of the "admin toolbox".

  Invoked from:

  - template-functions.php

- `checkForGuest`(string)

  Invoked when loading a front-end page. Allows plugins to determine if a visitor has logged on with the correct credentials for accessing the object.

  For example see plugin/zenpage.php

  Invoked from:

  - template-functions.php

- `custom_album_thumb_html`(html)

  Allows plugins to alter the HTML for an album thumbnail reference.

  For example see plugin/flag_thumbnail.php

  Invoked from:

  - template-functions.php

- `custom_image_html`(html, thumbStandin)

  Allows plugins to alter the HTML for an image reference.

  For example see plugin/flag_thumbnail.php

  Invoked from:

  - template-functions.php2 (2)
  - plugin/paged_thumbs_nav.php

- `front-end_edit`(text, object, context, field)

  Invoked when the ajax front end editor processes an edit.

  Invoked from:

  - template-functions.php

- `isMyItemToView`(string)

  Invoked when checking if an object may be viewed by a user.

  For example see plugin/zenpage.php

  Invoked from:

  - template-functions.php

- `standard_album_thumb_html`(html)

  Allows a plugin to modify the HTML used to reference an album thumb.

  For example see plugin/flag_thumbnail.php

  Invoked from:

  - template-functions.php

- `standard_image_html`(html)

  Allows a plugin to modify the HTML used to reference an image.

  For example see plugin/image_effects.php

  Invoked from:

  - template-functions.php

- `standard_image_thumb_html`(html)

  Allows a plugin to modify the HTML used to reference an image thumb.

  For example see plugin/flag_thumbnail.php

  Invoked from:

  - template-functions.php

##### Theme filters

These filters should be called from all themes. They provide a way for the Zenphoto core and for plugins to add HTML content to the theme.

- `theme_body_close`()

  Invoked by all themes just before the </body> HTML tag.

  Invoked from:

  - theme/default/404.php
  - theme/default/album.php
  - theme/default/archive.php
  - theme/default/contact.php
  - ...

- `theme_body_open`()

  Invoked by all themes just before the <body> HTML tag.

  Invoked from:

  - theme/default/404.php
  - theme/default/album.php
  - theme/default/archive.php
  - theme/default/contact.php
  - ...

- `theme_head`()

  Invoked by all themes just before the <head> HTML tag.

  For example see plugin/tag_suggest.php

  Invoked from:

  - theme/default/404.php
  - theme/default/album.php
  - theme/default/archive.php
  - theme/default/contact.php
  - ...

##### Upload filters

- `admin_upload_process`(folder)

  Allows plugins to modify the folder where an upload will place images.

  Invoked from:

  - admin-httpupload/uploader.php

- `check_upload_quota`(string, tempFile)

  Invoked when images are being uploaded. The filter ay return an error indication. If so, the upload is aborted.

  For example see plugin/quota_manager.php

  Invoked from:

  - admin-httpupload/uploader.php

- `get_upload_header_text`(string)

  Allows plugins to modify the header and/or error text for the upload tab.

  For example see plugin/image_upload_limiter.php

  Invoked from:

  - admin-edit.php
  - admin-upload.php

- `get_upload_limit`(maxupload)

  Allows a plugin to override the size limits on image uplaods

  For example see plugin/quota_manager.php

  Invoked from:

  - admin-upload.php

- `upload_filetypes`(types)

  Allows a plugin to modify the file types allowed for an upload.

  For example see plugin/image_upload_limiter.php

  Invoked from:

  - admin-upload.php

- `upload_helper_js`(string)

  Allows a filter to insert JavaScript into the upload tab.

  For example see plugin/image_upload_limiter.php

  Invoked from:

  - admin-upload.php

- `upload_root_ui`(string)

  Allows a plugin to determine if a user may create root level albums.

  Invoked from:

  - admin-upload.php

##### User_management filters

These filters allow the extension of the Zenphoto user object and authentication.

- `admin_alterrights`(local_alterrights, userobj)

  Allows a plugin to control what user properties users are allowed to change.

  For example see plugin/user_groups.php

  Invoked from:

  - admin-users.php

- `admin_login_attempt`(_zp_loggedin, post_user, post_pass)

  Reports Zenphoto logon attempts.

  For example see plugin/failed_access_blocker.php

  Invoked from:

  - lib-auth.php

- `alt_login_handler`(string)

  Allows filters to provide links to alternate logon handlers. This list is presented as a selection list on the logon form as alternates to the Zenphoto provided process.

  For example see plugin/federated_logon.php

  Invoked from:

  - lib-auth.php

- `authorization_cookie`(_zp_loggedin)

  Allows a plugin to override cookie based authorization credentials.

  For example see plugin/show_not_logged-in.php

  Invoked from:

  - auth_zp.php

- `edit_admin_custom_data`(string, userobj, id, background, current, local_alterrights)

  Allows a plugin to manage custom data for users. This invocation is for when the user object is presented for editing.

  For example see plugin/email-newuser.php

  Invoked from:

  - admin-users.php

- `federated_login_attempt`(bool, user)

  Invoked when a user logs on via the Federated_Logon plugin. (As opposed to logging on through the Zenphoto authentication mechanism>)

  For example see plugin/failed_access_blocker.php

  Invoked from:

  - plugin/federated_logon.php

- `guest_login_attempt`(success, post_user, post_pass, authType)

  Invoked when a visitor logs on with a guest password.

  For example see plugin/show_not_logged-in.php

  Invoked from:

  - functions.php

- `register_user_form`(string)

  Allows plugins to add to the register user form.

  For example see plugin/comment_form.php

  Invoked from:

  - plugin/register_user/register_user_form.php

- `register_user_registered`(userobj)

  Invoked when a new user registers.

  For example see plugin/comment_form.php

  Invoked from:

  - plugin/register_user.php

- `register_user_verified`(userobj)

  Invoked when a new user is verified.

  Invoked from:

  - plugin/federated_logon.php

- `save_admin_custom_data`(updated, userobj, i, alter)

  Allows a plugin to manage custom data for Zenphoto users. This invocation is for when the user object is saved.

  For example see plugin/quota_manager.php

  Invoked from:

  - admin-users.php

- `save_user`(string, adminobj, string)

  Invoked when a user object is saved.

  For example see plugin/email-newuser.php

  Invoked from:

  - admin-users.php2 (2)