Skip to content

Commit

Permalink
Bootstrap: after r38409 and r38410, revert r38402 which reverted r38399.
Browse files Browse the repository at this point in the history
This fixes the paths in `wp-vendor/` that were including `src`. I want to drop this in so we can find out what else will break.

See #36335.


git-svn-id: https://develop.svn.wordpress.org/trunk@38411 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
staylor committed Aug 27, 2016
1 parent 06b6097 commit 4225e71
Show file tree
Hide file tree
Showing 47 changed files with 39 additions and 384 deletions.
6 changes: 0 additions & 6 deletions src/wp-admin/includes/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
require_once(ABSPATH . 'wp-admin/includes/post.php');

/** WordPress Administration Screen API */
require_once(ABSPATH . 'wp-admin/includes/class-wp-screen.php');
require_once(ABSPATH . 'wp-admin/includes/screen.php');

/** WordPress Taxonomy Administration API */
Expand All @@ -60,8 +59,6 @@
require_once(ABSPATH . 'wp-admin/includes/template.php');

/** WordPress List Table Administration API and base class */
require_once(ABSPATH . 'wp-admin/includes/class-wp-list-table.php');
require_once(ABSPATH . 'wp-admin/includes/class-wp-list-table-compat.php');
require_once(ABSPATH . 'wp-admin/includes/list-table.php');

/** WordPress Theme Administration API */
Expand All @@ -70,9 +67,6 @@
/** WordPress User Administration API */
require_once(ABSPATH . 'wp-admin/includes/user.php');

/** WordPress Site Icon API */
require_once(ABSPATH . 'wp-admin/includes/class-wp-site-icon.php');

/** WordPress Update Administration API */
require_once(ABSPATH . 'wp-admin/includes/update.php');

