Password Protected 2.8.6 has 26 actions and 36 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 Password Protected fires an action
add_action( 'password_protected_register_activity_logging', function() {
// Your code runs here.
}, 10, 1 );
// Change a value Password Protected is about to use
add_filter( 'password_protected_allowed_captcha_providers', function( $allowed ) {
// Change $allowed here.
return $allowed;
}, 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 allowed captcha provider slugs before saving. */ apply_filters( 'password_protected_allowed_captcha_providers', $allowed ); -
/** * Filters the cookie name */ apply_filters( 'password_protected_cookie_name', $this->get_site_id() . '_password_protected_auth', $this ); -
/** * Filter extension version used for compatibility checks (tests). */ apply_filters( 'password_protected_extension_compat_version', $version ); -
/** * Fires when activity report login logging should be registered. */ do_action( 'password_protected_register_activity_logging' ); -
apply_filters( 'password_protected_show_banner', true ); -
apply_filters( 'password_protected_auth_cookie_expiration', get_option( 'password_protected_remember_me_lifetime', 14 ) * DAY_IN_SECONDS, $remember ); -
apply_filters( 'password_protected_login_password_title', __( 'Password', 'password-protected' ) ); -
apply_filters( 'password_protected_process_login', false, $password_protected_pwd ); -
apply_filters( 'password_protected_setting_tabs', array() ); -
login_enqueue_scripts
actiondo_action( 'login_enqueue_scripts' ); -
apply_filters( 'password_protected__allowed_ip_ranges', $bool, $ip_addresses, $remote_addr ); -
apply_filters( 'password_protected__sanitize_ip_addresses', $val, $un_sanitized_value ); -
do_action( 'password_protected_above_password_field' ); -
do_action( 'password_protected_activity_notification_content', array( 'total' => $total, 'success' => $success, 'failed' => $failed, 'time' => $time, ) ); -
apply_filters( 'password_protected_activity_report_interval', 7 ); -
do_action( 'password_protected_after_login_form', 'global' ); -
do_action( 'password_protected_after_password_field' ); -
do_action( 'password_protected_all_captchas' ); -
apply_filters( 'password_protected_allow_customize_preview', false ); -
do_action( 'password_protected_auth_cookie_bad_hash', $cookie_elements ); -
do_action( 'password_protected_auth_cookie_expired', $cookie_elements ); -
do_action( 'password_protected_auth_cookie_malformed', $cookie, $scheme ); -
apply_filters( 'password_protected_authenticate_additional', array( 'auth' => false, 'password_id' => 0, ), $requested_password, $this->errors ); -
do_action( 'password_protected_before_login_form' ); -
do_action( 'password_protected_below_password_field', 'global' ); -
password_protected_blog_id
filterapply_filters( 'password_protected_blog_id', $blog_id ); -
apply_filters( 'password_protected_captcha_providers', $captcha_providers ); -
apply_filters( 'password_protected_check_for_throttling', true ); -
apply_filters( 'password_protected_email_headers', $headers ); -
do_action( 'password_protected_enqueue_scripts' ); -
do_action( 'password_protected_failure_login_attempt', 'global', $requested_password, $password_id ); -
password_protected_help_tabs
actiondo_action( 'password_protected_help_tabs', get_current_screen() ); -
password_protected_is_active
filterapply_filters( 'password_protected_is_active', $is_active ); -
apply_filters( 'password_protected_login_button_text', __( 'Log In', 'password-protected' ) ); -
apply_filters( 'password_protected_login_errors', $errors ); -
do_action( 'password_protected_login_head' ); -
apply_filters( 'password_protected_login_headertitle', get_bloginfo( 'name' ) ); -
apply_filters( 'password_protected_login_headerurl', home_url( '/' ) ); -
apply_filters( 'password_protected_login_message', '' ); -
apply_filters( 'password_protected_login_messages', $messages ); -
do_action( 'password_protected_login_messages' ); -
apply_filters( 'password_protected_login_redirect', $redirect_to, $requested_password ); -
apply_filters( 'password_protected_login_redirect_url', $redirect_to_url ); -
password_protected_logout
actiondo_action( 'password_protected_logout' ); -
apply_filters( 'password_protected_options_page_capability', 'manage_options' ); -
apply_filters( 'password_protected_password_status_activation', $error_message ); -
apply_filters( 'password_protected_secure_password_protected_cookie', $secure, $secure ); -
do_action( 'password_protected_setting_delete_cookie', $args['name'] ); -
apply_filters( 'password_protected_setting_get_cookie', null, $args['name'] ); -
do_action( 'password_protected_setting_set_cookie', $args['name'], $args['data'], $args['secure'], $args['expire'] ); -
apply_filters( 'password_protected_show_login', $this->is_active() ); -
password_protected_sidebar
actiondo_action( 'password_protected_sidebar' ); -
apply_filters( 'password_protected_stylesheet_file', 'password-protected-login.css' ); -
do_action( "password_protected_subtab_{$sub_tab}_content", $this->setting_tabs[ $tab ]['sub-tabs'][ $sub_tab ] ); -
do_action( 'password_protected_success_login_attempt', 'global', $requested_password, $password_id ); -
do_action( "password_protected_tab_{$tab}_content", $this->setting_tabs[ $tab ] ); -
apply_filters( 'password_protected_theme_file', $default_theme_file ); -
apply_filters( 'password_protected_throttling_error_messages', true ); -
apply_filters( 'password_protected_verify_recaptcha', $this->errors ); -
password_protected_wp_title
filterapply_filters( 'password_protected_wp_title', get_bloginfo( 'name' ) ); -
text_before_after_login_form
actiondo_action( 'text_before_after_login_form', $pp_get_args );
Generated from Password Protected'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: