Skip to content

Commit 305de43

Browse files
committed
Administration: Add improved context for add new links.
Consistently expand `Add New` links to include the type of content to add. Improve consistency of text casing to use initial caps throughout. Props afercia, gonzomir, alexstine, swissspidy, joedolson. Fixes #47125. git-svn-id: https://develop.svn.wordpress.org/trunk@56515 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 5f1a92c commit 305de43

17 files changed

Lines changed: 41 additions & 44 deletions

src/wp-admin/edit-link-form.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
?>
8888
</h1>
8989

90-
<a href="link-add.php" class="page-title-action"><?php echo esc_html_x( 'Add New', 'link' ); ?></a>
90+
<a href="link-add.php" class="page-title-action"><?php echo esc_html__( 'Add New Link' ); ?></a>
9191

9292
<hr class="wp-header-end">
9393

src/wp-admin/includes/template.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ function wp_comment_reply( $position = 1, $checkbox = false, $mode = 'single', $
461461
<legend>
462462
<span class="hidden" id="editlegend"><?php _e( 'Edit Comment' ); ?></span>
463463
<span class="hidden" id="replyhead"><?php _e( 'Reply to Comment' ); ?></span>
464-
<span class="hidden" id="addhead"><?php _e( 'Add new Comment' ); ?></span>
464+
<span class="hidden" id="addhead"><?php _e( 'Add New Comment' ); ?></span>
465465
</legend>
466466

467467
<div id="replycontainer">

src/wp-admin/link-manager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
?>
102102
</h1>
103103

104-
<a href="link-add.php" class="page-title-action"><?php echo esc_html_x( 'Add New', 'link' ); ?></a>
104+
<a href="link-add.php" class="page-title-action"><?php echo esc_html__( 'Add New Link' ); ?></a>
105105

106106
<?php
107107
if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) {

src/wp-admin/menu.php

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@
6565

6666
$menu[10] = array( __( 'Media' ), 'upload_files', 'upload.php', '', 'menu-top menu-icon-media', 'menu-media', 'dashicons-admin-media' );
6767
$submenu['upload.php'][5] = array( __( 'Library' ), 'upload_files', 'upload.php' );
68-
/* translators: Add new file. */
69-
$submenu['upload.php'][10] = array( _x( 'Add New', 'file' ), 'upload_files', 'media-new.php' );
68+
$submenu['upload.php'][10] = array( __( 'Add New Media File' ), 'upload_files', 'media-new.php' );
7069
$i = 15;
7170
foreach ( get_taxonomies_for_attachments( 'objects' ) as $tax ) {
7271
if ( ! $tax->show_ui || ! $tax->show_in_menu ) {
@@ -79,8 +78,7 @@
7978

8079
$menu[15] = array( __( 'Links' ), 'manage_links', 'link-manager.php', '', 'menu-top menu-icon-links', 'menu-links', 'dashicons-admin-links' );
8180
$submenu['link-manager.php'][5] = array( _x( 'All Links', 'admin menu' ), 'manage_links', 'link-manager.php' );
82-
/* translators: Add new links. */
83-
$submenu['link-manager.php'][10] = array( _x( 'Add New', 'link' ), 'manage_links', 'link-add.php' );
81+
$submenu['link-manager.php'][10] = array( __( 'Add New Link' ), 'manage_links', 'link-add.php' );
8482
$submenu['link-manager.php'][15] = array( __( 'Link Categories' ), 'manage_categories', 'edit-tags.php?taxonomy=link_category' );
8583

8684
// $menu[20] = Pages.
@@ -304,8 +302,7 @@ function _add_plugin_file_editor_to_tools() {
304302
$submenu['plugins.php'][5] = array( __( 'Installed Plugins' ), 'activate_plugins', 'plugins.php' );
305303

306304
if ( ! is_multisite() ) {
307-
/* translators: Add new plugin. */
308-
$submenu['plugins.php'][10] = array( _x( 'Add New', 'plugin' ), 'install_plugins', 'plugin-install.php' );
305+
$submenu['plugins.php'][10] = array( __( 'Add New Plugin' ), 'install_plugins', 'plugin-install.php' );
309306
if ( wp_is_block_theme() ) {
310307
// Place the menu item below the Theme File Editor menu item.
311308
add_action( 'admin_menu', '_add_plugin_file_editor_to_tools', 101 );
@@ -326,9 +323,9 @@ function _add_plugin_file_editor_to_tools() {
326323
$_wp_real_parent_file['profile.php'] = 'users.php'; // Back-compat for plugins adding submenus to profile.php.
327324
$submenu['users.php'][5] = array( __( 'All Users' ), 'list_users', 'users.php' );
328325
if ( current_user_can( 'create_users' ) ) {
329-
$submenu['users.php'][10] = array( _x( 'Add New', 'user' ), 'create_users', 'user-new.php' );
326+
$submenu['users.php'][10] = array( __( 'Add New User' ), 'create_users', 'user-new.php' );
330327
} elseif ( is_multisite() ) {
331-
$submenu['users.php'][10] = array( _x( 'Add New', 'user' ), 'promote_users', 'user-new.php' );
328+
$submenu['users.php'][10] = array( __( 'Add New User' ), 'promote_users', 'user-new.php' );
332329
}
333330

334331
$submenu['users.php'][15] = array( __( 'Profile' ), 'read', 'profile.php' );

src/wp-admin/my-sites.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
if ( in_array( get_site_option( 'registration' ), array( 'all', 'blog' ), true ) ) {
7979
/** This filter is documented in wp-login.php */
8080
$sign_up_url = apply_filters( 'wp_signup_location', network_site_url( 'wp-signup.php' ) );
81-
printf( ' <a href="%s" class="page-title-action">%s</a>', esc_url( $sign_up_url ), esc_html_x( 'Add New', 'site' ) );
81+
printf( ' <a href="%s" class="page-title-action">%s</a>', esc_url( $sign_up_url ), esc_html__( 'Add New Site' ) );
8282
}
8383

8484
if ( empty( $blogs ) ) :

src/wp-admin/network/menu.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@
5050
/* translators: Sites menu item. */
5151
$menu[5] = array( __( 'Sites' ), 'manage_sites', 'sites.php', '', 'menu-top menu-icon-site', 'menu-site', 'dashicons-admin-multisite' );
5252
$submenu['sites.php'][5] = array( __( 'All Sites' ), 'manage_sites', 'sites.php' );
53-
$submenu['sites.php'][10] = array( _x( 'Add New', 'site' ), 'create_sites', 'site-new.php' );
53+
$submenu['sites.php'][10] = array( __( 'Add New Site' ), 'create_sites', 'site-new.php' );
5454

5555
$menu[10] = array( __( 'Users' ), 'manage_network_users', 'users.php', '', 'menu-top menu-icon-users', 'menu-users', 'dashicons-admin-users' );
5656
$submenu['users.php'][5] = array( __( 'All Users' ), 'manage_network_users', 'users.php' );
57-
$submenu['users.php'][10] = array( _x( 'Add New', 'user' ), 'create_users', 'user-new.php' );
57+
$submenu['users.php'][10] = array( __( 'Add New User' ), 'create_users', 'user-new.php' );
5858

5959
if ( current_user_can( 'update_themes' ) && $update_data['counts']['themes'] ) {
6060
$menu[15] = array(
@@ -78,7 +78,7 @@
7878
$menu[15] = array( __( 'Themes' ), 'manage_network_themes', 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', 'dashicons-admin-appearance' );
7979
}
8080
$submenu['themes.php'][5] = array( __( 'Installed Themes' ), 'manage_network_themes', 'themes.php' );
81-
$submenu['themes.php'][10] = array( _x( 'Add New', 'theme' ), 'install_themes', 'theme-install.php' );
81+
$submenu['themes.php'][10] = array( __( 'Add New Theme' ), 'install_themes', 'theme-install.php' );
8282
$submenu['themes.php'][15] = array( __( 'Theme File Editor' ), 'edit_themes', 'theme-editor.php' );
8383

8484
if ( current_user_can( 'update_plugins' ) && $update_data['counts']['plugins'] ) {
@@ -103,7 +103,7 @@
103103
$menu[20] = array( __( 'Plugins' ), 'manage_network_plugins', 'plugins.php', '', 'menu-top menu-icon-plugins', 'menu-plugins', 'dashicons-admin-plugins' );
104104
}
105105
$submenu['plugins.php'][5] = array( __( 'Installed Plugins' ), 'manage_network_plugins', 'plugins.php' );
106-
$submenu['plugins.php'][10] = array( _x( 'Add New', 'plugin' ), 'install_plugins', 'plugin-install.php' );
106+
$submenu['plugins.php'][10] = array( __( 'Add New Plugin' ), 'install_plugins', 'plugin-install.php' );
107107
$submenu['plugins.php'][15] = array( __( 'Plugin File Editor' ), 'edit_plugins', 'plugin-editor.php' );
108108

109109
$menu[25] = array( __( 'Settings' ), 'manage_network_options', 'settings.php', '', 'menu-top menu-icon-settings', 'menu-settings', 'dashicons-admin-settings' );

src/wp-admin/network/sites.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@
378378
<h1 class="wp-heading-inline"><?php _e( 'Sites' ); ?></h1>
379379

380380
<?php if ( current_user_can( 'create_sites' ) ) : ?>
381-
<a href="<?php echo esc_url( network_admin_url( 'site-new.php' ) ); ?>" class="page-title-action"><?php echo esc_html_x( 'Add New', 'site' ); ?></a>
381+
<a href="<?php echo esc_url( network_admin_url( 'site-new.php' ) ); ?>" class="page-title-action"><?php echo esc_html__( 'Add New Site' ); ?></a>
382382
<?php endif; ?>
383383

384384
<?php

src/wp-admin/network/themes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@
349349
<h1 class="wp-heading-inline"><?php echo esc_html( $title ); ?></h1>
350350

351351
<?php if ( current_user_can( 'install_themes' ) ) : ?>
352-
<a href="theme-install.php" class="page-title-action"><?php echo esc_html_x( 'Add New', 'theme' ); ?></a>
352+
<a href="theme-install.php" class="page-title-action"><?php echo esc_html__( 'Add New Theme' ); ?></a>
353353
<?php endif; ?>
354354

355355
<?php

src/wp-admin/network/users.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@
289289
<?php
290290
if ( current_user_can( 'create_users' ) ) :
291291
?>
292-
<a href="<?php echo esc_url( network_admin_url( 'user-new.php' ) ); ?>" class="page-title-action"><?php echo esc_html_x( 'Add New', 'user' ); ?></a>
292+
<a href="<?php echo esc_url( network_admin_url( 'user-new.php' ) ); ?>" class="page-title-action"><?php echo esc_html__( 'Add New User' ); ?></a>
293293
<?php
294294
endif;
295295

src/wp-admin/plugins.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@
547547
'<p>' . __( 'The search for installed plugins will search for terms in their name, description, or author.' ) . ' <span id="live-search-desc" class="hide-if-no-js">' . __( 'The search results will be updated as you type.' ) . '</span></p>' .
548548
'<p>' . sprintf(
549549
/* translators: %s: WordPress Plugin Directory URL. */
550-
__( 'If you would like to see more plugins to choose from, click on the &#8220;Add New&#8221; button and you will be able to browse or search for additional plugins from the <a href="%s">WordPress Plugin Directory</a>. Plugins in the WordPress Plugin Directory are designed and developed by third parties, and are compatible with the license WordPress uses. Oh, and they&#8217;re free!' ),
550+
__( 'If you would like to see more plugins to choose from, click on the &#8220;Add New Plugin&#8221; button and you will be able to browse or search for additional plugins from the <a href="%s">WordPress Plugin Directory</a>. Plugins in the WordPress Plugin Directory are designed and developed by third parties, and are compatible with the license WordPress uses. Oh, and they&#8217;re free!' ),
551551
__( 'https://wordpress.org/plugins/' )
552552
) . '</p>',
553553
)
@@ -726,7 +726,7 @@
726726
<?php
727727
if ( ( ! is_multisite() || is_network_admin() ) && current_user_can( 'install_plugins' ) ) {
728728
?>
729-
<a href="<?php echo esc_url( self_admin_url( 'plugin-install.php' ) ); ?>" class="page-title-action"><?php echo esc_html_x( 'Add New', 'plugin' ); ?></a>
729+
<a href="<?php echo esc_url( self_admin_url( 'plugin-install.php' ) ); ?>" class="page-title-action"><?php echo esc_html__( 'Add New Plugin' ); ?></a>
730730
<?php
731731
}
732732

0 commit comments

Comments
 (0)