WordPress.org

Make WordPress Core

Ticket #37321: 37321.diff

File 37321.diff, 1.9 KB (added by swissspidy, 4 years ago)
  • src/wp-includes/general-template.php

    diff --git src/wp-includes/general-template.php src/wp-includes/general-template.php
    index cc9178d..fca6bfe 100644
    function wp_dependencies_unique_hosts() { 
    28992899}
    29002900
    29012901/**
    2902  * Whether the user should have a WYSIWIG editor.
     2902 * Whether the user can access the visual editor.
    29032903 *
    2904  * Checks that the user requires a WYSIWIG editor and that the editor is
    2905  * supported in the users browser.
     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
     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.
    29152915 *
    2916  * @return bool
     2916 * @return bool True if the user can access the visual editor, false otherwise.
    29172917 */
    29182918function user_can_richedit() {
    29192919        global $wp_rich_edit, $is_gecko, $is_opera, $is_safari, $is_chrome, $is_IE, $is_edge;
    function user_can_richedit() { 
    29312931        }
    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 );
    29412941}