FooGallery Actions and Filters

There are 80+ actions and filters to hook into within FooGallery. This means you can basically change or override every way in which FooGallery works and functions.

Check out the growing list of actions and filters that are available.

Actions


foogallery_extension_activated-{EXTENSION_SLUG}
Description Occurs after an extension has been successfully activated
Since 1.1
Class Name FooGallery_Extensions_API
File includes/class-extensions-api.php
foogallery_extension_deactivated-{EXTENSION_SLUG}
Description Occurs after an extension has been successfully deactivated
Since 1.1
Class Name FooGallery_Extensions_API
File includes/class-extensions-api.php
foogallery_foogallery_instance_after_load
Description Occurs after an instance of the FooGallery class has loaded
Since 1.1
Class Name FooGallery
File includes/class-foogallery.php
foogallery_template_lightbox-{LIGHTBOX}
Description Occurs when the gallery template is being output to the frontend, and allows extensions to hook in to include scripts or CSS for a specific lightbox
Since 1.1
Class Name FooGallery_Shortcodes
File includes/public/shortcodes.php
foogallery_zip_generator_post_process
Description Occurs after a boierplate zip has been created
Since 1.1
Class Name FooGallery_Boilerplate_Zip_Generator
File includes/admin/class-boilerplate-download-handler.php

foogallery_located_template
Description Occurs just after the gallery template has been found, but before any template files have been enqueued or included
Since 1.1
Class Name FooGallery_Template_Loader
File includes/public/class-foogallery-template-loader.php
foogallery_located_template-{GALLERY_TEMPLATE}
Description Occurs just after the gallery template has been found, but before any template files have been enqued or included
Since 1.1
Class Name FooGallery_Template_Loader
File includes/public/class-foogallery-template-loader.php
foogallery_loaded_template
Description Occurs after a gallery template has been included
Since 1.1
Class Name FooGallery_Template_Loader
File includes/public/class-foogallery-template-loader.php
foogallery_loaded_template-{GALLERY_TEMPLATE}
Description Occurs after a gallery template has been included
Since 1.1
Class Name FooGallery_Template_Loader
File includes/public/class-foogallery-template-loader.php
foogallery_template_no_attachments-{GALLERY_TEMPLATE}
Description Occurs when a gallery template is being output but there are no attachments in the gallery to output
Since 1.1
Class Name FooGallery_Template_Loader
File includes/public/class-foogallery-template-loader.php
foogallery_located_file
Description Occurs when a gallery template file has been located, before it is included
Since 1.1
Class Name Foo_Plugin_File_Locator_v1
File includes/foopluginbase/classes/class-foo-plugin-file-locator.php
foogallery_not_located_file
Description Occurs when a gallery template file has not been located
Since 1.1
Class Name Foo_Plugin_File_Locator_v1
File includes/foopluginbase/classes/class-foo-plugin-file-locator.php

foogallery_render_gallery_template_field_before
Description Occurs before a gallery template field has been output inside the gallery settings metabox on the gallery edit page in admin
Since 1.1
Class Name FooGallery_Admin_Gallery_MetaBox_Fields
File includes/admin/class-gallery-metabox-fields.php
foogallery_render_gallery_template_field_after
Description Occurs after a gallery template field has been output inside the gallery settings metabox on the gallery edit page in admin
Since 1.1
Class Name FooGallery_Admin_Gallery_MetaBox_Fields
File includes/admin/class-gallery-metabox-fields.php
foogallery_render_gallery_template_field_custom
Description Occurs when a custom field type needs to be output inside the gallery settings metabox on the gallery edit page in admin
Since 1.1
Class Name FooGallery_Admin_Gallery_MetaBox_Fields
File includes/admin/class-gallery-metabox-fields.php
foogallery_after_save_gallery
Description Occurs after a gallery post has been saved in admin
Since 1.1
Class Name FooGallery_Admin_Gallery_MetaBoxes
File includes/admin/class-gallery-metaboxes.php
foogallery_render_gallery_template_field
Description Occurs when a gallery template field needs to be output inside the gallery settings metabox on the gallery edit page in admin
Since 1.1
Class Name FooGallery_Admin_Gallery_MetaBoxes
File includes/admin/class-gallery-metaboxes.php

