X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/6c8f14c09105d0afa4c1574215c59b5021040e76..2329f698283944696a7076258cf816545970bb47:/wp-admin/network/themes.php diff --git a/wp-admin/network/themes.php b/wp-admin/network/themes.php index 04840ee1..a70d5b84 100644 --- a/wp-admin/network/themes.php +++ b/wp-admin/network/themes.php @@ -8,7 +8,7 @@ */ /** Load WordPress Administration Bootstrap */ -require_once( './admin.php' ); +require_once( dirname( __FILE__ ) . '/admin.php' ); if ( ! is_multisite() ) wp_die( __( 'Multisite support is not enabled.' ) ); @@ -40,14 +40,12 @@ if ( $action ) { else wp_safe_redirect( add_query_arg( 'enabled', 1, $referer ) ); exit; - break; case 'disable': check_admin_referer('disable-theme_' . $_GET['theme']); unset( $allowed_themes[ $_GET['theme'] ] ); update_site_option( 'allowedthemes', $allowed_themes ); wp_safe_redirect( add_query_arg( 'disabled', '1', $referer ) ); exit; - break; case 'enable-selected': check_admin_referer('bulk-themes'); $themes = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array(); @@ -60,7 +58,6 @@ if ( $action ) { update_site_option( 'allowedthemes', $allowed_themes ); wp_safe_redirect( add_query_arg( 'enabled', count( $themes ), $referer ) ); exit; - break; case 'disable-selected': check_admin_referer('bulk-themes'); $themes = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array(); @@ -73,7 +70,6 @@ if ( $action ) { update_site_option( 'allowedthemes', $allowed_themes ); wp_safe_redirect( add_query_arg( 'disabled', count( $themes ), $referer ) ); exit; - break; case 'update-selected' : check_admin_referer( 'bulk-themes' ); @@ -90,7 +86,6 @@ if ( $action ) { require_once(ABSPATH . 'wp-admin/admin-header.php'); echo '
'; - screen_icon(); echo '

' . esc_html( $title ) . '

'; $url = self_admin_url('update.php?action=update-selected-themes&themes=' . urlencode( join(',', $themes) )); @@ -100,7 +95,6 @@ if ( $action ) { echo '
'; require_once(ABSPATH . 'wp-admin/admin-footer.php'); exit; - break; case 'delete-selected': if ( ! current_user_can( 'delete_themes' ) ) wp_die( __('You do not have sufficient permissions to delete themes for this site.') ); @@ -137,7 +131,6 @@ if ( $action ) {
' . _n( 'Delete Theme', 'Delete Themes', $themes_to_delete ) . ''; ?>

@@ -184,7 +177,7 @@ if ( $action ) { '_wpnonce' => $_REQUEST['_wpnonce'] ), network_admin_url( 'themes.php' ) ) ) ); } - + $paged = ( $_REQUEST['paged'] ) ? $_REQUEST['paged'] : 1; wp_redirect( add_query_arg( array( 'deleted' => count( $themes ), @@ -192,7 +185,6 @@ if ( $action ) { 's' => $s ), network_admin_url( 'themes.php' ) ) ); exit; - break; } } @@ -214,18 +206,19 @@ get_current_screen()->add_help_tab( array( get_current_screen()->set_help_sidebar( '

' . __('For more information:') . '

' . '

' . __('Documentation on Network Themes') . '

' . - '

' . __('Support Forums') . '

' + '

' . __('Support Forums') . '

' ); $title = __('Themes'); $parent_file = 'themes.php'; +wp_enqueue_script( 'theme-preview' ); + require_once(ABSPATH . 'wp-admin/admin-header.php'); ?>
-

' . __('Search results for “%s”') . '', esc_html( $s ) ); ?>