richedit_pre
Устарел с версии 4.3.0. Больше не поддерживается и может быть удален. Рекомендуется заменить этот хук на аналог.
Filters text returned for the rich text editor.
This filter is first evaluated, and the value returned, if an empty string is passed to wp_richedit_pre(). If an empty string is passed, it results in a break tag and line feed.
If a non-empty string is passed, the filter is evaluated on the wp_richedit_pre() return after being formatted.
Использование
add_filter( 'richedit_pre', 'wp_kama_richedit_pre_filter' ); /** * Function for `richedit_pre` filter-hook. * * @param string $output Text for the rich text editor. * * @return string */ function wp_kama_richedit_pre_filter( $output ){ // filter... return $output; }
- $output(строка)
- Text for the rich text editor.
Список изменений
С версии 2.0.0 | Введена. |
Устарела с | 4.3.0 |
Где вызывается хук
richedit_pre
wp-includes/deprecated.php 3586
return apply_filters( 'richedit_pre', '' );
wp-includes/class-wp-editor.php 298
$content = apply_filters_deprecated( 'richedit_pre', array( $content ), '4.3.0', 'format_for_editor' );
wp-includes/deprecated.php 3594
return apply_filters( 'richedit_pre', $output );