the_password_form_incorrect_password
Filters the invalid password message shown on password-protected posts. The filter is only applied if the post is password protected.
Использование
add_filter( 'the_password_form_incorrect_password', 'wp_kama_the_password_form_incorrect_filter', 10, 2 ); /** * Function for `the_password_form_incorrect_password` filter-hook. * * @param string $text The message shown to users when entering an invalid password. * @param WP_Post $post Post object. * * @return string */ function wp_kama_the_password_form_incorrect_filter( $text, $post ){ // filter... return $text; }
- $text(строка)
- The message shown to users when entering an invalid password.
- $post(WP_Post)
- Post object.
Список изменений
С версии 6.8.0 | Введена. |
Где вызывается хук
the_password_form_incorrect_password
wp-includes/post-template.php 1796
$invalid_password = apply_filters( 'the_password_form_incorrect_password', __( 'Invalid password.' ), $post );