SlugPilot 1.9.2 has 4 actions and 17 filters, read directly from its source code on Nov 19, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Run your own code when SlugPilot fires an action
add_action( 'slugpilot_activation', function() {
// Your code runs here.
}, 10, 1 );
// Change a value SlugPilot is about to use
add_filter( 'editable_roles', function( $roles ) {
// Change $roles here.
return $roles;
}, 10, 1 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
/** * Filter the list of editable roles. */ apply_filters( 'editable_roles', wp_roles()->roles ); -
/** * Fires on SlugPilot activation. */ do_action( 'slugpilot_activation' ); -
/** * Filters the array of user ids who will have their user nicenames updated. */ apply_filters( 'slugpilot_auto_update_user_nicename_bulk_user_ids', $users ); -
/** * Filters the auto-update user nicename structure. */ apply_filters( 'slugpilot_auto_update_user_nicename_structure', $structure, $user_id ); -
/** * Filters the return of `slugpilot_can_edit_author_slug()`. */ apply_filters( 'slugpilot_can_edit_author_slug', $retval ); -
/** * Fires on SlugPilot deactivation. */ do_action( 'slugpilot_deactivation' ); -
/** * Filters the array of user nicename structure options. */ apply_filters( 'slugpilot_default_user_nicename_options_list', array( 'username' => __( 'username (Default)', 'slugpilot-author-permalink-control' ), 'nickname' => __( 'nickname', 'slugpilot-author-permalink-control' ), 'displayname' => __( 'displayname', 'slugpilot-author-permalink-control' ), 'firstname' => __( 'firstname', 'slugpilot-author-permalink-control' ), 'lastname' => __( 'lastname', 'slugpilot-author-permalink-control' ), 'firstlast' => __( 'fi... ); -
/** * Filters the return of the `do_auto_update` option. */ apply_filters( 'slugpilot_do_auto_update', slugpilot()->do_auto_update ); -
/** * Filters the return of the `slugpilot_do_bulk_update()`. */ apply_filters( 'slugpilot_do_bulk_update', $retval ); -
/** * Filters the return of the `do_role_based` option. */ apply_filters( 'slugpilot_do_role_based_author_base', slugpilot()->do_role_based ); -
/** * Filters the return of `slugpilot_get_nicename_by_structure`. */ apply_filters( 'slugpilot_get_nicename_by_structure', $nicename, $user_id, $structure ); -
/** * Filters the author role. */ apply_filters( 'slugpilot_get_user_role', $role, $user_id ); -
/** * Filters the return of the `slugpilot_has_front` option. */ apply_filters( 'slugpilot_has_front', $retval ); -
/** * Fires after SlugPilot has been loaded and initialized. */ do_action( 'slugpilot_loaded' ); -
/** * Filters the return of `slugpilot_nicename_exists()`. */ apply_filters( 'slugpilot_nicename_exists', $retval, $nicename, $user_or_id ); -
/** * Filters the auto-updated user nicename before being saved. */ apply_filters( 'slugpilot_pre_auto_update_user_nicename', $nicename, $user_id, $structure ); -
/** * Filters the sanitized user nicename before any final checks are run. */ apply_filters( 'slugpilot_pre_update_user_nicename', $user_nicename, $user->ID, $raw_nicename, $ascii ); -
/** * Filters the return of the `remove_front` option. */ apply_filters( 'slugpilot_remove_front', $reval ); -
/** * Filters the sanitized author base. */ apply_filters( 'slugpilot_sanitize_author_base', $author_base, $original_author_base ); -
/** * Fires when `$POST['action'] = update` on our settings page. */ do_action( 'slugpilot_settings_updated' ); -
/** * Filters the array of user nicename options. */ apply_filters( 'slugpilot_show_user_nicename_options_list', $options, $user );
Generated from SlugPilot's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Done for you
Rather have it built for you?
Tell us what should change and we’ll write and test the code using these hooks.
Custom hook snippet
from $49
A small, update-safe change built on the plugin’s own hooks.
- Code written against the plugin’s actions and filters
- Tested on a staging copy of your site
- Install instructions included
Typical turnaround: 2–3 business days
Choose thisPlugin customisation
from $149
New features or changed behaviour, without editing the plugin’s files.
- Built as a companion plugin, so updates never wipe it
- Exact quote before we start
- Tested on staging, then deployed
Typical turnaround: 3–7 business days
Choose thisNot sure which fits? Describe what you need and we’ll suggest the simplest option.
Can't find the right hook?
We can build the customisation for you. Describe what you need: