@@ -1507,7 +1507,6 @@ function wp_ajax_wp_link_ajax() {
15071507
15081508 $ args ['pagenum ' ] = ! empty ( $ _POST ['page ' ] ) ? absint ( $ _POST ['page ' ] ) : 1 ;
15091509
1510- require (ABSPATH . WPINC . '/class-wp-editor.php ' );
15111510 $ results = _WP_Editors::wp_link_query ( $ args );
15121511
15131512 if ( ! isset ( $ results ) )
@@ -3137,7 +3136,6 @@ function wp_ajax_destroy_sessions() {
31373136 */
31383137function wp_ajax_press_this_save_post () {
31393138 if ( empty ( $ GLOBALS ['wp_press_this ' ] ) ) {
3140- include ( ABSPATH . 'wp-admin/includes/class-wp-press-this.php ' );
31413139 $ GLOBALS ['wp_press_this ' ] = new WP_Press_This ();
31423140 }
31433141
@@ -3153,7 +3151,6 @@ function wp_ajax_press_this_save_post() {
31533151 */
31543152function wp_ajax_press_this_add_category () {
31553153 if ( empty ( $ GLOBALS ['wp_press_this ' ] ) ) {
3156- include ( ABSPATH . 'wp-admin/includes/class-wp-press-this.php ' );
31573154 $ GLOBALS ['wp_press_this ' ] = new WP_Press_This ();
31583155 }
31593156
@@ -3183,7 +3180,6 @@ function wp_ajax_crop_image() {
31833180
31843181 switch ( $ context ) {
31853182 case 'site-icon ' :
3186- require_once ABSPATH . '/wp-admin/includes/class-wp-site-icon.php ' ;
31873183 $ wp_site_icon = new WP_Site_Icon ();
31883184
31893185 // Skip creating a new attachment if the attachment is a Site Icon.
@@ -3332,7 +3328,6 @@ function wp_ajax_install_theme() {
33323328 wp_send_json_error ( $ status );
33333329 }
33343330
3335- include_once ( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php ' );
33363331 include_once ( ABSPATH . 'wp-admin/includes/theme.php ' );
33373332
33383333 $ api = themes_api ( 'theme_information ' , array (
@@ -3439,8 +3434,6 @@ function wp_ajax_update_theme() {
34393434 wp_send_json_error ( $ status );
34403435 }
34413436
3442- include_once ( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php ' );
3443-
34443437 $ current = get_site_transient ( 'update_themes ' );
34453438 if ( empty ( $ current ) ) {
34463439 wp_update_themes ();
@@ -3590,7 +3583,6 @@ function wp_ajax_install_plugin() {
35903583 wp_send_json_error ( $ status );
35913584 }
35923585
3593- include_once ( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php ' );
35943586 include_once ( ABSPATH . 'wp-admin/includes/plugin-install.php ' );
35953587
35963588 $ api = plugins_api ( 'plugin_information ' , array (
@@ -3698,8 +3690,6 @@ function wp_ajax_update_plugin() {
36983690 $ status ['oldVersion ' ] = sprintf ( __ ( 'Version %s ' ), $ plugin_data ['Version ' ] );
36993691 }
37003692
3701- include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php ' ;
3702-
37033693 wp_update_plugins ();
37043694
37053695 $ skin = new WP_Ajax_Upgrader_Skin ();
0 commit comments