Deprecate rich_edit_exists(). It doesn't make sense to support deleting the TinyMCE directory when we have auto-updates. Fixes #26786.

Built from https://develop.svn.wordpress.org/trunk@26933


git-svn-id: http://core.svn.wordpress.org/trunk@26814 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2014-01-13 00:00:12 +00:00
parent 9572d2d001
commit 90403aed4b
3 changed files with 22 additions and 17 deletions

View File

@ -241,7 +241,7 @@ if ( ! IS_PROFILE_PAGE ) {
<h3><?php _e('Personal Options'); ?></h3>
<table class="form-table">
<?php if ( rich_edit_exists() && !( IS_PROFILE_PAGE && !$user_can_edit ) ) : // don't bother showing the option if the editor has been removed ?>
<?php if ( ! ( IS_PROFILE_PAGE && ! $user_can_edit ) ) : ?>
<tr>
<th scope="row"><?php _e('Visual Editor')?></th>
<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>

View File

@ -3392,3 +3392,24 @@ function _search_terms_tidy( $t ) {
_deprecated_function( __FUNCTION__, '3.7' );
return trim( $t, "\"'\n\r " );
}
/**
* Determine if TinyMCE is available.
*
* Checks to see if the user has deleted the tinymce files to slim down their WordPress install.
*
* @since 2.1.0
* @deprecated 3.9.0
*
* @return bool Whether TinyMCE exists.
*/
function rich_edit_exists() {
global $wp_rich_edit_exists;
_deprecated_function( __FUNCTION__, '3.9' );
if ( ! isset( $wp_rich_edit_exists ) )
$wp_rich_edit_exists = file_exists( ABSPATH . WPINC . '/js/tinymce/tinymce.js' );
return $wp_rich_edit_exists;
}

View File

@ -1796,22 +1796,6 @@ function wp_no_robots() {
echo "<meta name='robots' content='noindex,follow' />\n";
}
/**
* Determine if TinyMCE is available.
*
* Checks to see if the user has deleted the tinymce files to slim down there WordPress install.
*
* @since 2.1.0
*
* @return bool Whether TinyMCE exists.
*/
function rich_edit_exists() {
global $wp_rich_edit_exists;
if ( !isset($wp_rich_edit_exists) )
$wp_rich_edit_exists = file_exists(ABSPATH . WPINC . '/js/tinymce/tiny_mce.js');
return $wp_rich_edit_exists;
}
/**
* Whether the user should have a WYSIWIG editor.
*