@@ -1507,6 +1507,7 @@ 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 ' );
15101511 $ results = _WP_Editors::wp_link_query ( $ args );
15111512
15121513 if ( ! isset ( $ results ) )
@@ -3136,6 +3137,7 @@ function wp_ajax_destroy_sessions() {
31363137 */
31373138function wp_ajax_press_this_save_post () {
31383139 if ( empty ( $ GLOBALS ['wp_press_this ' ] ) ) {
3140+ include ( ABSPATH . 'wp-admin/includes/class-wp-press-this.php ' );
31393141 $ GLOBALS ['wp_press_this ' ] = new WP_Press_This ();
31403142 }
31413143
@@ -3151,6 +3153,7 @@ function wp_ajax_press_this_save_post() {
31513153 */
31523154function wp_ajax_press_this_add_category () {
31533155 if ( empty ( $ GLOBALS ['wp_press_this ' ] ) ) {
3156+ include ( ABSPATH . 'wp-admin/includes/class-wp-press-this.php ' );
31543157 $ GLOBALS ['wp_press_this ' ] = new WP_Press_This ();
31553158 }
31563159
@@ -3180,6 +3183,7 @@ function wp_ajax_crop_image() {
31803183
31813184 switch ( $ context ) {
31823185 case 'site-icon ' :
3186+ require_once ABSPATH . '/wp-admin/includes/class-wp-site-icon.php ' ;
31833187 $ wp_site_icon = new WP_Site_Icon ();
31843188
31853189 // Skip creating a new attachment if the attachment is a Site Icon.
@@ -3328,6 +3332,7 @@ function wp_ajax_install_theme() {
33283332 wp_send_json_error ( $ status );
33293333 }
33303334
3335+ include_once ( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php ' );
33313336 include_once ( ABSPATH . 'wp-admin/includes/theme.php ' );
33323337
33333338 $ api = themes_api ( 'theme_information ' , array (
@@ -3434,6 +3439,8 @@ function wp_ajax_update_theme() {
34343439 wp_send_json_error ( $ status );
34353440 }
34363441
3442+ include_once ( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php ' );
3443+
34373444 $ current = get_site_transient ( 'update_themes ' );
34383445 if ( empty ( $ current ) ) {
34393446 wp_update_themes ();
@@ -3583,6 +3590,7 @@ function wp_ajax_install_plugin() {
35833590 wp_send_json_error ( $ status );
35843591 }
35853592
3593+ include_once ( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php ' );
35863594 include_once ( ABSPATH . 'wp-admin/includes/plugin-install.php ' );
35873595
35883596 $ api = plugins_api ( 'plugin_information ' , array (
@@ -3690,6 +3698,8 @@ function wp_ajax_update_plugin() {
36903698 $ status ['oldVersion ' ] = sprintf ( __ ( 'Version %s ' ), $ plugin_data ['Version ' ] );
36913699 }
36923700
3701+ include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php ' ;
3702+
36933703 wp_update_plugins ();
36943704
36953705 $ skin = new WP_Ajax_Upgrader_Skin ();
0 commit comments