write_your_story
Filters the body placeholder text.
Использование
add_filter( 'write_your_story', 'wp_kama_write_your_story_filter', 10, 2 ); /** * Function for `write_your_story` filter-hook. * * @param string $text Placeholder text. * @param WP_Post $post Post object. * * @return string */ function wp_kama_write_your_story_filter( $text, $post ){ // filter... return $text; }
- $text(строка)
- Placeholder text.
По умолчанию: 'Type / to choose a block' - $post(WP_Post)
- Post object.
Список изменений
С версии 5.0.0 | Введена. |
С версии 5.8.0 | Changed the default placeholder text. |
Где вызывается хук
В файле: /wp-admin/edit-form-blocks.php
write_your_story
wp-admin/edit-form-blocks.php 220
$body_placeholder = apply_filters( 'write_your_story', __( 'Type / to choose a block' ), $post );