Remove wp-content/blogs.php and add deprecated warning for MU admins. fixes #11742
git-svn-id: https://develop.svn.wordpress.org/trunk@13514 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
91b033f819
commit
13d3a5bb5b
@ -771,9 +771,8 @@ function stripslashes_from_options( $blog_id ) {
|
|||||||
add_action( 'wpmu_upgrade_site', 'stripslashes_from_options' );
|
add_action( 'wpmu_upgrade_site', 'stripslashes_from_options' );
|
||||||
|
|
||||||
function show_post_thumbnail_warning() {
|
function show_post_thumbnail_warning() {
|
||||||
if ( false == is_super_admin() ) {
|
if ( ! is_super_admin() )
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
$mu_media_buttons = get_site_option( 'mu_media_buttons', array() );
|
$mu_media_buttons = get_site_option( 'mu_media_buttons', array() );
|
||||||
if ( empty($mu_media_buttons[ 'image' ]) && current_theme_supports( 'post-thumbnails' ) ) {
|
if ( empty($mu_media_buttons[ 'image' ]) && current_theme_supports( 'post-thumbnails' ) ) {
|
||||||
echo "<div id='update-nag'>" . sprintf( __( "Warning! The current theme supports post thumbnails. You must enable image uploads on <a href='%s'>the options page</a> for it to work." ), admin_url( 'ms-options.php' ) ) . "</div>";
|
echo "<div id='update-nag'>" . sprintf( __( "Warning! The current theme supports post thumbnails. You must enable image uploads on <a href='%s'>the options page</a> for it to work." ), admin_url( 'ms-options.php' ) ) . "</div>";
|
||||||
@ -781,4 +780,13 @@ function show_post_thumbnail_warning() {
|
|||||||
}
|
}
|
||||||
add_action( 'admin_notices', 'show_post_thumbnail_warning' );
|
add_action( 'admin_notices', 'show_post_thumbnail_warning' );
|
||||||
|
|
||||||
|
function ms_deprecated_blogs_file() {
|
||||||
|
if ( ! is_super_admin() )
|
||||||
|
return;
|
||||||
|
if ( ! file_exists( WP_CONTENT_DIR . '/blogs.php' ) )
|
||||||
|
return;
|
||||||
|
echo '<div id="update-nag">' . sprintf( __( 'The <code>%1$s</code> file is deprecated. Please remove it and update your server rewrite rules to use <code>%2$s</code> instead.' ), 'wp-content/blogs.php', 'wp-includes/ms-files.php' ) . '</div>';
|
||||||
|
}
|
||||||
|
add_action( 'admin_notices', 'ms_deprecated_blogs_file' );
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* Deprecated. Update your .htaccess file to use wp-includes/ms-files.php instead.
|
|
||||||
*
|
|
||||||
* @package WordPress
|
|
||||||
* @subpackage Multisite
|
|
||||||
*/
|
|
||||||
|
|
||||||
define( 'SHORTINIT', true );
|
|
||||||
require_once( dirname( dirname( __FILE__) ) . '/wp-load.php' );
|
|
||||||
|
|
||||||
/** Load Multisite upload handler. */
|
|
||||||
require_once( ABSPATH . WPINC . '/ms-files.php' );
|
|
||||||
|
|
||||||
?>
|
|
@ -8,12 +8,10 @@
|
|||||||
* @subpackage Multisite
|
* @subpackage Multisite
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! defined( 'SHORTINIT' ) ) {
|
define( 'SHORTINIT', true );
|
||||||
define( 'SHORTINIT', true );
|
require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' );
|
||||||
require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' );
|
|
||||||
}
|
|
||||||
|
|
||||||
ms_file_constants( );
|
ms_file_constants();
|
||||||
|
|
||||||
error_reporting( 0 );
|
error_reporting( 0 );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user