Make WordPress Core


Ignore:
Timestamp:
10/03/2016 07:54:14 AM (8 years ago)
Author:
swissspidy
Message:

Editor: Improve documentation for user_can_richedit().

Clarifies the various global variables used in the function.

Props gma992.
Fixes #37321.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/general-template.php

    r38701 r38707  
    29002900
    29012901/**
    2902  * Whether the user should have a WYSIWIG editor.
    2903  *
    2904  * Checks that the user requires a WYSIWIG editor and that the editor is
    2905  * supported in the users browser.
     2902 * Whether the user can access the visual editor.
     2903 *
     2904 * Checks if the user can access the visual editor and that it's supported by the user's browser.
    29062905 *
    29072906 * @since 2.0.0
    29082907 *
    2909  * @global bool $wp_rich_edit
    2910  * @global bool $is_gecko
    2911  * @global bool $is_opera
    2912  * @global bool $is_safari
    2913  * @global bool $is_chrome
    2914  * @global bool $is_IE
    2915  *
    2916  * @return bool
     2908 * @global bool $wp_rich_edit Whether the user can access the visual editor.
     2909 * @global bool $is_gecko     Whether the browser is Gecko-based.
     2910 * @global bool $is_opera     Whether the browser is Opera.
     2911 * @global bool $is_safari    Whether the browser is Safari.
     2912 * @global bool $is_chrome    Whether the browser is Chrome.
     2913 * @global bool $is_IE        Whether the browser is Internet Explorer.
     2914 * @global bool $is_edge      Whether the browser is Microsoft Edge.
     2915 *
     2916 * @return bool True if the user can access the visual editor, false otherwise.
    29172917 */
    29182918function user_can_richedit() {
     
    29322932
    29332933    /**
    2934      * Filters whether the user can access the rich (Visual) editor.
     2934     * Filters whether the user can access the visual editor.
    29352935     *
    29362936     * @since 2.1.0
    29372937     *
    2938      * @param bool $wp_rich_edit Whether the user can access to the rich (Visual) editor.
     2938     * @param bool $wp_rich_edit Whether the user can access the visual editor.
    29392939     */
    29402940    return apply_filters( 'user_can_richedit', $wp_rich_edit );
Note: See TracChangeset for help on using the changeset viewer.