X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/b22765f41bf0b2021b9beb9120ee0ac91fa89292..HEAD:/wp-admin/network/site-themes.php diff --git a/wp-admin/network/site-themes.php b/wp-admin/network/site-themes.php index f545f475..a500c533 100644 --- a/wp-admin/network/site-themes.php +++ b/wp-admin/network/site-themes.php @@ -10,9 +10,6 @@ /** Load WordPress Administration Bootstrap */ require_once( dirname( __FILE__ ) . '/admin.php' ); -if ( ! is_multisite() ) - wp_die( __( 'Multisite support is not enabled.' ) ); - if ( ! current_user_can( 'manage_sites' ) ) wp_die( __( 'Sorry, you are not allowed to manage themes for this site.' ) ); @@ -29,8 +26,8 @@ get_current_screen()->add_help_tab( array( get_current_screen()->set_help_sidebar( '

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

' . - '

' . __('Documentation on Site Management') . '

' . - '

' . __('Support Forums') . '

' + '

' . __('Documentation on Site Management') . '

' . + '

' . __('Support Forums') . '

' ); get_current_screen()->set_screen_reader_content( array( @@ -61,7 +58,7 @@ if ( ! $id ) $wp_list_table->prepare_items(); -$details = get_blog_details( $id ); +$details = get_site( $id ); if ( ! $details ) { wp_die( __( 'The requested site does not exist.' ) ); } @@ -122,6 +119,29 @@ if ( $action ) { $n = 'none'; } break; + default: + if ( isset( $_POST['checked'] ) ) { + check_admin_referer( 'bulk-themes' ); + $themes = (array) $_POST['checked']; + $n = count( $themes ); + /** + * Fires when a custom bulk action should be handled. + * + * The redirect link should be modified with success or failure feedback + * from the action to be used to display feedback to the user. + * + * @since 4.7.0 + * + * @param string $redirect_url The redirect URL. + * @param string $action The action being taken. + * @param array $items The items to take the action on. + * @param int $site_id The site id. + */ + $referer = apply_filters( 'handle_network_bulk_actions-' . get_current_screen()->id, $referer, $action, $themes, $id ); + } else { + $action = 'error'; + $n = 'none'; + } } update_option( 'allowedthemes', $allowed_themes ); @@ -139,6 +159,7 @@ if ( isset( $_GET['action'] ) && 'update-site' == $_GET['action'] ) { add_thickbox(); add_screen_option( 'per_page' ); +/* translators: %s: site name */ $title = sprintf( __( 'Edit Site: %s' ), esc_html( $details->blogname ) ); $parent_file = 'sites.php';