Editor: Improve documentation for `user_can_richedit()`.
Clarifies the various global variables used in the function. Props gma992. Fixes #37321. Built from https://develop.svn.wordpress.org/trunk@38707 git-svn-id: http://core.svn.wordpress.org/trunk@38650 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
555d9f3025
commit
bca93619a5
|
@ -2899,21 +2899,21 @@ function wp_dependencies_unique_hosts() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Whether the user should have a WYSIWIG editor.
|
||||
* Whether the user can access the visual editor.
|
||||
*
|
||||
* Checks that the user requires a WYSIWIG editor and that the editor is
|
||||
* supported in the users browser.
|
||||
* Checks if the user can access the visual editor and that it's supported by the user's browser.
|
||||
*
|
||||
* @since 2.0.0
|
||||
*
|
||||
* @global bool $wp_rich_edit
|
||||
* @global bool $is_gecko
|
||||
* @global bool $is_opera
|
||||
* @global bool $is_safari
|
||||
* @global bool $is_chrome
|
||||
* @global bool $is_IE
|
||||
* @global bool $wp_rich_edit Whether the user can access the visual editor.
|
||||
* @global bool $is_gecko Whether the browser is Gecko-based.
|
||||
* @global bool $is_opera Whether the browser is Opera.
|
||||
* @global bool $is_safari Whether the browser is Safari.
|
||||
* @global bool $is_chrome Whether the browser is Chrome.
|
||||
* @global bool $is_IE Whether the browser is Internet Explorer.
|
||||
* @global bool $is_edge Whether the browser is Microsoft Edge.
|
||||
*
|
||||
* @return bool
|
||||
* @return bool True if the user can access the visual editor, false otherwise.
|
||||
*/
|
||||
function user_can_richedit() {
|
||||
global $wp_rich_edit, $is_gecko, $is_opera, $is_safari, $is_chrome, $is_IE, $is_edge;
|
||||
|
@ -2931,11 +2931,11 @@ function user_can_richedit() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Filters whether the user can access the rich (Visual) editor.
|
||||
* Filters whether the user can access the visual editor.
|
||||
*
|
||||
* @since 2.1.0
|
||||
*
|
||||
* @param bool $wp_rich_edit Whether the user can access to the rich (Visual) editor.
|
||||
* @param bool $wp_rich_edit Whether the user can access the visual editor.
|
||||
*/
|
||||
return apply_filters( 'user_can_richedit', $wp_rich_edit );
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.7-alpha-38706';
|
||||
$wp_version = '4.7-alpha-38707';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue