WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/user can richedit

Description

Whether the user should have a WYSIWIG editor.

Checks that the user requires a WYSIWIG editor and that the editor is supported in the user's browser.

Usage

<?php user_can_richedit(); ?>

Parameters

This function does not accept any parameters.

Returns Values

(boolean) 
Whether the user should have a WYSIWIG editor.

Examples

Display an editor if the user can use it:

<?php

if ( user_can_richedit() ) {

    wp_editor( $content, 'mycustomeditor' );

} else {

    echo 'You cannot use the rich editor';
}

?>

Notes

Change Log

Since: 2.0.0

Source File

user_can_richedit() is located in wp-includes/general-template.php

Related

Editor Functions: wp_editor(), the_editor(), wp_default_editor(), user_can_richedit()