Changeset 47198 for trunk/src/wp-admin/update.php
- Timestamp:
- 02/06/2020 06:31:22 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/update.php
r47122 r47198 12 12 13 13 /** WordPress Administration Bootstrap */ 14 require_once ( dirname( __FILE__ ) . '/admin.php' );15 16 include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );14 require_once __DIR__ . '/admin.php'; 15 16 require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; 17 17 18 18 if ( isset( $_GET['action'] ) ) { … … 61 61 62 62 wp_enqueue_script( 'updates' ); 63 require_once ( ABSPATH . 'wp-admin/admin-header.php' );63 require_once ABSPATH . 'wp-admin/admin-header.php'; 64 64 65 65 $nonce = 'upgrade-plugin_' . $plugin; … … 69 69 $upgrader->upgrade( $plugin ); 70 70 71 include( ABSPATH . 'wp-admin/admin-footer.php' );71 require_once ABSPATH . 'wp-admin/admin-footer.php'; 72 72 73 73 } elseif ( 'activate-plugin' == $action ) { … … 94 94 ini_set( 'display_errors', true ); // Ensure that fatal errors are displayed. 95 95 wp_register_plugin_realpath( WP_PLUGIN_DIR . '/' . $plugin ); 96 include ( WP_PLUGIN_DIR . '/' . $plugin );96 include WP_PLUGIN_DIR . '/' . $plugin; 97 97 } 98 98 iframe_footer(); … … 103 103 } 104 104 105 include_once ( ABSPATH . 'wp-admin/includes/plugin-install.php' ); // For plugins_api().105 include_once ABSPATH . 'wp-admin/includes/plugin-install.php'; // For plugins_api(). 106 106 107 107 check_admin_referer( 'install-plugin_' . $plugin ); … … 123 123 $parent_file = 'plugins.php'; 124 124 $submenu_file = 'plugin-install.php'; 125 require_once ( ABSPATH . 'wp-admin/admin-header.php' );125 require_once ABSPATH . 'wp-admin/admin-header.php'; 126 126 127 127 /* translators: %s: Plugin name and version. */ … … 138 138 $upgrader->install( $api->download_link ); 139 139 140 include( ABSPATH . 'wp-admin/admin-footer.php' );140 require_once ABSPATH . 'wp-admin/admin-footer.php'; 141 141 142 142 } elseif ( 'upload-plugin' == $action ) { … … 153 153 $parent_file = 'plugins.php'; 154 154 $submenu_file = 'plugin-install.php'; 155 require_once ( ABSPATH . 'wp-admin/admin-header.php' );155 require_once ABSPATH . 'wp-admin/admin-header.php'; 156 156 157 157 /* translators: %s: File name. */ … … 168 168 } 169 169 170 include( ABSPATH . 'wp-admin/admin-footer.php' );170 require_once ABSPATH . 'wp-admin/admin-footer.php'; 171 171 172 172 } elseif ( 'upgrade-theme' == $action ) { … … 183 183 $parent_file = 'themes.php'; 184 184 $submenu_file = 'themes.php'; 185 require_once ( ABSPATH . 'wp-admin/admin-header.php' );185 require_once ABSPATH . 'wp-admin/admin-header.php'; 186 186 187 187 $nonce = 'upgrade-theme_' . $theme; … … 191 191 $upgrader->upgrade( $theme ); 192 192 193 include( ABSPATH . 'wp-admin/admin-footer.php' );193 require_once ABSPATH . 'wp-admin/admin-footer.php'; 194 194 } elseif ( 'update-selected-themes' == $action ) { 195 195 if ( ! current_user_can( 'update_themes' ) ) { … … 225 225 } 226 226 227 include_once ( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' ); // For themes_api().227 include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; // For themes_api(). 228 228 229 229 check_admin_referer( 'install-theme_' . $theme ); … … 246 246 $parent_file = 'themes.php'; 247 247 $submenu_file = 'themes.php'; 248 require_once ( ABSPATH . 'wp-admin/admin-header.php' );248 require_once ABSPATH . 'wp-admin/admin-header.php'; 249 249 250 250 /* translators: %s: Theme name and version. */ … … 257 257 $upgrader->install( $api->download_link ); 258 258 259 include( ABSPATH . 'wp-admin/admin-footer.php' );259 require_once ABSPATH . 'wp-admin/admin-footer.php'; 260 260 261 261 } elseif ( 'upload-theme' == $action ) { … … 273 273 $submenu_file = 'theme-install.php'; 274 274 275 require_once ( ABSPATH . 'wp-admin/admin-header.php' );275 require_once ABSPATH . 'wp-admin/admin-header.php'; 276 276 277 277 /* translators: %s: File name. */ … … 288 288 } 289 289 290 include( ABSPATH . 'wp-admin/admin-footer.php' );290 require_once ABSPATH . 'wp-admin/admin-footer.php'; 291 291 292 292 } else {
Note: See TracChangeset
for help on using the changeset viewer.