Make WordPress Core

Changeset 17849


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

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

Location:
trunk/wp-admin
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit.php

    r17800 r17849  
    191191<div class="wrap">
    192192<?php screen_icon(); ?>
    193 <h2><?php
    194 echo esc_html( $post_type_object->labels->name );
    195 favorite_actions( $current_screen );
     193<h2><?php echo esc_html( $post_type_object->labels->name ); ?> <a href="<?php echo $post_new_file ?>" class="button add-new-h2"><?php echo esc_html($post_type_object->labels->add_new); ?></a> <?php
    196194if ( isset($_REQUEST['s']) && $_REQUEST['s'] )
    197195    printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', get_search_query() ); ?>
  • trunk/wp-admin/index.php

    r17800 r17849  
    5757<div class="wrap">
    5858<?php screen_icon(); ?>
    59 <h2><?php
    60 echo esc_html( $title );
    61 favorite_actions( $current_screen ); ?>
    62 </h2>
     59<h2><?php echo esc_html( $title ); ?></h2>
    6360
    6461<div id="dashboard-widgets-wrap">
  • trunk/wp-admin/link-manager.php

    r17800 r17849  
    6060<div class="wrap nosubsub">
    6161<?php screen_icon(); ?>
    62 <h2><?php
    63 echo esc_html( $title );
    64 favorite_actions( $current_screen );
     62<h2><?php echo esc_html( $title ); ?> <a href="link-add.php" class="button add-new-h2"><?php echo esc_html_x('Add New', 'link'); ?></a> <?php
    6563if ( !empty($_REQUEST['s']) )
    6664    printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', esc_html( stripslashes($_REQUEST['s']) ) ); ?>
  • trunk/wp-admin/network/sites.php

    r17800 r17849  
    100100<div class="wrap">
    101101<?php screen_icon('ms-admin'); ?>
    102 <h2><?php
    103 _e('Sites');
    104 echo $msg;
    105 if ( current_user_can( 'create_sites') ) {
    106     favorite_actions( $current_screen );
    107 }
    108 if ( isset( $_REQUEST['s'] ) && $_REQUEST['s'] ) {
     102<h2><?php _e('Sites') ?>
     103<?php echo $msg; ?>
     104<?php if ( current_user_can( 'create_sites') ) : ?>
     105        <a href="<?php echo network_admin_url('site-new.php'); ?>" class="button add-new-h2"><?php echo esc_html_x( 'Add New', 'site' ); ?></a>
     106<?php endif; ?>
     107
     108<?php if ( isset( $_REQUEST['s'] ) && $_REQUEST['s'] ) {
    109109    printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;' ) . '</span>', esc_html( $s ) );
    110110} ?>
  • 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
  • trunk/wp-admin/network/users.php

    r17800 r17849  
    7373<div class="wrap">
    7474    <?php screen_icon(); ?>
    75     <h2><?php
    76     esc_html_e( 'Users' );
    77     if ( current_user_can( 'create_users' ) ) {
    78         favorite_actions( $current_screen );
    79     }
    80     if ( !empty( $usersearch ) ) {
    81         printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;' ) . '</span>', esc_html( $usersearch ) );
    82     }
     75    <h2><?php esc_html_e( 'Users' );
     76    if ( current_user_can( 'create_users') ) : ?>
     77        <a href="<?php echo network_admin_url('user-new.php'); ?>" class="button add-new-h2"><?php echo esc_html_x( 'Add New', 'user' ); ?></a><?php
     78    endif;
     79   
     80    if ( !empty( $usersearch ) )
     81    printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;' ) . '</span>', esc_html( $usersearch ) );
    8382    ?>
    8483    </h2>
  • trunk/wp-admin/plugins.php

    r17806 r17849  
    386386<div class="wrap">
    387387<?php screen_icon(); ?>
    388 <h2><?php
    389 echo esc_html( $title );
    390 if ( ( ! is_multisite() || is_network_admin() ) && current_user_can('install_plugins') ) {
    391     favorite_actions( $current_screen );
    392 }
     388<h2><?php echo esc_html( $title );
     389if ( ( ! is_multisite() || is_network_admin() ) && current_user_can('install_plugins') ) { ?>
     390<a href="<?php echo self_admin_url( 'plugin-install.php' ); ?>" class="button add-new-h2"><?php echo esc_html_x('Add New', 'plugin'); ?></a>
     391<?php }
    393392if ( $s )
    394393    printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', esc_html( $s ) ); ?>
  • trunk/wp-admin/themes.php

    r17800 r17849  
    7272<div class="wrap"><?php
    7373screen_icon();
    74 
    7574if ( !is_multisite() ) : ?>
    76     <h2 class="nav-tab-wrapper">
    77         <a href="themes.php" class="nav-tab nav-tab-active"><?php echo esc_html( $title ); ?></a><?php
    78         if ( current_user_can('install_themes') ) :
    79             ?><a href="<?php echo admin_url( 'theme-install.php'); ?>" class="nav-tab"><?php echo esc_html_x('Install Themes', 'theme'); ?></a><?php
    80         endif;
     75<h2 class="nav-tab-wrapper">
     76<a href="themes.php" class="nav-tab nav-tab-active"><?php echo esc_html( $title ); ?></a>
     77    <?php if ( current_user_can('install_themes') ) : ?>
     78<a href="<?php echo admin_url( 'theme-install.php'); ?>" class="nav-tab"><?php echo esc_html_x('Install Themes', 'theme'); ?></a>
     79    <?php endif;
    8180else : ?>
    82     <h2>
    83         <?php echo esc_html( $title ); ?>
     81<h2>
     82<?php echo esc_html( $title ); ?>
    8483<?php endif; ?>
    8584</h2>
  • trunk/wp-admin/upload.php

    r17800 r17849  
    161161<div class="wrap">
    162162<?php screen_icon(); ?>
    163 <h2><?php
    164 echo esc_html( $title );
    165 favorite_actions( $current_screen );
     163<h2><?php echo esc_html( $title ); ?> <a href="media-new.php" class="button add-new-h2"><?php echo esc_html_x('Add New', 'file'); ?></a> <?php
    166164if ( isset($_REQUEST['s']) && $_REQUEST['s'] )
    167165    printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', get_search_query() ); ?>
  • trunk/wp-admin/users.php

    r17800 r17849  
    360360<?php
    361361echo esc_html( $title );
    362 favorite_actions( $current_screen );
     362if ( current_user_can( 'create_users' ) ) { ?>
     363    <a href="user-new.php" class="button add-new-h2"><?php echo esc_html_x( 'Add New', 'user' ); ?></a>
     364<?php } elseif ( is_multisite() && current_user_can( 'promote_users' ) ) { ?>
     365    <a href="user-new.php" class="button add-new-h2"><?php echo esc_html_x( 'Add Existing', 'user' ); ?></a>
     366<?php }
     367
    363368if ( $usersearch )
    364369    printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', esc_html( $usersearch ) ); ?>
Note: See TracChangeset for help on using the changeset viewer.