write_your_story
Filter HookDescription
Filters the body placeholder text.Hook Information
File Location |
wp-admin/edit-form-blocks.php
View on GitHub
|
Hook Type | Filter |
Line Number | 257 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$text
|
Placeholder text. Default 'Type / to choose a block'. |
WP_Post
|
$post
|
Post object. |
Usage Examples
Basic Usage
<?php
// Hook into write_your_story
add_filter('write_your_story', 'my_custom_filter', 10, 2);
function my_custom_filter($text, $post) {
// Your custom filtering logic here
return $text;
}
Source Code Context
wp-admin/edit-form-blocks.php:257
- How this hook is used in WordPress core
<?php
252 * @since 5.8.0 Changed the default placeholder text.
253 *
254 * @param string $text Placeholder text. Default 'Type / to choose a block'.
255 * @param WP_Post $post Post object.
256 */
257 $body_placeholder = apply_filters( 'write_your_story', __( 'Type / to choose a block' ), $post );
258
259 $editor_settings = array(
260 'availableTemplates' => $available_templates,
261 'disablePostFormats' => ! current_theme_supports( 'post-formats' ),
262 /** This filter is documented in wp-admin/edit-form-advanced.php */
PHP Documentation
<?php
/**
* Filters the body placeholder text.
*
* @since 5.0.0
* @since 5.8.0 Changed the default placeholder text.
*
* @param string $text Placeholder text. Default 'Type / to choose a block'.
* @param WP_Post $post Post object.
*/
Quick Info
- Hook Type: Filter
- Parameters: 2
- File: wp-admin/edit-form-blocks.php
Related Hooks
Related hooks will be displayed here in future updates.