the_password_form хук-фильтрWP 2.7.0

Filters the HTML output for the protected post password form.

If modifying the password field, please note that the core database schema limits the password field to 20 characters regardless of the value of the size attribute in the form input.


add_filter( 'the_password_form', 'wp_kama_the_password_form_filter', 10, 2 );

 * Function for `the_password_form` filter-hook.
 * @param string  $output The password form HTML output.
 * @param WP_Post $post   Post object.
 * @return string
function wp_kama_the_password_form_filter( $output, $post ){

	// filter...
	return $output;
The password form HTML output.
Post object.

Список изменений

С версии 2.7.0 Введена.
С версии 5.8.0 Added the $post parameter.

Где вызывается хук

wp-includes/post-template.php 1765
return apply_filters( 'the_password_form', $output, $post );

Где используется хук в WordPress

Использование не найдено.