-
Notifications
You must be signed in to change notification settings - Fork 6
Action and Filter Hooks
Jo Dickson edited this page Jan 15, 2019
·
2 revisions
The UCF WordPress Theme is designed to be overridable by child themes with pluggable functions and action and filter hooks.
In these docs, when we refer to these hooks, we're referring to the locations within the theme where action and filter functions can be registered. If you're looking for info on functions defined in the theme that are hooked into other action/filter hooks, see our Actions and Filters docs.
Use the wiki's sidebar navigation to view this theme's available action and filter hooks.
Want to hook into an action or filter hook using a child theme? Use either add_action() or add_filter() in your functions.php file:
// Your child theme's functions.php
function my_custom_action_override( $some_var ) {
// do something here...
}
add_action( 'ucfwp_some_action', 'my_custom_action_override', 10, 1 );// Your child theme's functions.php
function my_custom_filter_override( $retval ) {
// Modify $retval somehow here...
return $retval;
}
add_filter( 'ucfwp_some_filter', 'my_custom_filter_override', 10, 1 );See WordPress's documentation on hooks for more detailed information.