user_can_richedit
Filters whether the user can access the visual editor.
Usage
add_filter( 'user_can_richedit', 'wp_kama_user_can_richedit_filter' ); /** * Function for `user_can_richedit` filter-hook. * * @param bool $wp_rich_edit Whether the user can access the visual editor. * * @return bool */ function wp_kama_user_can_richedit_filter( $wp_rich_edit ){ // filter... return $wp_rich_edit; }
- $wp_rich_edit(true|false)
- Whether the user can access the visual editor.
Changelog
Since 2.1.0 | Introduced. |
Where the hook is called
user_can_richedit
wp-includes/general-template.php 3771
return apply_filters( 'user_can_richedit', $wp_rich_edit );