Bootstrap: do not go gentle into that good night r38411, r38412, and parts of r38389.

See #36335.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38411 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2016-08-31 16:31:29 +00:00
parent 7e8d7f8a81
commit a3ffebce30
48 changed files with 393 additions and 50 deletions

View File

@ -50,6 +50,7 @@ require_once(ABSPATH . 'wp-admin/includes/plugin.php');
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 */
@ -59,6 +60,8 @@ require_once(ABSPATH . 'wp-admin/includes/taxonomy.php');
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 */
@ -67,6 +70,9 @@ require_once(ABSPATH . 'wp-admin/includes/theme.php');
/** 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');

View File

@ -1495,6 +1495,7 @@ 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 ) )
@ -3115,6 +3116,7 @@ function wp_ajax_destroy_sessions() {
* @since 4.2.0
*/
function wp_ajax_press_this_save_post() {
include( ABSPATH . 'wp-admin/includes/class-wp-press-this.php' );
$wp_press_this = new WP_Press_This();
$wp_press_this->save_post();
}
@ -3125,6 +3127,7 @@ function wp_ajax_press_this_save_post() {
* @since 4.2.0
*/
function wp_ajax_press_this_add_category() {
include( ABSPATH . 'wp-admin/includes/class-wp-press-this.php' );
$wp_press_this = new WP_Press_This();
$wp_press_this->add_category();
}
@ -3152,6 +3155,7 @@ 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.
@ -3300,6 +3304,7 @@ 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(
@ -3406,6 +3411,8 @@ 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();
@ -3555,6 +3562,7 @@ 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(
@ -3662,6 +3670,8 @@ 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();

View File

@ -903,6 +903,8 @@ if ( ! $mod_sockets && function_exists( 'dl' ) && is_callable( 'dl' ) ) {
$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 {

View File

@ -30,6 +30,10 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base {
$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']) )

View File

@ -9,6 +9,39 @@
* @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.
@ -854,3 +887,21 @@ class WP_Upgrader {
}
}
/** 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';

View File

@ -749,6 +749,9 @@ 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(
@ -1141,6 +1144,7 @@ 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);
@ -1163,6 +1167,7 @@ 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);
}
@ -1184,6 +1189,7 @@ 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);
}

View File

@ -737,6 +737,8 @@ 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);
@ -884,27 +886,14 @@ 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;
$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 ) ) {
if ( ! class_exists( "WP_Filesystem_$method" ) ) {
/**
* Filters the path for a specific filesystem method class file.
@ -918,14 +907,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 $classname( $args );
$wp_filesystem = new $method($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') )

View File

@ -40,6 +40,9 @@ 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'] ) )

View File

@ -7,6 +7,12 @@
* @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.
*

View File

@ -8,6 +8,12 @@
* @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
//

View File

@ -202,6 +202,7 @@ 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';
@ -227,6 +228,7 @@ 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();

View File

@ -74,6 +74,8 @@ 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 ) {

View File

@ -41,6 +41,9 @@ require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
/** 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;

View File

@ -24,7 +24,6 @@ $load = array_unique( explode( ',', $load ) );
if ( empty($load) )
exit;
require( ABSPATH . 'wp-vendor/autoload_52.php' );
require( ABSPATH . 'wp-admin/includes/noop.php' );
require( ABSPATH . WPINC . '/script-loader.php' );
require( ABSPATH . WPINC . '/version.php' );

View File

@ -14,7 +14,6 @@ if ( ! defined( 'ABSPATH' ) ) {
define( 'WPINC', 'wp-includes' );
require( ABSPATH . 'wp-vendor/autoload_52.php' );
require( ABSPATH . 'wp-admin/includes/noop.php' );
require( ABSPATH . WPINC . '/script-loader.php' );
require( ABSPATH . WPINC . '/version.php' );

View File

@ -19,5 +19,6 @@ if ( ! current_user_can( 'edit_posts' ) || ! current_user_can( get_post_type_obj
);
}
include( ABSPATH . 'wp-admin/includes/class-wp-press-this.php' );
$wp_press_this = new WP_Press_This();
$wp_press_this->html();

View File

@ -164,6 +164,7 @@ 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',
@ -187,6 +188,7 @@ 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>';
@ -432,6 +434,8 @@ 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
@ -702,6 +706,7 @@ if ( 'upgrade-core' == $action ) {
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';

View File

@ -12,6 +12,8 @@ if ( ! defined( 'IFRAME_REQUEST' ) && isset( $_GET['action'] ) && in_array( $_GE
/** 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']) : '';
@ -216,6 +218,8 @@ if ( isset($_GET['action']) ) {
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.

View File

@ -23,9 +23,11 @@
function _wp_admin_bar_init() {
global $wp_admin_bar;
if ( ! is_admin_bar_showing() ) {
if ( ! is_admin_bar_showing() )
return false;
}
/* Load the admin bar class code ready for instantiation */
require_once( ABSPATH . WPINC . '/class-wp-admin-bar.php' );
/* Instantiate the admin bar */
@ -37,11 +39,11 @@ function _wp_admin_bar_init() {
* @param string $wp_admin_bar_class Admin bar class to use. Default 'WP_Admin_Bar'.
*/
$admin_bar_class = apply_filters( 'wp_admin_bar_class', 'WP_Admin_Bar' );
if ( class_exists( $admin_bar_class ) ) {
if ( class_exists( $admin_bar_class ) )
$wp_admin_bar = new $admin_bar_class;
} else {
else
return false;
}
$wp_admin_bar->initialize();
$wp_admin_bar->add_menus();
@ -292,10 +294,10 @@ function wp_admin_bar_site_menu( $wp_admin_bar ) {
}
if ( is_network_admin() ) {
/* translators: %s: site name */
/* translators: %s: site name */
$blogname = sprintf( __( 'Network Admin: %s' ), esc_html( get_current_site()->site_name ) );
} elseif ( is_user_admin() ) {
/* translators: %s: site name */
/* translators: %s: site name */
$blogname = sprintf( __( 'User Dashboard: %s' ), esc_html( get_current_site()->site_name ) );
}

View File

@ -38,3 +38,23 @@
* @link http://scripts.incutio.com/xmlrpc/ Site/manual
* @license http://www.opensource.org/licenses/bsd-license.php BSD
*/
require_once( ABSPATH . WPINC . '/IXR/class-IXR-server.php' );
require_once( ABSPATH . WPINC . '/IXR/class-IXR-base64.php' );
require_once( ABSPATH . WPINC . '/IXR/class-IXR-client.php' );
require_once( ABSPATH . WPINC . '/IXR/class-IXR-clientmulticall.php' );
require_once( ABSPATH . WPINC . '/IXR/class-IXR-date.php' );
require_once( ABSPATH . WPINC . '/IXR/class-IXR-error.php' );
require_once( ABSPATH . WPINC . '/IXR/class-IXR-introspectionserver.php' );
require_once( ABSPATH . WPINC . '/IXR/class-IXR-message.php' );
require_once( ABSPATH . WPINC . '/IXR/class-IXR-request.php' );
require_once( ABSPATH . WPINC . '/IXR/class-IXR-value.php' );

View File

@ -7,7 +7,7 @@
* @since 2.7.0
*/
if ( ! class_exists( 'Requests', false ) ) {
if ( ! class_exists( 'Requests' ) ) {
require( ABSPATH . WPINC . '/class-requests.php' );
Requests::register_autoloader();

View File

@ -1385,6 +1385,7 @@ class PHPMailer
public function getSMTPInstance()
{
if (!is_object($this->smtp)) {
require_once( 'class-smtp.php' );
$this->smtp = new SMTP;
}
return $this->smtp;

View File

@ -598,3 +598,54 @@ class WP_Customize_Control {
protected function content_template() {}
}
/** WP_Customize_Color_Control class */
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-color-control.php' );
/** WP_Customize_Media_Control class */
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-media-control.php' );
/** WP_Customize_Upload_Control class */
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-upload-control.php' );
/** WP_Customize_Image_Control class */
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-image-control.php' );
/** WP_Customize_Background_Image_Control class */
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-background-image-control.php' );
/** WP_Customize_Cropped_Image_Control class */
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-cropped-image-control.php' );
/** WP_Customize_Site_Icon_Control class */
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-site-icon-control.php' );
/** WP_Customize_Header_Image_Control class */
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-header-image-control.php' );
/** WP_Customize_Theme_Control class */
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-theme-control.php' );
/** WP_Widget_Area_Customize_Control class */
require_once( ABSPATH . WPINC . '/customize/class-wp-widget-area-customize-control.php' );
/** WP_Widget_Form_Customize_Control class */
require_once( ABSPATH . WPINC . '/customize/class-wp-widget-form-customize-control.php' );
/** WP_Customize_Nav_Menu_Control class */
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-control.php' );
/** WP_Customize_Nav_Menu_Item_Control class */
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-item-control.php' );
/** WP_Customize_Nav_Menu_Location_Control class */
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-location-control.php' );
/** WP_Customize_Nav_Menu_Name_Control class */
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-name-control.php' );
/** WP_Customize_Nav_Menu_Auto_Add_Control class */
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-auto-add-control.php' );
/** WP_Customize_New_Menu_Control class */
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-new-menu-control.php' );

View File

@ -205,6 +205,42 @@ final class WP_Customize_Manager {
* @since 3.4.0
*/
public function __construct() {
require_once( ABSPATH . WPINC . '/class-wp-customize-setting.php' );
require_once( ABSPATH . WPINC . '/class-wp-customize-panel.php' );
require_once( ABSPATH . WPINC . '/class-wp-customize-section.php' );
require_once( ABSPATH . WPINC . '/class-wp-customize-control.php' );
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-color-control.php' );
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-media-control.php' );
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-upload-control.php' );
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-image-control.php' );
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-background-image-control.php' );
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-cropped-image-control.php' );
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-site-icon-control.php' );
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-header-image-control.php' );
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-theme-control.php' );
require_once( ABSPATH . WPINC . '/customize/class-wp-widget-area-customize-control.php' );
require_once( ABSPATH . WPINC . '/customize/class-wp-widget-form-customize-control.php' );
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-control.php' );
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-item-control.php' );
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-location-control.php' );
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-name-control.php' );
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-auto-add-control.php' );
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-new-menu-control.php' );
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-nav-menus-panel.php' );
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-themes-section.php' );
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-sidebar-section.php' );
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-section.php' );
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-new-menu-section.php' );
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-filter-setting.php' );
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-header-image-setting.php' );
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-background-image-setting.php' );
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-item-setting.php' );
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-setting.php' );
/**
* Filters the core Customizer components to load.
*
@ -222,13 +258,16 @@ final class WP_Customize_Manager {
*/
$components = apply_filters( 'customize_loaded_components', $this->components, $this );
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-selective-refresh.php' );
$this->selective_refresh = new WP_Customize_Selective_Refresh( $this );
if ( in_array( 'widgets', $components, true ) ) {
require_once( ABSPATH . WPINC . '/class-wp-customize-widgets.php' );
$this->widgets = new WP_Customize_Widgets( $this );
}
if ( in_array( 'nav_menus', $components, true ) ) {
require_once( ABSPATH . WPINC . '/class-wp-customize-nav-menus.php' );
$this->nav_menus = new WP_Customize_Nav_Menus( $this );
}

View File

@ -384,3 +384,6 @@ class WP_Customize_Panel {
<?php
}
}
/** WP_Customize_Nav_Menus_Panel class */
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-nav-menus-panel.php' );

View File

@ -373,3 +373,15 @@ class WP_Customize_Section {
<?php
}
}
/** WP_Customize_Themes_Section class */
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-themes-section.php' );
/** WP_Customize_Sidebar_Section class */
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-sidebar-section.php' );
/** WP_Customize_Nav_Menu_Section class */
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-section.php' );
/** WP_Customize_New_Menu_Section class */
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-new-menu-section.php' );

View File

@ -895,3 +895,18 @@ class WP_Customize_Setting {
return isset( $result );
}
}
/** WP_Customize_Filter_Setting class */
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-filter-setting.php' );
/** WP_Customize_Header_Image_Setting class */
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-header-image-setting.php' );
/** WP_Customize_Background_Image_Setting class */
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-background-image-setting.php' );
/** WP_Customize_Nav_Menu_Item_Setting class */
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-item-setting.php' );
/** WP_Customize_Nav_Menu_Setting class */
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-setting.php' );

View File

@ -2366,6 +2366,9 @@ function generic_ping( $post_id = 0 ) {
* @param int $post_ID Post ID.
*/
function pingback($content, $post_ID) {
include_once( ABSPATH . WPINC . '/class-IXR.php' );
include_once( ABSPATH . WPINC . '/class-wp-http-ixr-client.php' );
// original code by Mort (http://mort.mine.nu:8080)
$post_links = array();
@ -2504,6 +2507,9 @@ function trackback($trackback_url, $title, $excerpt, $ID) {
* @param string $path Path to send the ping.
*/
function weblog_ping($server = '', $path = '') {
include_once( ABSPATH . WPINC . '/class-IXR.php' );
include_once( ABSPATH . WPINC . '/class-wp-http-ixr-client.php' );
// using a timeout of 3 seconds should be enough to cover slow servers
$client = new WP_HTTP_IXR_Client($server, ((!strlen(trim($path)) || ('/' == $path)) ? false : $path));
$client->timeout = 3;

View File

@ -67,6 +67,7 @@ final class WP_Customize_Selective_Refresh {
*/
public function __construct( WP_Customize_Manager $manager ) {
$this->manager = $manager;
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-partial.php' );
add_action( 'customize_preview_init', array( $this, 'init_preview' ) );
}

View File

@ -667,6 +667,11 @@ function fetch_feed( $url ) {
require_once( ABSPATH . WPINC . '/class-simplepie.php' );
}
require_once( ABSPATH . WPINC . '/class-wp-feed-cache.php' );
require_once( ABSPATH . WPINC . '/class-wp-feed-cache-transient.php' );
require_once( ABSPATH . WPINC . '/class-wp-simplepie-file.php' );
require_once( ABSPATH . WPINC . '/class-wp-simplepie-sanitize-kses.php' );
$feed = new SimplePie();
$feed->set_sanitize_class( 'WP_SimplePie_Sanitize_KSES' );

View File

@ -563,6 +563,8 @@ function do_enclose( $content, $post_ID ) {
global $wpdb;
//TODO: Tidy this ghetto code up and make the debug code optional
include_once( ABSPATH . WPINC . '/class-IXR.php' );
$post_links = array();
$pung = get_enclosed( $post_ID );
@ -2863,18 +2865,18 @@ function _xmlrpc_wp_die_handler( $message, $title = '', $args = array() ) {
* @since 3.4.0
* @access private
*
* @param string $message Error message.
* @param string $title Optional. Error title (unused). Default empty.
* @param string|array $args Optional. Arguments to control behavior. Default empty array.
*/
function _ajax_wp_die_handler( $message, $title = '', $args = array() ) {
$defaults = array(
'response' => 200,
);
$r = wp_parse_args( $args, $defaults );
* @param string $message Error message.
* @param string $title Optional. Error title (unused). Default empty.
* @param string|array $args Optional. Arguments to control behavior. Default empty array.
*/
function _ajax_wp_die_handler( $message, $title = '', $args = array() ) {
$defaults = array(
'response' => 200,
);
$r = wp_parse_args( $args, $defaults );
if ( ! headers_sent() ) {
status_header( $r['response'] );
if ( ! headers_sent() ) {
status_header( $r['response'] );
}
if ( is_scalar( $message ) )
die( (string) $message );

View File

@ -2980,6 +2980,8 @@ function wp_default_editor() {
* @param array $settings See _WP_Editors::editor().
*/
function wp_editor( $content, $editor_id, $settings = array() ) {
if ( ! class_exists( '_WP_Editors', false ) )
require( ABSPATH . WPINC . '/class-wp-editor.php' );
_WP_Editors::editor($content, $editor_id, $settings);
}

View File

@ -2902,6 +2902,8 @@ function the_comments_pagination( $args = array() ) {
function get_shortcut_link() {
global $is_IE;
include_once( ABSPATH . 'wp-admin/includes/class-wp-press-this.php' );
$link = '';
if ( $is_IE ) {

View File

@ -394,6 +394,7 @@ function wp_set_lang_dir() {
function require_wp_db() {
global $wpdb;
require_once( ABSPATH . WPINC . '/wp-db.php' );
if ( file_exists( WP_CONTENT_DIR . '/db.php' ) )
require_once( WP_CONTENT_DIR . '/db.php' );

View File

@ -2913,6 +2913,9 @@ function wp_image_editor_supports( $args = array() ) {
* editor claims to support the request.
*/
function _wp_image_editor_choose( $args = array() ) {
require_once ABSPATH . WPINC . '/class-wp-image-editor.php';
require_once ABSPATH . WPINC . '/class-wp-image-editor-gd.php';
require_once ABSPATH . WPINC . '/class-wp-image-editor-imagick.php';
/**
* Filters the list of image editing library classes.
*

View File

@ -22,6 +22,12 @@
*/
global $current_site, $current_blog;
/** WP_Network class */
require_once( ABSPATH . WPINC . '/class-wp-network.php' );
/** WP_Site class */
require_once( ABSPATH . WPINC . '/class-wp-site.php' );
/** Multisite loader */
require_once( ABSPATH . WPINC . '/ms-load.php' );

View File

@ -7,6 +7,9 @@
* @since 3.0.0
*/
/** Walker_Nav_Menu class */
require_once ABSPATH . WPINC . '/class-walker-nav-menu.php';
/**
* Displays a navigation menu.
*

View File

@ -211,6 +211,7 @@ function wp_mail( $to, $subject, $message, $headers = '', $attachments = array()
// (Re)create it, if it's gone missing
if ( ! ( $phpmailer instanceof PHPMailer ) ) {
require_once ABSPATH . WPINC . '/class-phpmailer.php';
require_once ABSPATH . WPINC . '/class-smtp.php';
$phpmailer = new PHPMailer( true );
}

View File

@ -16,9 +16,21 @@
* @package WordPress
*/
/** WordPress Dependency Class */
require( ABSPATH . WPINC . '/class-wp-dependency.php' );
/** WordPress Dependencies Class */
require( ABSPATH . WPINC . '/class.wp-dependencies.php' );
/** WordPress Scripts Class */
require( ABSPATH . WPINC . '/class.wp-scripts.php' );
/** WordPress Scripts Functions */
require( ABSPATH . WPINC . '/functions.wp-scripts.php' );
/** WordPress Styles Class */
require( ABSPATH . WPINC . '/class.wp-styles.php' );
/** WordPress Styles Functions */
require( ABSPATH . WPINC . '/functions.wp-styles.php' );

View File

@ -1756,6 +1756,7 @@ function _custom_header_background_just_in_time() {
add_action( 'wp_head', $args[0]['wp-head-callback'] );
if ( is_admin() ) {
require_once( ABSPATH . 'wp-admin/custom-header.php' );
$custom_image_header = new Custom_Image_Header( $args[0]['admin-head-callback'], $args[0]['admin-preview-callback'] );
}
}
@ -1768,6 +1769,7 @@ function _custom_header_background_just_in_time() {
add_action( 'wp_head', $args[0]['wp-head-callback'] );
if ( is_admin() ) {
require_once( ABSPATH . 'wp-admin/custom-background.php' );
$custom_background = new Custom_Background( $args[0]['admin-head-callback'], $args[0]['admin-preview-callback'] );
}
}
@ -2080,6 +2082,7 @@ function _wp_customize_include() {
return;
}
require_once ABSPATH . WPINC . '/class-wp-customize-manager.php';
$GLOBALS['wp_customize'] = new WP_Customize_Manager();
}

View File

@ -505,6 +505,7 @@ function wp_update_themes( $extra_stats = array() ) {
*/
function wp_maybe_auto_update() {
include_once( ABSPATH . '/wp-admin/includes/admin.php' );
include_once( ABSPATH . '/wp-admin/includes/class-wp-upgrader.php' );
$upgrader = new WP_Automatic_Updater;
$upgrader->run();

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.7-alpha-38469';
$wp_version = '4.7-alpha-38470';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

View File

@ -16,3 +16,6 @@ if ( ! class_exists( 'Text_Diff', false ) ) {
/** Text_Diff_Renderer_inline class */
require( ABSPATH . WPINC . '/Text/Diff/Renderer/inline.php' );
}
require( ABSPATH . WPINC . '/class-wp-text-diff-renderer-table.php' );
require( ABSPATH . WPINC . '/class-wp-text-diff-renderer-inline.php' );

View File

@ -21,6 +21,9 @@ if ( ! apply_filters( 'enable_post_by_email_configuration', true ) )
*/
do_action( 'wp-mail.php' );
/** Get the POP3 class with which to access the mailbox. */
require_once( ABSPATH . WPINC . '/class-pop3.php' );
/** Only check at this interval for new messages. */
if ( !defined('WP_MAIL_INTERVAL') )
define('WP_MAIL_INTERVAL', 300); // 5 minutes

View File

@ -17,9 +17,6 @@
*/
define( 'WPINC', 'wp-includes' );
// WordPress Core PHP 5.2-compatible Autoloader
require_once( ABSPATH . 'wp-vendor/autoload_52.php' );
// Include files required for initialization.
require( ABSPATH . WPINC . '/load.php' );
require( ABSPATH . WPINC . '/default-constants.php' );
@ -95,7 +92,11 @@ wp_set_lang_dir();
// Load early WordPress files.
require( ABSPATH . WPINC . '/compat.php' );
require( ABSPATH . WPINC . '/functions.php' );
require( ABSPATH . WPINC . '/class-wp-matchesmapregex.php' );
require( ABSPATH . WPINC . '/class-wp.php' );
require( ABSPATH . WPINC . '/class-wp-error.php' );
require( ABSPATH . WPINC . '/pomo/mo.php' );
require( ABSPATH . WPINC . '/class-phpass.php' );
// Include the wpdb class and, if present, a db.php database drop-in.
global $wpdb;
@ -113,6 +114,8 @@ require( ABSPATH . WPINC . '/default-filters.php' );
// Initialize multisite if enabled.
if ( is_multisite() ) {
require( ABSPATH . WPINC . '/class-wp-site-query.php' );
require( ABSPATH . WPINC . '/class-wp-network-query.php' );
require( ABSPATH . WPINC . '/ms-blogs.php' );
require( ABSPATH . WPINC . '/ms-settings.php' );
} elseif ( ! defined( 'MULTISITE' ) ) {
@ -132,26 +135,49 @@ require_once( ABSPATH . WPINC . '/l10n.php' );
wp_not_installed();
// Load most of WordPress.
require( ABSPATH . WPINC . '/class-wp-walker.php' );
require( ABSPATH . WPINC . '/class-wp-ajax-response.php' );
require( ABSPATH . WPINC . '/formatting.php' );
require( ABSPATH . WPINC . '/capabilities.php' );
require( ABSPATH . WPINC . '/class-wp-roles.php' );
require( ABSPATH . WPINC . '/class-wp-role.php' );
require( ABSPATH . WPINC . '/class-wp-user.php' );
require( ABSPATH . WPINC . '/class-wp-query.php' );
require( ABSPATH . WPINC . '/query.php' );
require( ABSPATH . WPINC . '/date.php' );
require( ABSPATH . WPINC . '/theme.php' );
require( ABSPATH . WPINC . '/class-wp-theme.php' );
require( ABSPATH . WPINC . '/template.php' );
require( ABSPATH . WPINC . '/user.php' );
require( ABSPATH . WPINC . '/class-wp-user-query.php' );
require( ABSPATH . WPINC . '/class-wp-session-tokens.php' );
require( ABSPATH . WPINC . '/class-wp-user-meta-session-tokens.php' );
require( ABSPATH . WPINC . '/meta.php' );
require( ABSPATH . WPINC . '/class-wp-meta-query.php' );
require( ABSPATH . WPINC . '/class-wp-metadata-lazyloader.php' );
require( ABSPATH . WPINC . '/general-template.php' );
require( ABSPATH . WPINC . '/link-template.php' );
require( ABSPATH . WPINC . '/author-template.php' );
require( ABSPATH . WPINC . '/post.php' );
require( ABSPATH . WPINC . '/class-walker-page.php' );
require( ABSPATH . WPINC . '/class-walker-page-dropdown.php' );
require( ABSPATH . WPINC . '/class-wp-post-type.php' );
require( ABSPATH . WPINC . '/class-wp-post.php' );
require( ABSPATH . WPINC . '/post-template.php' );
require( ABSPATH . WPINC . '/revision.php' );
require( ABSPATH . WPINC . '/post-formats.php' );
require( ABSPATH . WPINC . '/post-thumbnail-template.php' );
require( ABSPATH . WPINC . '/category.php' );
require( ABSPATH . WPINC . '/class-walker-category.php' );
require( ABSPATH . WPINC . '/class-walker-category-dropdown.php' );
require( ABSPATH . WPINC . '/category-template.php' );
require( ABSPATH . WPINC . '/comment.php' );
require( ABSPATH . WPINC . '/class-wp-comment.php' );
require( ABSPATH . WPINC . '/class-wp-comment-query.php' );
require( ABSPATH . WPINC . '/class-walker-comment.php' );
require( ABSPATH . WPINC . '/comment-template.php' );
require( ABSPATH . WPINC . '/rewrite.php' );
require( ABSPATH . WPINC . '/class-wp-rewrite.php' );
require( ABSPATH . WPINC . '/feed.php' );
require( ABSPATH . WPINC . '/bookmark.php' );
require( ABSPATH . WPINC . '/bookmark-template.php' );
@ -160,17 +186,37 @@ require( ABSPATH . WPINC . '/cron.php' );
require( ABSPATH . WPINC . '/deprecated.php' );
require( ABSPATH . WPINC . '/script-loader.php' );
require( ABSPATH . WPINC . '/taxonomy.php' );
require( ABSPATH . WPINC . '/class-wp-term.php' );
require( ABSPATH . WPINC . '/class-wp-term-query.php' );
require( ABSPATH . WPINC . '/class-wp-tax-query.php' );
require( ABSPATH . WPINC . '/update.php' );
require( ABSPATH . WPINC . '/canonical.php' );
require( ABSPATH . WPINC . '/shortcodes.php' );
require( ABSPATH . WPINC . '/embed.php' );
require( ABSPATH . WPINC . '/class-wp-embed.php' );
require( ABSPATH . WPINC . '/class-oembed.php' );
require( ABSPATH . WPINC . '/class-wp-oembed-controller.php' );
require( ABSPATH . WPINC . '/media.php' );
require( ABSPATH . WPINC . '/http.php' );
require( ABSPATH . WPINC . '/class-http.php' );
require( ABSPATH . WPINC . '/class-wp-http-streams.php' );
require( ABSPATH . WPINC . '/class-wp-http-curl.php' );
require( ABSPATH . WPINC . '/class-wp-http-proxy.php' );
require( ABSPATH . WPINC . '/class-wp-http-cookie.php' );
require( ABSPATH . WPINC . '/class-wp-http-encoding.php' );
require( ABSPATH . WPINC . '/class-wp-http-response.php' );
require( ABSPATH . WPINC . '/class-wp-http-requests-response.php' );
require( ABSPATH . WPINC . '/widgets.php' );
require( ABSPATH . WPINC . '/class-wp-widget.php' );
require( ABSPATH . WPINC . '/class-wp-widget-factory.php' );
require( ABSPATH . WPINC . '/nav-menu.php' );
require( ABSPATH . WPINC . '/nav-menu-template.php' );
require( ABSPATH . WPINC . '/admin-bar.php' );
require( ABSPATH . WPINC . '/rest-api.php' );
require( ABSPATH . WPINC . '/rest-api/class-wp-rest-server.php' );
require( ABSPATH . WPINC . '/rest-api/class-wp-rest-response.php' );
require( ABSPATH . WPINC . '/rest-api/class-wp-rest-request.php' );
require( ABSPATH . WPINC . '/class-wp-locale.php' );
$GLOBALS['wp_embed'] = new WP_Embed();

View File

@ -4,4 +4,4 @@
require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
return ComposerAutoloaderInit1dd196791ebd0cfea0668c22edc062f9::getLoader();
return ComposerAutoloaderInit84e65be829c2294b794a94e0a8b5807c::getLoader();

View File

@ -2,7 +2,7 @@
// autoload_real_52.php generated by xrstf/composer-php52
class ComposerAutoloaderInit1dd196791ebd0cfea0668c22edc062f9 {
class ComposerAutoloaderInit84e65be829c2294b794a94e0a8b5807c {
private static $loader;
public static function loadClassLoader($class) {
@ -19,9 +19,9 @@ class ComposerAutoloaderInit1dd196791ebd0cfea0668c22edc062f9 {
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit1dd196791ebd0cfea0668c22edc062f9', 'loadClassLoader'), true /*, true */);
spl_autoload_register(array('ComposerAutoloaderInit84e65be829c2294b794a94e0a8b5807c', 'loadClassLoader'), true /*, true */);
self::$loader = $loader = new xrstf_Composer52_ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInit1dd196791ebd0cfea0668c22edc062f9', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit84e65be829c2294b794a94e0a8b5807c', 'loadClassLoader'));
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);

View File

@ -59,7 +59,9 @@ header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true);
exit;
}
include_once( ABSPATH . 'wp-admin/includes/admin.php' );
include_once(ABSPATH . 'wp-admin/includes/admin.php');
include_once(ABSPATH . WPINC . '/class-IXR.php');
include_once(ABSPATH . WPINC . '/class-wp-xmlrpc-server.php');
/**
* Posts submitted via the XML-RPC interface get that title