Expand Down
10 changes: 0 additions & 10 deletions src/wp-admin/includes/ajax-actions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1507,7 +1507,6 @@ function wp_ajax_wp_link_ajax() {

$args['pagenum'] = ! empty( $_POST['page'] ) ? absint( $_POST['page'] ) : 1;

require(ABSPATH . WPINC . '/class-wp-editor.php');
$results = _WP_Editors::wp_link_query( $args );

if ( ! isset( $results ) )
Expand Down Expand Up @@ -3137,7 +3136,6 @@ function wp_ajax_destroy_sessions() {
*/
function wp_ajax_press_this_save_post() {
if ( empty( $GLOBALS['wp_press_this'] ) ) {
include( ABSPATH . 'wp-admin/includes/class-wp-press-this.php' );
$GLOBALS['wp_press_this'] = new WP_Press_This();
}

Expand All @@ -3153,7 +3151,6 @@ function wp_ajax_press_this_save_post() {
*/
function wp_ajax_press_this_add_category() {
if ( empty( $GLOBALS['wp_press_this'] ) ) {
include( ABSPATH . 'wp-admin/includes/class-wp-press-this.php' );
$GLOBALS['wp_press_this'] = new WP_Press_This();
}

Expand Down Expand Up @@ -3183,7 +3180,6 @@ function wp_ajax_crop_image() {

switch ( $context ) {
case 'site-icon':
require_once ABSPATH . '/wp-admin/includes/class-wp-site-icon.php';
$wp_site_icon = new WP_Site_Icon();

// Skip creating a new attachment if the attachment is a Site Icon.
Expand Down Expand Up @@ -3332,7 +3328,6 @@ function wp_ajax_install_theme() {
wp_send_json_error( $status );
}

include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
include_once( ABSPATH . 'wp-admin/includes/theme.php' );

$api = themes_api( 'theme_information', array(
Expand Down Expand Up @@ -3439,8 +3434,6 @@ function wp_ajax_update_theme() {
wp_send_json_error( $status );
}

include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );

$current = get_site_transient( 'update_themes' );
if ( empty( $current ) ) {
wp_update_themes();
Expand Down Expand Up @@ -3590,7 +3583,6 @@ function wp_ajax_install_plugin() {
wp_send_json_error( $status );
}

include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
include_once( ABSPATH . 'wp-admin/includes/plugin-install.php' );

$api = plugins_api( 'plugin_information', array(
Expand Down Expand Up @@ -3698,8 +3690,6 @@ function wp_ajax_update_plugin() {
$status['oldVersion'] = sprintf( __( 'Version %s' ), $plugin_data['Version'] );
}

include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';

wp_update_plugins();

$skin = new WP_Ajax_Upgrader_Skin();
Expand Down
2 changes: 0 additions & 2 deletions src/wp-admin/includes/class-ftp.php
Original file line number Diff line number Diff line change
Expand Up @@ -903,8 +903,6 @@ function PopError(){
$mod_sockets = extension_loaded( 'sockets' );
}

require_once dirname( __FILE__ ) . "/class-ftp-" . ( $mod_sockets ? "sockets" : "pure" ) . ".php";

if ( $mod_sockets ) {
class ftp extends ftp_sockets {}
} else {
Expand Down
4 changes: 0 additions & 4 deletions src/wp-admin/includes/class-wp-filesystem-ftpsockets.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ public function __construct( $opt = '' ) {
$this->method = 'ftpsockets';
$this->errors = new WP_Error();

// Check if possible to use ftp functions.
if ( ! @include_once( ABSPATH . 'wp-admin/includes/class-ftp.php' ) ) {
return;
}
$this->ftp = new ftp();

if ( empty($opt['port']) )
Expand Down
51 changes: 0 additions & 51 deletions src/wp-admin/includes/class-wp-upgrader.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,39 +9,6 @@
* @since 2.8.0
*/

/** WP_Upgrader_Skin class */
require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader-skin.php';

/** Plugin_Upgrader_Skin class */
require_once ABSPATH . 'wp-admin/includes/class-plugin-upgrader-skin.php';

/** Theme_Upgrader_Skin class */
require_once ABSPATH . 'wp-admin/includes/class-theme-upgrader-skin.php';

/** Bulk_Upgrader_Skin class */
require_once ABSPATH . 'wp-admin/includes/class-bulk-upgrader-skin.php';

/** Bulk_Plugin_Upgrader_Skin class */
require_once ABSPATH . 'wp-admin/includes/class-bulk-plugin-upgrader-skin.php';

/** Bulk_Theme_Upgrader_Skin class */
require_once ABSPATH . 'wp-admin/includes/class-bulk-theme-upgrader-skin.php';

/** Plugin_Installer_Skin class */
require_once ABSPATH . 'wp-admin/includes/class-plugin-installer-skin.php';

/** Theme_Installer_Skin class */
require_once ABSPATH . 'wp-admin/includes/class-theme-installer-skin.php';

/** Language_Pack_Upgrader_Skin class */
require_once ABSPATH . 'wp-admin/includes/class-language-pack-upgrader-skin.php';

/** Automatic_Upgrader_Skin class */
require_once ABSPATH . 'wp-admin/includes/class-automatic-upgrader-skin.php';

/** WP_Ajax_Upgrader_Skin class */
require_once ABSPATH . 'wp-admin/includes/class-wp-ajax-upgrader-skin.php';

/**
* Core class used for upgrading/installing a local set of files via
* the Filesystem Abstraction classes from a Zip file.
Expand Down Expand Up @@ -887,21 +854,3 @@ public static function release_lock( $lock_name ) {
}

}

/** Plugin_Upgrader class */
require_once ABSPATH . 'wp-admin/includes/class-plugin-upgrader.php';

/** Theme_Upgrader class */
require_once ABSPATH . 'wp-admin/includes/class-theme-upgrader.php';

/** Language_Pack_Upgrader class */
require_once ABSPATH . 'wp-admin/includes/class-language-pack-upgrader.php';

/** Core_Upgrader class */
require_once ABSPATH . 'wp-admin/includes/class-core-upgrader.php';

/** File_Upload_Upgrader class */
require_once ABSPATH . 'wp-admin/includes/class-file-upload-upgrader.php';

/** WP_Automatic_Updater class */
require_once ABSPATH . 'wp-admin/includes/class-wp-automatic-updater.php';
6 changes: 0 additions & 6 deletions src/wp-admin/includes/deprecated.php
Original file line number Diff line number Diff line change
Expand Up @@ -749,9 +749,6 @@ function wp_tiny_mce( $teeny = false, $settings = false ) {

static $num = 1;

if ( ! class_exists( '_WP_Editors', false ) )
require_once( ABSPATH . WPINC . '/class-wp-editor.php' );

$editor_id = 'content' . $num++;

$set = array(
Expand Down Expand Up @@ -1144,7 +1141,6 @@ function wp_update_core($current, $feedback = '') {
if ( !empty($feedback) )
add_filter('update_feedback', $feedback);

include( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
$upgrader = new Core_Upgrader();
return $upgrader->upgrade($current);

Expand All @@ -1167,7 +1163,6 @@ function wp_update_plugin($plugin, $feedback = '') {
if ( !empty($feedback) )
add_filter('update_feedback', $feedback);

include( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
$upgrader = new Plugin_Upgrader();
return $upgrader->upgrade($plugin);
}
Expand All @@ -1189,7 +1184,6 @@ function wp_update_theme($theme, $feedback = '') {
if ( !empty($feedback) )
add_filter('update_feedback', $feedback);

include( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
$upgrader = new Theme_Upgrader();
return $upgrader->upgrade($theme);
}
Expand Down
29 changes: 20 additions & 9 deletions src/wp-admin/includes/file.php
Original file line number Diff line number Diff line change
Expand Up @@ -737,8 +737,6 @@ function _unzip_file_pclzip($file, $to, $needed_dirs = array()) {

mbstring_binary_safe_encoding();

require_once(ABSPATH . 'wp-admin/includes/class-pclzip.php');

$archive = new PclZip($file);

$archive_files = $archive->extract(PCLZIP_OPT_EXTRACT_AS_STRING);
Expand Down Expand Up @@ -886,14 +884,27 @@ function copy_dir($from, $to, $skip_list = array() ) {
function WP_Filesystem( $args = false, $context = false, $allow_relaxed_file_ownership = false ) {
global $wp_filesystem;

require_once(ABSPATH . 'wp-admin/includes/class-wp-filesystem-base.php');

$method = get_filesystem_method( $args, $context, $allow_relaxed_file_ownership );

if ( ! $method )
return false;

if ( ! class_exists( "WP_Filesystem_$method" ) ) {
$map = array(
'base' => 'WP_Filesystem_Base',
'direct' => 'WP_Filesystem_Direct',
'ftpext' => 'WP_Filesystem_FTPext',
'ftpsockets' => 'WP_Filesystem_ftpsockets',
'ssh2' => 'WP_Filesystem_SSH2',
);

$l = strtolower( $method );
if ( array_key_exists( $l, $map ) ) {
$classname = $map[ $l ];
} else {
$classname = "WP_Filesystem_{$method}";
}

if ( ! class_exists( $classname ) ) {

/**
* Filters the path for a specific filesystem method class file.
Expand All @@ -907,14 +918,14 @@ function WP_Filesystem( $args = false, $context = false, $allow_relaxed_file_own
*/
$abstraction_file = apply_filters( 'filesystem_method_file', ABSPATH . 'wp-admin/includes/class-wp-filesystem-' . $method . '.php', $method );

if ( ! file_exists($abstraction_file) )
if ( ! file_exists( $abstraction_file ) ) {
return;
}

require_once($abstraction_file);
require_once( $abstraction_file );
}
$method = "WP_Filesystem_$method";

$wp_filesystem = new $method($args);
$wp_filesystem = new $classname( $args );

//Define the timeouts for the connections. Only available after the construct is called to allow for per-transport overriding of the default.
if ( ! defined('FS_CONNECT_TIMEOUT') )
Expand Down
3 changes: 0 additions & 3 deletions src/wp-admin/includes/list-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ function _get_list_table( $class, $args = array() ) {
);

if ( isset( $core_classes[ $class ] ) ) {
foreach ( (array) $core_classes[ $class ] as $required )
require_once( ABSPATH . 'wp-admin/includes/class-wp-' . $required . '-list-table.php' );

if ( isset( $args['screen'] ) )
$args['screen'] = convert_to_screen( $args['screen'] );
elseif ( isset( $GLOBALS['hook_suffix'] ) )
Expand Down
6 changes: 0 additions & 6 deletions src/wp-admin/includes/nav-menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@
* @since 3.0.0
*/

/** Walker_Nav_Menu_Edit class */
require_once( ABSPATH . 'wp-admin/includes/class-walker-nav-menu-edit.php' );

/** Walker_Nav_Menu_Checklist class */
require_once( ABSPATH . 'wp-admin/includes/class-walker-nav-menu-checklist.php' );

/**
* Prints the appropriate response to a menu quick search.
*
Expand Down
6 changes: 0 additions & 6 deletions src/wp-admin/includes/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@
* @subpackage Administration
*/

/** Walker_Category_Checklist class */
require_once( ABSPATH . 'wp-admin/includes/class-walker-category-checklist.php' );

/** WP_Internal_Pointers class */
require_once( ABSPATH . 'wp-admin/includes/class-wp-internal-pointers.php' );

//
// Category Checklists
//
Expand Down
2 changes: 0 additions & 2 deletions src/wp-admin/includes/translation-install.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ function wp_download_language_pack( $download ) {
}
$translation = (object) $translation;

require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
$skin = new Automatic_Upgrader_Skin;
$upgrader = new Language_Pack_Upgrader( $skin );
$translation->type = 'core';
Expand All @@ -228,7 +227,6 @@ function wp_can_install_language_pack() {
return false;
}

require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
$skin = new Automatic_Upgrader_Skin;
$upgrader = new Language_Pack_Upgrader( $skin );
$upgrader->init();
Expand Down
2 changes: 0 additions & 2 deletions src/wp-admin/includes/update.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ function find_core_auto_update() {
if ( ! $updates || empty( $updates->updates ) )
return false;

include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );

$auto_update = false;
$upgrader = new WP_Automatic_Updater;
foreach ( $updates->updates as $update ) {
Expand Down
3 changes: 0 additions & 3 deletions src/wp-admin/install.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@
/** Load WordPress Translation Install API */
require_once( ABSPATH . 'wp-admin/includes/translation-install.php' );

/** Load wpdb */
require_once( ABSPATH . WPINC . '/wp-db.php' );

nocache_headers();

$step = isset( $_GET['step'] ) ? (int) $_GET['step'] : 0;
Expand Down
1 change: 0 additions & 1 deletion src/wp-admin/press-this.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
* @global WP_Press_This $wp_press_this
*/
if ( empty( $GLOBALS['wp_press_this'] ) ) {
include( ABSPATH . 'wp-admin/includes/class-wp-press-this.php' );
$GLOBALS['wp_press_this'] = new WP_Press_This();
}

Expand Down
5 changes: 0 additions & 5 deletions src/wp-admin/update-core.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ function core_upgrade_preamble() {
_e('You have the latest version of WordPress.');

if ( wp_http_supports( array( 'ssl' ) ) ) {
require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
$upgrader = new WP_Automatic_Updater;
$future_minor_update = (object) array(
'current' => $wp_version . '.1.next.minor',
Expand All @@ -187,7 +186,6 @@ function core_upgrade_preamble() {
}

if ( isset( $updates[0] ) && $updates[0]->response == 'development' ) {
require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
$upgrader = new WP_Automatic_Updater;
if ( wp_http_supports( 'ssl' ) && $upgrader->should_update( 'core', $updates[0], ABSPATH ) ) {
echo '<div class="updated inline"><p>';
Expand Down Expand Up @@ -438,8 +436,6 @@ function list_translation_updates() {
function do_core_upgrade( $reinstall = false ) {
global $wp_filesystem;

include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );

if ( $reinstall )
$url = 'update-core.php?action=do-core-reinstall';
else
Expand Down Expand Up @@ -710,7 +706,6 @@ function do_undismiss_core_update() {
check_admin_referer( 'upgrade-translations' );

require_once( ABSPATH . 'wp-admin/admin-header.php' );
include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );

$url = 'update-core.php?action=do-translation-upgrade';
$nonce = 'upgrade-translations';
Expand Down
4 changes: 0 additions & 4 deletions src/wp-admin/update.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
/** WordPress Administration Bootstrap */
require_once( dirname( __FILE__ ) . '/admin.php' );

include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );

if ( isset($_GET['action']) ) {
$plugin = isset($_REQUEST['plugin']) ? trim($_REQUEST['plugin']) : '';
$theme = isset($_REQUEST['theme']) ? urldecode($_REQUEST['theme']) : '';
Expand Down Expand Up @@ -218,8 +216,6 @@
if ( ! current_user_can('install_themes') )
wp_die( __( 'Sorry, you are not allowed to install themes on this site.' ) );

include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' ); //for themes_api..

check_admin_referer( 'install-theme_' . $theme );
$api = themes_api('theme_information', array('slug' => $theme, 'fields' => array('sections' => false, 'tags' => false) ) ); //Save on a bit of bandwidth.

Expand Down
Loading

0 comments on commit 4225e71

Please sign in to comment.