foogallery_admin_menu_before
Description Occurs before admin menu items are added
Since 1.1
Class Name FooGallery_Admin_Menu
File includes/admin/class-menu.php
foogallery_admin_menu_after
Description Occurs after admin menu items are added
Since 1.1
Class Name FooGallery_Admin_Menu
File includes/admin/class-menu.php
foogallery_admin_help_after_section_one
Description Occurs on the FooGallery admin help page after the first section
Since 1.1
Class Name n/a
File includes/admin/view-help.php
foogallery_admin_help_after_section_two
Description Occurs on the FooGallery admin help page after the second section
Since 1.1
Class Name n/a
File includes/admin/view-help.php
foogallery_admin_help_after_section_three
Description Occurs on the FooGallery admin help page after the third section
Since 1.1
Class Name n/a
File includes/admin/view-help.php

foogallery_admin_init
Description Occurs after the plugin has initialized in admin
Since 1.1
Class Name Foo_Plugin_Base_v2_3
File includes/foopluginbase/classes/class-foo-plugin-base.php
foogallery_init
Description Occurs after the plugin has initialized in frontend
Since 1.1
Class Name Foo_Plugin_Base_v2_3
File includes/foopluginbase/classes/class-foo-plugin-base.php
foogallery_admin_print_scripts
Description Occurs when admin scripts need to be enqueud
Since 1.1
Class Name Foo_Plugin_Base_v2_3
File includes/foopluginbase/classes/class-foo-plugin-base.php
foogallery_admin_print_styles
Description Occurs when admin styles need to be enqueud
Since 1.1
Class Name Foo_Plugin_Base_v2_3
File includes/foopluginbase/classes/class-foo-plugin-base.php
foogallery_admin_settings_render_page
Description Occurs after the admin settings view was included
Since 1.1
Class Name Foo_Plugin_Base_v2_3
File includes/foopluginbase/classes/class-foo-plugin-base.php
foogallery_admin_inline_styles
Description Occurs when you need to render any inline styles (at end of head tag) in admin
Since 1.1
Class Name Foo_Plugin_Base_v2_3
File includes/foopluginbase/classes/class-foo-plugin-base.php
foogallery_inline_styles
Description Occurs when you need to render any inline styles (at end of head tag) in frontend
Since 1.1
Class Name Foo_Plugin_Base_v2_3
File includes/foopluginbase/classes/class-foo-plugin-base.php
foogallery_admin_inline_scripts
Description Render any inline scripts at the bottom of the page just before the closing body tag in admin
Since 1.1
Class Name Foo_Plugin_Base_v2_3
File includes/foopluginbase/classes/class-foo-plugin-base.php
foogallery_inline_scripts
Description Render any inline scripts at the bottom of the page just before the closing body tag in frontend
Since 1.1
Class Name Foo_Plugin_Base_v2_3
File includes/foopluginbase/classes/class-foo-plugin-base.php

foogallery_admin_settings_before_tab
Description Occurs before a settings tab has been added
Since 1.1
Class Name Foo_Plugin_Settings_v2_1
File includes/foopluginbase/classes/class-foo-plugin-settings.php
foogallery_admin_settings_after_tab
Description Occurs after a settings tab has been added
Since 1.1
Class Name Foo_Plugin_Settings_v2_1
File includes/foopluginbase/classes/class-foo-plugin-settings.php
foogallery_admin_settings_before_section
Description Occurs before a settings section is added
Since 1.1
Class Name Foo_Plugin_Settings_v2_1
File includes/foopluginbase/classes/class-foo-plugin-settings.php
foogallery_admin_settings_after_section
Description Occurs after a settings section is added
Since 1.1
Class Name Foo_Plugin_Settings_v2_1
File includes/foopluginbase/classes/class-foo-plugin-settings.php
foogallery_admin_settings_before_setting
Description Occurs before an admin setting is added
Since 1.1
Class Name Foo_Plugin_Settings_v2_1
File includes/foopluginbase/classes/class-foo-plugin-settings.php
foogallery_admin_settings_after_setting
Description Occurs after an admin setting has been added
Since 1.1
Class Name Foo_Plugin_Settings_v2_1
File includes/foopluginbase/classes/class-foo-plugin-settings.php
foogallery_admin_settings_before_render_setting
Description Occurs before a setting is rendered in the admin
Since 1.1
Class Name Foo_Plugin_Settings_v2_1
File includes/foopluginbase/classes/class-foo-plugin-settings.php
foogallery_admin_settings_after_render_setting
Description Occurs after a setting is rendered in the admin
Since 1.1
Class Name Foo_Plugin_Settings_v2_1
File includes/foopluginbase/classes/class-foo-plugin-settings.php
foogallery_admin_settings_custom_type_render_setting
Description Occurs when a custom field type needs to be output inside the admin settings page in the admin
Since 1.1
Class Name Foo_Plugin_Settings_v2_1
File includes/foopluginbase/classes/class-foo-plugin-settings.php
foogallery_admin_settings_buttons
Description Occurs after the admin settings page buttons have been output
Since 1.1
Class Name n/a
File includes/foopluginbase/views/settings.php
foogallery_admin_settings_sidebar
Description Occurs when the admin settings page sidebar needs to be output
Since 1.1
Class Name n/a
File includes/foopluginbase/views/settings.php

