Make WordPress Core


Ignore:
Timestamp:
05/10/2011 07:18:16 PM (15 years ago)
Author:
ryan
Message:

Remove favorite_actions() from h2s. Restore Add New buttons. see #17324

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/network/themes.php

    r17800 r17849  
    3535
    3636if ( $action ) {
    37     $allowed_themes = get_site_option( 'allowedthemes' );
     37    $allowed_themes = get_site_option( 'allowedthemes' );   
    3838    switch ( $action ) {
    3939        case 'enable':
     
    101101                    unset( $themes[$key] );
    102102                } else {
    103                     $files_to_delete = array_merge( $files_to_delete, list_files( WP_CONTENT_DIR . "/themes/$theme" ) );
     103                    $files_to_delete = array_merge( $files_to_delete, list_files( WP_CONTENT_DIR . "/themes/$theme" ) );                   
    104104                    $theme_info[ $theme ] = $data;
    105105                }
    106106            }
    107 
     107           
    108108            if ( empty( $themes ) ) {
    109109                wp_redirect( add_query_arg( 'error', 'main', $referer ) );
     
    163163            foreach ( $themes as $theme )
    164164                $delete_result = delete_theme( $theme, esc_url( add_query_arg( array('verify-delete' => 1), $_SERVER['REQUEST_URI'] ) ) );
    165             $paged = ( $_REQUEST['paged'] ) ? $_REQUEST['paged'] : 1;
     165            $paged = ( $_REQUEST['paged'] ) ? $_REQUEST['paged'] : 1; 
    166166            wp_redirect( network_admin_url( "themes.php?deleted=".count( $themes )."&paged=$paged&s=$s" ) );
    167167            exit;
     
    200200<div class="wrap">
    201201<?php screen_icon('themes'); ?>
    202 <h2><?php
    203 echo esc_html( $title );
    204 if ( current_user_can('install_themes') ) {
    205     favorite_actions( $current_screen );
    206 }
    207 if ( $s )
    208     printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', esc_html( $s ) ); ?>
     202<h2><?php echo esc_html( $title ); if ( current_user_can('install_themes') ) { ?> <a href="theme-install.php" class="button add-new-h2"><?php echo esc_html_x('Add New', 'theme'); ?></a><?php }
     203if ( $s )
     204    printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', esc_html( $s ) ); ?>
    209205</h2>
    210206
Note: See TracChangeset for help on using the changeset viewer.