<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[17849] trunk/wp-admin: Remove favorite_actions() from h2s.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg > ul, #logmsg > ol { margin-left: 0; margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/17849">17849</a></dd>
<dt>Author</dt> <dd>ryan</dd>
<dt>Date</dt> <dd>2011-05-10 19:18:16 +0000 (Tue, 10 May 2011)</dd>
</dl>
<h3>Log Message</h3>
<pre>Remove favorite_actions() from h2s. Restore Add New buttons. see <a href="http://trac.wordpress.org/ticket/17324">#17324</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadmineditphp">trunk/wp-admin/edit.php</a></li>
<li><a href="#trunkwpadminindexphp">trunk/wp-admin/index.php</a></li>
<li><a href="#trunkwpadminlinkmanagerphp">trunk/wp-admin/link-manager.php</a></li>
<li><a href="#trunkwpadminnetworksitesphp">trunk/wp-admin/network/sites.php</a></li>
<li><a href="#trunkwpadminnetworkthemesphp">trunk/wp-admin/network/themes.php</a></li>
<li><a href="#trunkwpadminnetworkusersphp">trunk/wp-admin/network/users.php</a></li>
<li><a href="#trunkwpadminpluginsphp">trunk/wp-admin/plugins.php</a></li>
<li><a href="#trunkwpadminthemesphp">trunk/wp-admin/themes.php</a></li>
<li><a href="#trunkwpadminuploadphp">trunk/wp-admin/upload.php</a></li>
<li><a href="#trunkwpadminusersphp">trunk/wp-admin/users.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadmineditphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/edit.php (17848 => 17849)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/edit.php        2011-05-10 00:19:45 UTC (rev 17848)
+++ trunk/wp-admin/edit.php        2011-05-10 19:18:16 UTC (rev 17849)
</span><span class="lines">@@ -190,9 +190,7 @@
</span><span class="cx"> ?>
</span><span class="cx"> <div class="wrap">
</span><span class="cx"> <?php screen_icon(); ?>
</span><del>-<h2><?php
-echo esc_html( $post_type_object->labels->name );
-favorite_actions( $current_screen );
</del><ins>+<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
</ins><span class="cx"> if ( isset($_REQUEST['s']) && $_REQUEST['s'] )
</span><span class="cx">         printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', get_search_query() ); ?>
</span><span class="cx"> </h2>
</span></span></pre></div>
<a id="trunkwpadminindexphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/index.php (17848 => 17849)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/index.php        2011-05-10 00:19:45 UTC (rev 17848)
+++ trunk/wp-admin/index.php        2011-05-10 19:18:16 UTC (rev 17849)
</span><span class="lines">@@ -56,10 +56,7 @@
</span><span class="cx">
</span><span class="cx"> <div class="wrap">
</span><span class="cx"> <?php screen_icon(); ?>
</span><del>-<h2><?php
-echo esc_html( $title );
-favorite_actions( $current_screen ); ?>
-</h2>
</del><ins>+<h2><?php echo esc_html( $title ); ?></h2>
</ins><span class="cx">
</span><span class="cx"> <div id="dashboard-widgets-wrap">
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpadminlinkmanagerphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/link-manager.php (17848 => 17849)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/link-manager.php        2011-05-10 00:19:45 UTC (rev 17848)
+++ trunk/wp-admin/link-manager.php        2011-05-10 19:18:16 UTC (rev 17849)
</span><span class="lines">@@ -59,9 +59,7 @@
</span><span class="cx">
</span><span class="cx"> <div class="wrap nosubsub">
</span><span class="cx"> <?php screen_icon(); ?>
</span><del>-<h2><?php
-echo esc_html( $title );
-favorite_actions( $current_screen );
</del><ins>+<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
</ins><span class="cx"> if ( !empty($_REQUEST['s']) )
</span><span class="cx">         printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', esc_html( stripslashes($_REQUEST['s']) ) ); ?>
</span><span class="cx"> </h2>
</span></span></pre></div>
<a id="trunkwpadminnetworksitesphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/network/sites.php (17848 => 17849)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/network/sites.php        2011-05-10 00:19:45 UTC (rev 17848)
+++ trunk/wp-admin/network/sites.php        2011-05-10 19:18:16 UTC (rev 17849)
</span><span class="lines">@@ -99,13 +99,13 @@
</span><span class="cx">
</span><span class="cx"> <div class="wrap">
</span><span class="cx"> <?php screen_icon('ms-admin'); ?>
</span><del>-<h2><?php
-_e('Sites');
-echo $msg;
-if ( current_user_can( 'create_sites') ) {
-        favorite_actions( $current_screen );
-}
-if ( isset( $_REQUEST['s'] ) && $_REQUEST['s'] ) {
</del><ins>+<h2><?php _e('Sites') ?>
+<?php echo $msg; ?>
+<?php if ( current_user_can( 'create_sites') ) : ?>
+ <a href="<?php echo network_admin_url('site-new.php'); ?>" class="button add-new-h2"><?php echo esc_html_x( 'Add New', 'site' ); ?></a>
+<?php endif; ?>
+
+<?php if ( isset( $_REQUEST['s'] ) && $_REQUEST['s'] ) {
</ins><span class="cx">         printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;' ) . '</span>', esc_html( $s ) );
</span><span class="cx"> } ?>
</span><span class="cx"> </h2>
</span></span></pre></div>
<a id="trunkwpadminnetworkthemesphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/network/themes.php (17848 => 17849)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/network/themes.php        2011-05-10 00:19:45 UTC (rev 17848)
+++ trunk/wp-admin/network/themes.php        2011-05-10 19:18:16 UTC (rev 17849)
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx"> $referer = remove_query_arg( $temp_args, wp_get_referer() );
</span><span class="cx">
</span><span class="cx"> if ( $action ) {
</span><del>-        $allowed_themes = get_site_option( 'allowedthemes' );
</del><ins>+        $allowed_themes = get_site_option( 'allowedthemes' );        
</ins><span class="cx">         switch ( $action ) {
</span><span class="cx">                 case 'enable':
</span><span class="cx">                         check_admin_referer('enable-theme_' . $_GET['theme']);
</span><span class="lines">@@ -100,11 +100,11 @@
</span><span class="cx">                                 if ( $data['Name'] == $main_theme ) {
</span><span class="cx">                                         unset( $themes[$key] );
</span><span class="cx">                                 } else {
</span><del>-                                        $files_to_delete = array_merge( $files_to_delete, list_files( WP_CONTENT_DIR . "/themes/$theme" ) );
</del><ins>+                                        $files_to_delete = array_merge( $files_to_delete, list_files( WP_CONTENT_DIR . "/themes/$theme" ) );                                        
</ins><span class="cx">                                         $theme_info[ $theme ] = $data;
</span><span class="cx">                                 }
</span><span class="cx">                         }
</span><del>-
</del><ins>+                        
</ins><span class="cx">                         if ( empty( $themes ) ) {
</span><span class="cx">                                 wp_redirect( add_query_arg( 'error', 'main', $referer ) );
</span><span class="cx">                                 exit;
</span><span class="lines">@@ -162,7 +162,7 @@
</span><span class="cx">
</span><span class="cx">                         foreach ( $themes as $theme )
</span><span class="cx">                                 $delete_result = delete_theme( $theme, esc_url( add_query_arg( array('verify-delete' => 1), $_SERVER['REQUEST_URI'] ) ) );
</span><del>-                        $paged = ( $_REQUEST['paged'] ) ? $_REQUEST['paged'] : 1;
</del><ins>+                        $paged = ( $_REQUEST['paged'] ) ? $_REQUEST['paged'] : 1;
</ins><span class="cx">                         wp_redirect( network_admin_url( "themes.php?deleted=".count( $themes )."&paged=$paged&s=$s" ) );
</span><span class="cx">                         exit;
</span><span class="cx">                         break;
</span><span class="lines">@@ -199,13 +199,9 @@
</span><span class="cx">
</span><span class="cx"> <div class="wrap">
</span><span class="cx"> <?php screen_icon('themes'); ?>
</span><del>-<h2><?php
-echo esc_html( $title );
-if ( current_user_can('install_themes') ) {
-        favorite_actions( $current_screen );
-}
-if ( $s )
-        printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', esc_html( $s ) ); ?>
</del><ins>+<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 }
+if ( $s )
+        printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', esc_html( $s ) ); ?>
</ins><span class="cx"> </h2>
</span><span class="cx">
</span><span class="cx"> <?php
</span></span></pre></div>
<a id="trunkwpadminnetworkusersphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/network/users.php (17848 => 17849)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/network/users.php        2011-05-10 00:19:45 UTC (rev 17848)
+++ trunk/wp-admin/network/users.php        2011-05-10 19:18:16 UTC (rev 17849)
</span><span class="lines">@@ -72,14 +72,13 @@
</span><span class="cx">         ?>
</span><span class="cx"> <div class="wrap">
</span><span class="cx">         <?php screen_icon(); ?>
</span><del>-        <h2><?php
-        esc_html_e( 'Users' );
-        if ( current_user_can( 'create_users' ) ) {
-                favorite_actions( $current_screen );
-        }
-        if ( !empty( $usersearch ) ) {
-                printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;' ) . '</span>', esc_html( $usersearch ) );
-        }
</del><ins>+        <h2><?php esc_html_e( 'Users' );
+        if ( current_user_can( 'create_users') ) : ?>
+                <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
+        endif;
+        
+        if ( !empty( $usersearch ) )
+        printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;' ) . '</span>', esc_html( $usersearch ) );
</ins><span class="cx">         ?>
</span><span class="cx">         </h2>
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpadminpluginsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/plugins.php (17848 => 17849)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/plugins.php        2011-05-10 00:19:45 UTC (rev 17848)
+++ trunk/wp-admin/plugins.php        2011-05-10 19:18:16 UTC (rev 17849)
</span><span class="lines">@@ -385,11 +385,10 @@
</span><span class="cx">
</span><span class="cx"> <div class="wrap">
</span><span class="cx"> <?php screen_icon(); ?>
</span><del>-<h2><?php
-echo esc_html( $title );
-if ( ( ! is_multisite() || is_network_admin() ) && current_user_can('install_plugins') ) {
-        favorite_actions( $current_screen );
-}
</del><ins>+<h2><?php echo esc_html( $title );
+if ( ( ! is_multisite() || is_network_admin() ) && current_user_can('install_plugins') ) { ?>
+<a href="<?php echo self_admin_url( 'plugin-install.php' ); ?>" class="button add-new-h2"><?php echo esc_html_x('Add New', 'plugin'); ?></a>
+<?php }
</ins><span class="cx"> if ( $s )
</span><span class="cx">         printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', esc_html( $s ) ); ?>
</span><span class="cx"> </h2>
</span></span></pre></div>
<a id="trunkwpadminthemesphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/themes.php (17848 => 17849)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/themes.php        2011-05-10 00:19:45 UTC (rev 17848)
+++ trunk/wp-admin/themes.php        2011-05-10 19:18:16 UTC (rev 17849)
</span><span class="lines">@@ -71,16 +71,15 @@
</span><span class="cx">
</span><span class="cx"> <div class="wrap"><?php
</span><span class="cx"> screen_icon();
</span><del>-
</del><span class="cx"> if ( !is_multisite() ) : ?>
</span><del>-        <h2 class="nav-tab-wrapper">
-                <a href="themes.php" class="nav-tab nav-tab-active"><?php echo esc_html( $title ); ?></a><?php
-                if ( current_user_can('install_themes') ) :
-                        ?><a href="<?php echo admin_url( 'theme-install.php'); ?>" class="nav-tab"><?php echo esc_html_x('Install Themes', 'theme'); ?></a><?php
-                endif;
</del><ins>+<h2 class="nav-tab-wrapper">
+<a href="themes.php" class="nav-tab nav-tab-active"><?php echo esc_html( $title ); ?></a>
+        <?php if ( current_user_can('install_themes') ) : ?>
+<a href="<?php echo admin_url( 'theme-install.php'); ?>" class="nav-tab"><?php echo esc_html_x('Install Themes', 'theme'); ?></a>
+        <?php endif;
</ins><span class="cx"> else : ?>
</span><del>-        <h2>
-                <?php echo esc_html( $title ); ?>
</del><ins>+<h2>
+<?php echo esc_html( $title ); ?>
</ins><span class="cx"> <?php endif; ?>
</span><span class="cx"> </h2>
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpadminuploadphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/upload.php (17848 => 17849)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/upload.php        2011-05-10 00:19:45 UTC (rev 17848)
+++ trunk/wp-admin/upload.php        2011-05-10 19:18:16 UTC (rev 17849)
</span><span class="lines">@@ -160,9 +160,7 @@
</span><span class="cx">
</span><span class="cx"> <div class="wrap">
</span><span class="cx"> <?php screen_icon(); ?>
</span><del>-<h2><?php
-echo esc_html( $title );
-favorite_actions( $current_screen );
</del><ins>+<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
</ins><span class="cx"> if ( isset($_REQUEST['s']) && $_REQUEST['s'] )
</span><span class="cx">         printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', get_search_query() ); ?>
</span><span class="cx"> </h2>
</span></span></pre></div>
<a id="trunkwpadminusersphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/users.php (17848 => 17849)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/users.php        2011-05-10 00:19:45 UTC (rev 17848)
+++ trunk/wp-admin/users.php        2011-05-10 19:18:16 UTC (rev 17849)
</span><span class="lines">@@ -359,7 +359,12 @@
</span><span class="cx"> <h2>
</span><span class="cx"> <?php
</span><span class="cx"> echo esc_html( $title );
</span><del>-favorite_actions( $current_screen );
</del><ins>+if ( current_user_can( 'create_users' ) ) { ?>
+        <a href="user-new.php" class="button add-new-h2"><?php echo esc_html_x( 'Add New', 'user' ); ?></a>
+<?php } elseif ( is_multisite() && current_user_can( 'promote_users' ) ) { ?>
+        <a href="user-new.php" class="button add-new-h2"><?php echo esc_html_x( 'Add Existing', 'user' ); ?></a>
+<?php }
+
</ins><span class="cx"> if ( $usersearch )
</span><span class="cx">         printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', esc_html( $usersearch ) ); ?>
</span><span class="cx"> </h2>
</span></span></pre>
</div>
</div>
</body>
</html>