X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/61343b82c4f0da4c68e4c6373daafff4a81efdd1..53f4633144ed68c8b8fb5861f992b5489894a940:/wp-admin/network/themes.php diff --git a/wp-admin/network/themes.php b/wp-admin/network/themes.php index 711b44e0..2b9132f1 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,8 +86,7 @@ if ( $action ) { require_once(ABSPATH . 'wp-admin/admin-header.php'); echo '
' . __('For more information:') . '
' . - '' . __('Documentation on Network Themes') . '
' . - '' . __('Support Forums') . '
' + '' . __('Documentation on Network Themes') . '
' . + '' . __('Support Forums') . '
' ); $title = __('Themes'); $parent_file = 'themes.php'; -wp_enqueue_script( 'theme' ); +wp_enqueue_script( 'theme-preview' ); require_once(ABSPATH . 'wp-admin/admin-header.php'); ?>' . sprintf( _n( 'Theme enabled.', '%s themes enabled.', $_GET['enabled'] ), number_format_i18n( $_GET['enabled'] ) ) . '
' . sprintf( $message, number_format_i18n( $enabled ) ) . '
' . sprintf( _n( 'Theme disabled.', '%s themes disabled.', $_GET['disabled'] ), number_format_i18n( $_GET['disabled'] ) ) . '
' . sprintf( $message, number_format_i18n( $disabled ) ) . '
' . sprintf( _nx( 'Theme deleted.', '%s themes deleted.', $_GET['deleted'], 'network' ), number_format_i18n( $_GET['deleted'] ) ) . '
' . sprintf( $message, number_format_i18n( $deleted ) ) . '
' . __( 'No theme selected.' ) . '
' . __( 'No theme selected.' ) . '
' . __( 'You cannot delete a theme while it is active on the main site.' ) . '
' . __( 'You cannot delete a theme while it is active on the main site.' ) . '
' . __('The following themes are installed but incomplete. Themes must have a stylesheet and a template.') . '
'; ?> -