LoginWP (Formerly Peter’s Login Redirect) 3.0.9.1 has 49 actions and 31 filters, read directly from its source code on Nov 17, 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 LoginWP (Formerly Peter’s Login Redirect) fires an action
add_action( 'upgrader_process_complete', function( $object, $options ) {
// Your code runs here.
}, 10, 2 );
// Change a value LoginWP (Formerly Peter’s Login Redirect) is about to use
add_filter( 'upgrader_clear_destination', function( $removed, $local_destination, $remote_destination, $args ) {
// Change $removed here.
return $removed;
}, 10, 4 );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
-
upgrader_clear_destination
filter/** * Filter whether the upgrader cleared the destination. */ apply_filters( 'upgrader_clear_destination', $removed, $local_destination, $remote_destination, $args['hook_extra'] ); -
upgrader_package_options
filter/** * Filter the package options before running an update. */ apply_filters( 'upgrader_package_options', $options ); -
upgrader_post_install
filter/** * Filter the installation response after the installation has finished. */ apply_filters( 'upgrader_post_install', true, $args['hook_extra'], $this->result ); -
upgrader_pre_download
filter/** * Filters whether to return the package. */ apply_filters( 'upgrader_pre_download', false, $package, $this, $hook_extra ); -
upgrader_pre_install
filter/** * Filter the install response before the installation has started. */ apply_filters( 'upgrader_pre_install', true, $args['hook_extra'] ); -
upgrader_process_complete
action/** * Fire when the upgrader process is complete. */ do_action( 'upgrader_process_complete', $this, $options['hook_extra'] ); -
upgrader_source_selection
filter/** * Filter the source file location for the upgrade package. */ apply_filters( 'upgrader_source_selection', $source, $remote_source, $this, $args['hook_extra'] ); -
wp_cspa_validate_data
action/** * Use add_settings_error() to create/generate an errors * add_settings_error('wp_csa_notice', '', 'an error'); in your validation * function/class method hooked to this action. */ do_action( 'wp_cspa_validate_data', $_POST[$option_name] ); -
loginwp_after_login_redirect
actiondo_action( 'loginwp_after_login_redirect', $requested_redirect_to, $user ); -
rul_before_user
filterapply_filters( 'rul_before_user', false, $redirect_to, $requested_redirect_to, $user ); -
wp_cspa_header
actiondo_action( 'wp_cspa_header', $args, $this->option_name ); -
wp_cspa_main_content_area
filterapply_filters( 'wp_cspa_main_content_area', ob_get_clean(), $this->option_name ); -
add_meta_boxes
actiondo_action( 'add_meta_boxes', 'ptrloginwpredirection', new WP_Post(new stdClass()) ); -
loginwp_admin_hooks
actiondo_action( 'loginwp_admin_hooks' ); -
loginwp_after_settings_page
actiondo_action( 'loginwp_after_settings_page', $option_name ); -
do_action( 'loginwp_after_sub_condition_tbody', $ruleData ); -
loginwp_before_settings_page
actiondo_action( 'loginwp_before_settings_page', $option_name ); -
apply_filters( 'loginwp_is_run_core_rules_before_others', false ); -
apply_filters( 'loginwp_login_redirection_placeholders', [ 'user_id' => esc_html__('User ID of user', 'peters-login-redirect'), 'username' => esc_html__('Username of user', 'peters-login-redirect'), 'user_slug' => esc_html__('Author URL slug or user nicename', 'peters-login-redirect'), 'website_url' => esc_html__('Website URL', 'peters-login-redirect') ] ); -
loginwp_plugin_installed
actiondo_action( 'loginwp_plugin_installed', $package ); -
rul_before_capability
filterapply_filters( 'rul_before_capability', false, $redirect_to, $requested_redirect_to, $user ); -
rul_before_capability_logout
filterapply_filters( 'rul_before_capability_logout', false, $requested_redirect_to, $user ); -
rul_before_fallback
filterapply_filters( 'rul_before_fallback', false, $redirect_to, $requested_redirect_to, $user ); -
rul_before_fallback_logout
filterapply_filters( 'rul_before_fallback_logout', false, $requested_redirect_to, $user ); -
rul_before_role
filterapply_filters( 'rul_before_role', false, $redirect_to, $requested_redirect_to, $user ); -
rul_before_role_logout
filterapply_filters( 'rul_before_role_logout', false, $requested_redirect_to, $user ); -
rul_before_user_logout
filterapply_filters( 'rul_before_user_logout', false, $requested_redirect_to, $user ); -
rul_column_rul_value
filterapply_filters( 'rul_column_rul_value', $value, $item ); -
rul_replace_variable
filterapply_filters( 'rul_replace_variable', false, $variable, $user ); -
rul_rule_conditions
filterapply_filters( 'rul_rule_conditions', [ [ 'id' => 'user', 'category' => self::STANDARD_CATEGORY, 'label' => esc_html__('Username', 'peters-login-redirect'), 'options' => Helpers::username_list(), 'order_support' => false ], [ 'id' => 'role', 'category' => self::STANDARD_CATEGORY, 'label' => esc_html__('User Role', 'peters-login-redirect'), 'options' => Helpers::user_role_list(), 'order_support' => true ], [ 'id' => 'level', 'catego... ); -
apply_filters( 'rul_rule_conditions_categories', [ self::STANDARD_CATEGORY => esc_html__('Standard', 'peters-login-redirect') ] ); -
wp_cspa_after_checkbox_field
actiondo_action( 'wp_cspa_after_checkbox_field', $db_options, $option_name, $key, $args ); -
do_action( 'wp_cspa_after_codemirror_field', $db_options, $option_name, $key, $args ); -
do_action( 'wp_cspa_after_custom_field_block', $db_options, $option_name, $key, $args ); -
do_action( 'wp_cspa_after_email_editor_field', $db_options, $option_name, $key, $args ); -
wp_cspa_after_header
actiondo_action( 'wp_cspa_after_header' ); -
wp_cspa_after_number_field
actiondo_action( 'wp_cspa_after_number_field', $db_options, $option_name, $key, $args ); -
wp_cspa_after_password_field
actiondo_action( 'wp_cspa_after_password_field', $db_options, $option_name, $key, $args ); -
do_action( 'wp_cspa_after_persist_settings', $sanitized_data, $option_name ); -
do_action( 'wp_cspa_after_select_dropdown', $db_options, $option_name, $key, $args ); -
do_action( 'wp_cspa_after_select2_dropdown', $db_options, $option_name, $key, $args ); -
wp_cspa_after_settings_tab
actiondo_action( 'wp_cspa_after_settings_tab', $this->option_name ); -
wp_cspa_after_text_field
actiondo_action( 'wp_cspa_after_text_field', $db_options, $option_name, $key, $args ); -
wp_cspa_after_textarea_field
actiondo_action( 'wp_cspa_after_textarea_field', $db_options, $option_name, $key, $args ); -
do_action( 'wp_cspa_after_wp_editor_field', $db_options, $option_name, $key, $args ); -
do_action( 'wp_cspa_before_checkbox_field', $db_options, $option_name, $key, $args ); -
do_action( 'wp_cspa_before_closing_header' ); -
do_action( 'wp_cspa_before_codemirror_field', $db_options, $option_name, $key, $args ); -
do_action( 'wp_cspa_before_custom_field_block', $db_options, $option_name, $key, $args ); -
do_action( 'wp_cspa_before_email_editor_field', $db_options, $option_name, $key, $args ); -
do_action( 'wp_cspa_before_metabox_holder_column' ); -
wp_cspa_before_number_field
actiondo_action( 'wp_cspa_before_number_field', $db_options, $option_name, $key, $args ); -
do_action( 'wp_cspa_before_password_field', $db_options, $option_name, $key, $args ); -
do_action( 'wp_cspa_before_post_body_content', $this->option_name, $this->db_options ); -
do_action( 'wp_cspa_before_select_dropdown', $db_options, $option_name, $key, $args ); -
do_action( 'wp_cspa_before_select2_dropdown', $db_options, $option_name, $key, $args ); -
do_action( 'wp_cspa_before_settings_page_build', $this->option_name ); -
wp_cspa_before_text_field
actiondo_action( 'wp_cspa_before_text_field', $db_options, $option_name, $key, $args ); -
do_action( 'wp_cspa_before_textarea_field', $db_options, $option_name, $key, $args ); -
do_action( 'wp_cspa_before_wp_editor_field', $db_options, $option_name, $key, $args ); -
apply_filters( 'wp_cspa_disable_default_persistence', false ); -
do_action( 'wp_cspa_field_before_text_field', $id ); -
wp_cspa_form_tag
actiondo_action( 'wp_cspa_form_tag', $this->option_name ); -
apply_filters( 'wp_cspa_main_current_page_url', esc_url_raw($pageURL) ); -
wp_cspa_media_button
actiondo_action( 'wp_cspa_media_button' ); -
wp_cspa_persist_settings
actiondo_action( 'wp_cspa_persist_settings', $sanitized_data, $option_name, $this ); -
wp_cspa_sanitize_callback
filterapply_filters( 'wp_cspa_sanitize_callback', 'self::sanitize_data' ); -
wp_cspa_sanitize_skip
filterapply_filters( 'wp_cspa_sanitize_skip', false, $key, $value ); -
wp_cspa_santized_data
filterapply_filters( 'wp_cspa_santized_data', call_user_func($sanitize_callable, $_POST[$option_name]), $option_name ); -
wp_cspa_scripts
actiondo_action( 'wp_cspa_scripts' ); -
wp_cspa_settings_after_tab
actiondo_action( 'wp_cspa_settings_after_tab' ); -
apply_filters( 'wp_cspa_settings_page_sidebar', '' ); -
wp_cspa_settings_page_tab
filterapply_filters( 'wp_cspa_settings_page_tab', $html ); -
wp_cspa_success_notice
filterapply_filters( 'wp_cspa_success_notice', 'Settings saved.', $this->option_name );
Generated from LoginWP (Formerly Peter’s Login Redirect)'s GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Can't find the right hook?
We can build the customisation for you. Describe what you need: