Remove favorite_actions() from h2s. Restore Add New buttons. see #17324
git-svn-id: http://svn.automattic.com/wordpress/trunk@17849 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6e356e3b0a
commit
e5ec44416a
|
@ -190,9 +190,7 @@ require_once('./admin-header.php');
|
||||||
?>
|
?>
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<?php screen_icon(); ?>
|
<?php screen_icon(); ?>
|
||||||
<h2><?php
|
<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
|
||||||
echo esc_html( $post_type_object->labels->name );
|
|
||||||
favorite_actions( $current_screen );
|
|
||||||
if ( isset($_REQUEST['s']) && $_REQUEST['s'] )
|
if ( isset($_REQUEST['s']) && $_REQUEST['s'] )
|
||||||
printf( '<span class="subtitle">' . __('Search results for “%s”') . '</span>', get_search_query() ); ?>
|
printf( '<span class="subtitle">' . __('Search results for “%s”') . '</span>', get_search_query() ); ?>
|
||||||
</h2>
|
</h2>
|
||||||
|
|
|
@ -56,10 +56,7 @@ $today = current_time('mysql', 1);
|
||||||
|
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<?php screen_icon(); ?>
|
<?php screen_icon(); ?>
|
||||||
<h2><?php
|
<h2><?php echo esc_html( $title ); ?></h2>
|
||||||
echo esc_html( $title );
|
|
||||||
favorite_actions( $current_screen ); ?>
|
|
||||||
</h2>
|
|
||||||
|
|
||||||
<div id="dashboard-widgets-wrap">
|
<div id="dashboard-widgets-wrap">
|
||||||
|
|
||||||
|
|
|
@ -59,9 +59,7 @@ if ( ! current_user_can('manage_links') )
|
||||||
|
|
||||||
<div class="wrap nosubsub">
|
<div class="wrap nosubsub">
|
||||||
<?php screen_icon(); ?>
|
<?php screen_icon(); ?>
|
||||||
<h2><?php
|
<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
|
||||||
echo esc_html( $title );
|
|
||||||
favorite_actions( $current_screen );
|
|
||||||
if ( !empty($_REQUEST['s']) )
|
if ( !empty($_REQUEST['s']) )
|
||||||
printf( '<span class="subtitle">' . __('Search results for “%s”') . '</span>', esc_html( stripslashes($_REQUEST['s']) ) ); ?>
|
printf( '<span class="subtitle">' . __('Search results for “%s”') . '</span>', esc_html( stripslashes($_REQUEST['s']) ) ); ?>
|
||||||
</h2>
|
</h2>
|
||||||
|
|
|
@ -99,13 +99,13 @@ require_once( '../admin-header.php' );
|
||||||
|
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<?php screen_icon('ms-admin'); ?>
|
<?php screen_icon('ms-admin'); ?>
|
||||||
<h2><?php
|
<h2><?php _e('Sites') ?>
|
||||||
_e('Sites');
|
<?php echo $msg; ?>
|
||||||
echo $msg;
|
<?php if ( current_user_can( 'create_sites') ) : ?>
|
||||||
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>
|
||||||
favorite_actions( $current_screen );
|
<?php endif; ?>
|
||||||
}
|
|
||||||
if ( isset( $_REQUEST['s'] ) && $_REQUEST['s'] ) {
|
<?php if ( isset( $_REQUEST['s'] ) && $_REQUEST['s'] ) {
|
||||||
printf( '<span class="subtitle">' . __( 'Search results for “%s”' ) . '</span>', esc_html( $s ) );
|
printf( '<span class="subtitle">' . __( 'Search results for “%s”' ) . '</span>', esc_html( $s ) );
|
||||||
} ?>
|
} ?>
|
||||||
</h2>
|
</h2>
|
||||||
|
|
|
@ -34,7 +34,7 @@ $_SERVER['REQUEST_URI'] = remove_query_arg( $temp_args, $_SERVER['REQUEST_URI']
|
||||||
$referer = remove_query_arg( $temp_args, wp_get_referer() );
|
$referer = remove_query_arg( $temp_args, wp_get_referer() );
|
||||||
|
|
||||||
if ( $action ) {
|
if ( $action ) {
|
||||||
$allowed_themes = get_site_option( 'allowedthemes' );
|
$allowed_themes = get_site_option( 'allowedthemes' );
|
||||||
switch ( $action ) {
|
switch ( $action ) {
|
||||||
case 'enable':
|
case 'enable':
|
||||||
check_admin_referer('enable-theme_' . $_GET['theme']);
|
check_admin_referer('enable-theme_' . $_GET['theme']);
|
||||||
|
@ -100,11 +100,11 @@ if ( $action ) {
|
||||||
if ( $data['Name'] == $main_theme ) {
|
if ( $data['Name'] == $main_theme ) {
|
||||||
unset( $themes[$key] );
|
unset( $themes[$key] );
|
||||||
} else {
|
} else {
|
||||||
$files_to_delete = array_merge( $files_to_delete, list_files( WP_CONTENT_DIR . "/themes/$theme" ) );
|
$files_to_delete = array_merge( $files_to_delete, list_files( WP_CONTENT_DIR . "/themes/$theme" ) );
|
||||||
$theme_info[ $theme ] = $data;
|
$theme_info[ $theme ] = $data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( empty( $themes ) ) {
|
if ( empty( $themes ) ) {
|
||||||
wp_redirect( add_query_arg( 'error', 'main', $referer ) );
|
wp_redirect( add_query_arg( 'error', 'main', $referer ) );
|
||||||
exit;
|
exit;
|
||||||
|
@ -162,7 +162,7 @@ if ( $action ) {
|
||||||
|
|
||||||
foreach ( $themes as $theme )
|
foreach ( $themes as $theme )
|
||||||
$delete_result = delete_theme( $theme, esc_url( add_query_arg( array('verify-delete' => 1), $_SERVER['REQUEST_URI'] ) ) );
|
$delete_result = delete_theme( $theme, esc_url( add_query_arg( array('verify-delete' => 1), $_SERVER['REQUEST_URI'] ) ) );
|
||||||
$paged = ( $_REQUEST['paged'] ) ? $_REQUEST['paged'] : 1;
|
$paged = ( $_REQUEST['paged'] ) ? $_REQUEST['paged'] : 1;
|
||||||
wp_redirect( network_admin_url( "themes.php?deleted=".count( $themes )."&paged=$paged&s=$s" ) );
|
wp_redirect( network_admin_url( "themes.php?deleted=".count( $themes )."&paged=$paged&s=$s" ) );
|
||||||
exit;
|
exit;
|
||||||
break;
|
break;
|
||||||
|
@ -199,13 +199,9 @@ require_once(ABSPATH . 'wp-admin/admin-header.php');
|
||||||
|
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<?php screen_icon('themes'); ?>
|
<?php screen_icon('themes'); ?>
|
||||||
<h2><?php
|
<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 }
|
||||||
echo esc_html( $title );
|
if ( $s )
|
||||||
if ( current_user_can('install_themes') ) {
|
printf( '<span class="subtitle">' . __('Search results for “%s”') . '</span>', esc_html( $s ) ); ?>
|
||||||
favorite_actions( $current_screen );
|
|
||||||
}
|
|
||||||
if ( $s )
|
|
||||||
printf( '<span class="subtitle">' . __('Search results for “%s”') . '</span>', esc_html( $s ) ); ?>
|
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
|
@ -72,14 +72,13 @@ if ( isset( $_REQUEST['updated'] ) && $_REQUEST['updated'] == 'true' && ! empty(
|
||||||
?>
|
?>
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<?php screen_icon(); ?>
|
<?php screen_icon(); ?>
|
||||||
<h2><?php
|
<h2><?php esc_html_e( 'Users' );
|
||||||
esc_html_e( 'Users' );
|
if ( current_user_can( 'create_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
|
||||||
favorite_actions( $current_screen );
|
endif;
|
||||||
}
|
|
||||||
if ( !empty( $usersearch ) ) {
|
if ( !empty( $usersearch ) )
|
||||||
printf( '<span class="subtitle">' . __( 'Search results for “%s”' ) . '</span>', esc_html( $usersearch ) );
|
printf( '<span class="subtitle">' . __( 'Search results for “%s”' ) . '</span>', esc_html( $usersearch ) );
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
|
@ -385,11 +385,10 @@ if ( !empty($invalid) )
|
||||||
|
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<?php screen_icon(); ?>
|
<?php screen_icon(); ?>
|
||||||
<h2><?php
|
<h2><?php echo esc_html( $title );
|
||||||
echo esc_html( $title );
|
if ( ( ! is_multisite() || is_network_admin() ) && current_user_can('install_plugins') ) { ?>
|
||||||
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>
|
||||||
favorite_actions( $current_screen );
|
<?php }
|
||||||
}
|
|
||||||
if ( $s )
|
if ( $s )
|
||||||
printf( '<span class="subtitle">' . __('Search results for “%s”') . '</span>', esc_html( $s ) ); ?>
|
printf( '<span class="subtitle">' . __('Search results for “%s”') . '</span>', esc_html( $s ) ); ?>
|
||||||
</h2>
|
</h2>
|
||||||
|
|
|
@ -71,16 +71,15 @@ require_once('./admin-header.php');
|
||||||
|
|
||||||
<div class="wrap"><?php
|
<div class="wrap"><?php
|
||||||
screen_icon();
|
screen_icon();
|
||||||
|
|
||||||
if ( !is_multisite() ) : ?>
|
if ( !is_multisite() ) : ?>
|
||||||
<h2 class="nav-tab-wrapper">
|
<h2 class="nav-tab-wrapper">
|
||||||
<a href="themes.php" class="nav-tab nav-tab-active"><?php echo esc_html( $title ); ?></a><?php
|
<a href="themes.php" class="nav-tab nav-tab-active"><?php echo esc_html( $title ); ?></a>
|
||||||
if ( current_user_can('install_themes') ) :
|
<?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
|
<a href="<?php echo admin_url( 'theme-install.php'); ?>" class="nav-tab"><?php echo esc_html_x('Install Themes', 'theme'); ?></a>
|
||||||
endif;
|
<?php endif;
|
||||||
else : ?>
|
else : ?>
|
||||||
<h2>
|
<h2>
|
||||||
<?php echo esc_html( $title ); ?>
|
<?php echo esc_html( $title ); ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
|
@ -160,9 +160,7 @@ require_once('./admin-header.php');
|
||||||
|
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<?php screen_icon(); ?>
|
<?php screen_icon(); ?>
|
||||||
<h2><?php
|
<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
|
||||||
echo esc_html( $title );
|
|
||||||
favorite_actions( $current_screen );
|
|
||||||
if ( isset($_REQUEST['s']) && $_REQUEST['s'] )
|
if ( isset($_REQUEST['s']) && $_REQUEST['s'] )
|
||||||
printf( '<span class="subtitle">' . __('Search results for “%s”') . '</span>', get_search_query() ); ?>
|
printf( '<span class="subtitle">' . __('Search results for “%s”') . '</span>', get_search_query() ); ?>
|
||||||
</h2>
|
</h2>
|
||||||
|
|
|
@ -359,7 +359,12 @@ if ( ! empty($messages) ) {
|
||||||
<h2>
|
<h2>
|
||||||
<?php
|
<?php
|
||||||
echo esc_html( $title );
|
echo esc_html( $title );
|
||||||
favorite_actions( $current_screen );
|
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 }
|
||||||
|
|
||||||
if ( $usersearch )
|
if ( $usersearch )
|
||||||
printf( '<span class="subtitle">' . __('Search results for “%s”') . '</span>', esc_html( $usersearch ) ); ?>
|
printf( '<span class="subtitle">' . __('Search results for “%s”') . '</span>', esc_html( $usersearch ) ); ?>
|
||||||
</h2>
|
</h2>
|
||||||
|
|
Loading…
Reference in New Issue