Filter hook 'user_can_richedit'

in WP Core File wp-includes/general-template.php at line 3916

View Source

user_can_richedit

Filter Hook
Description
Filters whether the user can access the visual editor.

Hook Information

File Location wp-includes/general-template.php View on GitHub
Hook Type Filter
Line Number 3916

Hook Parameters

Type Name Description
bool $wp_rich_edit Whether the user can access the visual editor.

Usage Examples

Basic Usage
<?php
// Hook into user_can_richedit
add_filter('user_can_richedit', 'my_custom_filter', 10, 1);

function my_custom_filter($wp_rich_edit) {
    // Your custom filtering logic here
    return $wp_rich_edit;
}

Source Code Context

wp-includes/general-template.php:3916 - How this hook is used in WordPress core
<?php
3911  	 *
3912  	 * @since 2.1.0
3913  	 *
3914  	 * @param bool $wp_rich_edit Whether the user can access the visual editor.
3915  	 */
3916  	return apply_filters( 'user_can_richedit', $wp_rich_edit );
3917  }
3918  
3919  /**
3920   * Finds out which editor should be displayed by default.
3921   *

PHP Documentation

<?php
/**
	 * Filters whether the user can access the visual editor.
	 *
	 * @since 2.1.0
	 *
	 * @param bool $wp_rich_edit Whether the user can access the visual editor.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-includes/general-template.php
Related Hooks

Related hooks will be displayed here in future updates.