WordPress.org

Make WordPress Core

Ticket #26786: 26786.patch

File 26786.patch, 2.5 KB (added by azaozz, 7 years ago)
  • src/wp-admin/user-edit.php

     
    241241<h3><?php _e('Personal Options'); ?></h3>
    242242
    243243<table class="form-table">
    244 <?php if ( rich_edit_exists() && !( IS_PROFILE_PAGE && !$user_can_edit ) ) : // don't bother showing the option if the editor has been removed ?>
     244<?php if ( ! ( IS_PROFILE_PAGE && ! $user_can_edit ) ) : ?>
    245245        <tr>
    246246                <th scope="row"><?php _e('Visual Editor')?></th>
    247247                <td><label for="rich_editing"><input name="rich_editing" type="checkbox" id="rich_editing" value="false" <?php if ( ! empty( $profileuser->rich_editing ) ) checked( 'false', $profileuser->rich_editing ); ?> /> <?php _e( 'Disable the visual editor when writing' ); ?></label></td>
  • src/wp-includes/deprecated.php

     
    33923392        _deprecated_function( __FUNCTION__, '3.7' );
    33933393        return trim( $t, "\"'\n\r " );
    33943394}
     3395
     3396/**
     3397 * Determine if TinyMCE is available.
     3398 *
     3399 * Checks to see if the user has deleted the tinymce files to slim down their WordPress install.
     3400 *
     3401 * @since 2.1.0
     3402 * @deprecated 3.9.0
     3403 *
     3404 * @return bool Whether TinyMCE exists.
     3405 */
     3406function rich_edit_exists() {
     3407        global $wp_rich_edit_exists;
     3408        _deprecated_function( __FUNCTION__, '3.9' );
     3409
     3410        if ( ! isset( $wp_rich_edit_exists ) )
     3411                $wp_rich_edit_exists = file_exists( ABSPATH . WPINC . '/js/tinymce/tinymce.js' );
     3412
     3413        return $wp_rich_edit_exists;
     3414}
     3415
  • src/wp-includes/general-template.php

     
    17971797}
    17981798
    17991799/**
    1800  * Determine if TinyMCE is available.
    1801  *
    1802  * Checks to see if the user has deleted the tinymce files to slim down there WordPress install.
    1803  *
    1804  * @since 2.1.0
    1805  *
    1806  * @return bool Whether TinyMCE exists.
    1807  */
    1808 function rich_edit_exists() {
    1809         global $wp_rich_edit_exists;
    1810         if ( !isset($wp_rich_edit_exists) )
    1811                 $wp_rich_edit_exists = file_exists(ABSPATH . WPINC . '/js/tinymce/tiny_mce.js');
    1812         return $wp_rich_edit_exists;
    1813 }
    1814 
    1815 /**
    18161800 * Whether the user should have a WYSIWIG editor.
    18171801 *
    18181802 * Checks that the user requires a WYSIWIG editor and that the editor is