enter_title_here
Filters the title field placeholder text.
Usage
add_filter( 'enter_title_here', 'wp_kama_enter_title_here_filter', 10, 2 );
/**
* Function for `enter_title_here` filter-hook.
*
* @param string $text Placeholder text.
* @param WP_Post $post Post object.
*
* @return string
*/
function wp_kama_enter_title_here_filter( $text, $post ){
// filter...
return $text;
}
- $text(string)
- Placeholder text.
Default: 'Add title' - $post(WP_Post)
- Post object.
Changelog
| Since 3.1.0 | Introduced. |
Where the hook is called
In file: /wp-admin/edit-form-advanced.php
enter_title_here
wp-admin/edit-form-advanced.php 538
$title_placeholder = apply_filters( 'enter_title_here', __( 'Add title' ), $post );
wp-admin/edit-form-blocks.php 269
'titlePlaceholder' => apply_filters( 'enter_title_here', __( 'Add title' ), $post ),
wp-admin/includes/dashboard.php 598
echo apply_filters( 'enter_title_here', __( 'Title' ), $post );