Filters


foogallery_available_extensions
Description Allows you to Change the list of available extensions. Helpful when developing a new extension that you want to show up in the extensions store
Since 1.1
Class Name FooGallery_Extensions_API
File includes/class-extensions.api.php
foogallery_extension_activated_message-{EXTENSION_SLUG}
Description Override the message shown when an extension is activated
Since 1.1
Class Name FooGallery_Extensions_API
File includes/class-extensions.api.php
foogallery_extensions_deactivated_message-{EXTENSION_SLUG}
Description Override the message shown when an extension is deactivated
Since 1.1
Class Name FooGallery_Extensions_API
File includes/class-extensions.api.php
foogallery_extensions_download_success-{EXTENSION_SLUG}
Description Override the message shown when an extension is downloaded successfully
Since 1.1
Class Name FooGallery_Extensions_API
File includes/class-extensions.api.php
foogallery_extensions_download_failure-{EXTENSION_SLUG}
Description Override the message shown when an extension cannot be downloaded
Since 1.1
Class Name FooGallery_Extensions_API
File includes/class-extensions.api.php
foogallery_extensions_redirect_url-{EXTENSION_SLUG}
Description Override where the extension will redirect to after a successful activation
Since 1.1
Class Name FooGallery_Admin_Extensions
File includes/admin/class-extensions.php

foogallery_attachment_html_image_attributes
Description Change any html attributes on the img tag when rendering a gallery to the frontend
Since 1.1
Class Name FooGalleryAttachment
File includes/class-foogallery-attachment.php
foogallery_attachment_html_image
Description Change the html of the img tag for a gallery thumb that is rendered to the frontend
Since 1.1
Class Name FooGalleryAttachment
File includes/class-foogallery-attachment.php
foogallery_attachment_html_link_attributes
Description Change any html attributes on the anchor tag when rendering a gallery to the frontend
Since 1.1
Class Name FooGalleryAttachment
File includes/class-foogallery-attachment.php
foogallery_attachment_html_link
Description Change the html of the anchor tag for a gallery thumb that is rendered to the frontend
Since 1.1
Class Name FooGalleryAttachment
File includes/class-foogallery-attachment.php
foogallery_attachment_resize_thumbnail
Description Change the way thumbs are generated. By default this is done using WPThumb
Since 1.1
Class Name FooGalleryAttachment
File includes/class-foogallery-attachment.php

foogallery_gallery_posttype_register_args
Description Override any arguments passed to the register_post_type call for the custom post type foogallery
Since 1.1
Class Name FooGallery_PostTypes
File includes/class-posttypes.php
foogallery_gallery_posttype_update_messages
Description Override any update messages for the foogallery custom post type
Since 1.1
Class Name FooGallery_PostTypes
File includes/class-posttypes.php
foogallery_gallery_posttype_bulk_update_messages
Description Override the bulk update messages for the foogallery custom post type
Since 1.1
Class Name FooGallery_PostTypes
File includes/class-posttypes.php

foogallery_gallery_templates
Description Override the gallery templates available when creating a gallery
Since 1.1
Class Name n/a
File includes/functions.php
foogallery_defaults
Description Overrides default values throughout the plugin
Since 1.1
Class Name n/a
File includes/functions.php
foogallery_gallery_template_setting-{FIELD_KEY}
Description Overrides the default value for a gallery template setting that is used in gallery templates
Since 1.1
Class Name n/a
File includes/functions.php

foogallery_admin_menu_parent_slug
Description Override the parent menu slug for all FooGallery menus. Use this to move the menu in admin
Since 1.1
Class Name n/a
File includes/functions.php
foogallery_admin_menu_labels
Description Override the admin menu labels
Since 1.1
Class Name FooGallery_Admin_Menu
File includes/admin/class-menu.php
foogallery_admin_menu_capability
Description Override the admin menu default capability
Since 1.1
Class Name FooGallery_Admin_Menu
File includes/admin/class-menu.php

foogallery_zip_generator_process_filename
Description Override a filename that is added to the boilerplate zip
Since 1.1
Class Name FooGallery_Boilerplate_Zip_Generator
File includes/admin/class-boierplate-zip-generator.php
foogallery_zip_generator_process_file_contents
Description Override file content that is added to the boilerplate zip
Since 1.1
Class Name FooGallery_Boilerplate_Zip_Generator
File includes/admin/class-boierplate-zip-generator.php

