-
Notifications
You must be signed in to change notification settings - Fork 1
Filters
Filters are a core part of WordPress development that allow plugins to hook onto flows of data, modifying them.
WP-Librarian contains a very limited range of filters as they only started being added around Spring 2015. Filters are slowly being added to appropriate places but please feel free to pester me via email if you want some filters added to particular parts of the plugin.
The two other reasons slowing addition of filters are:
- Adding new filters requires writing up a whole documentation page. I have little free time between uni work as it is to work on coding WP-Librarian so adding/documenting filters eats into that time.
- WP-Librarian is still in Alpha release, so many parts of it are subject to great change. I don't want to waste my time adding and documenting a filter only to then depreciate it a few months later.
For running code at a specific point in execution without returning any value check out .
###Dashboard Filters
These filters modify data pertaining to AJAX requests from the Library Dashboard.
wp_lib_dash_home_buttons
Allows developers to modify the buttons on the Dashboard's homepage. Can be used in conjunction with wp_lib_dash_page_ to add a custom Dash Page with a link to it from the Dash home.
wp_lib_dash_page_content
Allows modification of the content of all or specific Dash pages, including those added by plugins.
wp_lib_dash_page_title
Allows modification of the title of all or specific Dash pages, including those added by plugins. The title is what appears as a header on the Dash page e.g. Managing: Raising Steam
wp_lib_dash_page_tab_title
Allows modification of the tab title of all or specific Dash pages, including those added by plugins. The tab title is what appears in the browse tab e.g. Managing Item #4
wp_lib_script_vars
Allows modification of the the variables passed to Dashboard JavaScript via wp_localize_script.
###Settings Filters
Filters that can modify WP-Librarian's settings page and its registered settings
wp_lib_settings_tabs
Allows developers to modify the tabs on plugin's settings page. The plugin's Dev Kit uses this filter to add its custom settings tab.
wp_lib_plugin_settings
Allows developers to modify WP-Librarian's settings. This could involve changing the default values of a setting or adding settings so that the plugin's settings class (which only accepts settings registered with WP-Librarian) can be used.
###Error Filters
wp_lib_error_codes
Allows developers to modify WP-Librarian's error codes. This could be used to add custom error codes so that wp_lib_error() can be called from within your plugin, among other benefits.
###Deletion Filters
wp_lib_bypass_deletion_checks
Allows developers to skip WP-Librarian's integrity checks for certain posts.
####1. Post Types
Items
Members
Loans
Fines
####2. Taxonomies
Author
Media Type
####3. User Roles
Librarian
Library Admin
####4. Filters
####5. Actions
####6. Releases
6.1 Alpha Releases
Fox Paw
Wolf Tail
Badger Claw
Coyote Snout