restore shell wp-content/blogs.php & add deprecated warnings, props nacin, see #11742
git-svn-id: http://svn.automattic.com/wordpress/trunk@12977 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e55a20f862
commit
f3cae9b9d9
|
@ -0,0 +1,17 @@
|
||||||
|
<?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' );
|
||||||
|
/* l10n is not loaded on SHORTINIT */
|
||||||
|
_deprecated_file( basename( __FILE__ ), '3.0', null, sprintf( 'Change your rewrite rules to use <code>%1$s</code> instead of <code>%2$s</code>.', 'wp-includes/ms-files.php', 'wp-content/blogs.php' ) );
|
||||||
|
|
||||||
|
/** Load Multisite upload handler. */
|
||||||
|
require_once( ABSPATH . WPINC . '/ms-files.php' );
|
||||||
|
|
||||||
|
?>
|
|
@ -3071,24 +3071,26 @@ function _deprecated_function( $function, $version, $replacement=null ) {
|
||||||
* @access private
|
* @access private
|
||||||
*
|
*
|
||||||
* @uses do_action() Calls 'deprecated_file_included' and passes the file name, what to use instead,
|
* @uses do_action() Calls 'deprecated_file_included' and passes the file name, what to use instead,
|
||||||
* and the version in which the file was deprecated.
|
* the version in which the file was deprecated, and any message regarding the change.
|
||||||
* @uses apply_filters() Calls 'deprecated_file_trigger_error' and expects boolean value of true to do
|
* @uses apply_filters() Calls 'deprecated_file_trigger_error' and expects boolean value of true to do
|
||||||
* trigger or false to not trigger error.
|
* trigger or false to not trigger error.
|
||||||
*
|
*
|
||||||
* @param string $file The file that was included
|
* @param string $file The file that was included
|
||||||
* @param string $version The version of WordPress that deprecated the file
|
* @param string $version The version of WordPress that deprecated the file
|
||||||
* @param string $replacement Optional. The file that should have been included based on ABSPATH
|
* @param string $replacement Optional. The file that should have been included based on ABSPATH
|
||||||
|
* @param string $message Optional. A message regarding the change
|
||||||
*/
|
*/
|
||||||
function _deprecated_file( $file, $version, $replacement = null ) {
|
function _deprecated_file( $file, $version, $replacement = null, $message = '' ) {
|
||||||
|
|
||||||
do_action( 'deprecated_file_included', $file, $replacement, $version );
|
do_action( 'deprecated_file_included', $file, $replacement, $version, $message );
|
||||||
|
|
||||||
// Allow plugin to filter the output error trigger
|
// Allow plugin to filter the output error trigger
|
||||||
if ( WP_DEBUG && apply_filters( 'deprecated_file_trigger_error', true ) ) {
|
if ( WP_DEBUG && apply_filters( 'deprecated_file_trigger_error', true ) ) {
|
||||||
|
$message = empty( $message ) ? '' : ' ' . $message;
|
||||||
if ( ! is_null( $replacement ) )
|
if ( ! is_null( $replacement ) )
|
||||||
trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.'), $file, $version, $replacement ) );
|
trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.'), $file, $version, $replacement ) . $message );
|
||||||
else
|
else
|
||||||
trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.'), $file, $version ) );
|
trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.'), $file, $version ) . $message );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Load mulitsite uploaded media
|
* Multisite upload handler.
|
||||||
*
|
*
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
|
@ -8,8 +8,11 @@
|
||||||
* @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_default_constants( 'ms-files' );
|
ms_default_constants( 'ms-files' );
|
||||||
|
|
||||||
error_reporting(0);
|
error_reporting(0);
|
||||||
|
|
Loading…
Reference in New Issue