foogallery_Alter_gallery_template_field
Description Alter or Override the arguments for a field in a gallery template
Since 1.1
Class Name FooGallery_Admin_Gallery_MetaBox_Fields
File includes/admin/class-gallery-metabox-fields.php
foogallery_render_gallery_template_field_choices
Description Alter or Override the field choices for a fielf in a gallery template
Since 1.1
Class Name FooGallery_Admin_Gallery_MetaBox_Fields
File includes/admin/class-gallery-metabox-fields.php
foogallery_gallery_template_field_thumb_links
Description Override the list of available thumbnail links
Since 1.1
Class Name FooGallery_Admin_Gallery_MetaBox_Fields
File includes/admin/class-gallery-metabox-fields.php
foogallery_gallery_template_field_lightboxes
Description Override the list of available lightboxes
Since 1.1
Class Name FooGallery_Admin_Gallery_MetaBox_Fields
File includes/admin/class-gallery-metabox-fields.php

foogallery_save_gallery_attachments
Description Override the list array of attachments when saving a foogallery custom post
Since 1.1
Class Name FooGallery_Admin_Gallery_MetaBoxes
File includes/admin/class-gallery-metaboxes.php
foogallery_save_gallery_settings
Description Override the gallery template settings when saving a foogallery custom post
Since 1.1
Class Name FooGallery_Admin_Gallery_MetaBoxes
File includes/admin/class-gallery-metaboxes.php

foogallery_admin_settings
Description Override the tabs, sections and settings that are shown on the admin settings page
Since 1.1
Class Name Foo_Plugin_Base_v2_3
File includes/foopluginbase/classes/class-foo-plugin-base.php
foogallery_admin_has_settings_page
Description define if the plugin has a settings page under the Setting main menu in admin. Default is true
Since 1.1
Class Name Foo_Plugin_Base_v2_3
File includes/foopluginbase/classes/class-foo-plugin-base.php
foogallery_admin_settings_page_summary
Description Override the summary text that is shown on the admin settings page
Since 1.1
Class Name n/a
File includes/foopluginbase/views/settings.php
foogallery_admin_settings_page_title
Description Override the foogallery settings page title in admin
Since 1.1
Class Name Foo_Plugin_Base_v2_3
File includes/foopluginbase/views/settings.php
foogallery_admin_settings_menu_title
Description Override the foogallery settings menu title in admin
Since 1.1
Class Name Foo_Plugin_Base_v2_3
File includes/foopluginbase/views/settings.php
foogallery_admin_plugin_action_links
Description Override the plugin action links that are shown for FooGallery on the admin plugins listing page
Since 1.1
Class Name Foo_Plugin_Base_v2_3
File includes/foopluginbase/views/settings.php

foogallery_locate_file_filename
Description Override a file that is located for auto inclusion for a gallery template
Since 1.1
Class Name Foo_Plugin_File_Locator_v1
File includes/foopluginbase/classes/class-foo-plugin-file-locator.php
foogallery_file_locator_pickup_locations
Description Override the pickup locations that gallery template files
Since 1.1
Class Name Foo_Plugin_File_Locator_v1
File includes/foopluginbase/classes/class-foo-plugin-file-locator.php
foogallery_metabox_sanity
Description define which metaboxes are allowed to be shown for all custom post types within FooGallery
Since 1.1
Class Name Foo_Plugin_Metabox_Sanity_v1
File includes/foopluginbase/classes/class-foo-plugin-metabox-sanity.php
foogallery_metabox_sanity_foogallery
Description define which metaboxes are allowed to be shown on the fooGallery custom post type
Since 1.1
Class Name FooGallery_Admin_Gallery_MetaBoxes
File includes/foopluginbase/classes/class-foo-plugin-metabox-sanity.php

foogallery_default_options
Description Override default options that are stored for foogallery. The options are set via the admin settings page
Since 1.1
Class Name Foo_Plugin_Options_v2_1
File includes/foopluginbase/classes/class-foo-plugin-options.php
foogallery_languages_directory
Description Override where FooGallery stores it's language files for localization
Since 1.1
Class Name Foo_Plugin_TextDomain_v1_0
File includes/foopluginbase/classes/class-foo-plugin-textdomain.php

foogallery_gallery_templates_files
Description Allows extensions to easily add pickup locations for the gallery template loader
Since 1.1
Class Name FooGallery_Template_Loader
File includes/public/class-foogallery-template-loader.php
foogallery_shortcode_atts
Description Override the shortcode attributes for the foogallery shortcode
Since 1.1
Class Name FooGallery_Shortcodes
File includes/public/class-shortcodes.php