From bca93619a55f97aabe934dc9ac290a2d6b5982e8 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Mon, 3 Oct 2016 07:55:27 +0000 Subject: [PATCH] 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 --- wp-includes/general-template.php | 24 ++++++++++++------------ wp-includes/version.php | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php index bd8b7f41a4..e2042298ae 100644 --- a/wp-includes/general-template.php +++ b/wp-includes/general-template.php @@ -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 ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index 78a3861487..f388e30c89 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.