Make WordPress Core

Changeset 56515


Ignore:
Timestamp:
09/05/2023 07:24:31 PM (10 months ago)
Author:
joedolson
Message:

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.

Location:
trunk/src
Files:
17 edited

Legend:

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

    r55751 r56515  
    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">
  • trunk/src/wp-admin/includes/template.php

    r56441 r56515  
    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
  • trunk/src/wp-admin/link-manager.php

    r55412 r56515  
    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
  • trunk/src/wp-admin/menu.php

    r56302 r56515  
    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;
    7170foreach ( get_taxonomies_for_attachments( 'objects' ) as $tax ) {
     
    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
     
    305303
    306304if ( ! 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.
     
    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
  • trunk/src/wp-admin/my-sites.php

    r56409 r56515  
    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
  • trunk/src/wp-admin/network/menu.php

    r52406 r56515  
    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
    5959if ( current_user_can( 'update_themes' ) && $update_data['counts']['themes'] ) {
     
    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
     
    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
  • trunk/src/wp-admin/network/sites.php

    r56409 r56515  
    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
  • trunk/src/wp-admin/network/themes.php

    r56409 r56515  
    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
  • trunk/src/wp-admin/network/users.php

    r56409 r56515  
    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;
  • trunk/src/wp-admin/plugins.php

    r55414 r56515  
    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>',
     
    727727if ( ( ! 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}
  • trunk/src/wp-admin/themes.php

    r56059 r56515  
    154154        $help_install = '<p>' . sprintf(
    155155            /* translators: %s: https://wordpress.org/themes/ */
    156             __( 'If you would like to see more themes to choose from, click on the &#8220;Add New&#8221; button and you will be able to browse or search for additional themes from the <a href="%s">WordPress Theme Directory</a>. Themes in the WordPress Theme Directory are designed and developed by third parties, and are compatible with the license WordPress uses. Oh, and they&#8217;re free!' ),
     156            __( 'If you would like to see more themes to choose from, click on the &#8220;Add New Theme&#8221; button and you will be able to browse or search for additional themes from the <a href="%s">WordPress Theme Directory</a>. Themes in the WordPress Theme Directory are designed and developed by third parties, and are compatible with the license WordPress uses. Oh, and they&#8217;re free!' ),
    157157            __( 'https://wordpress.org/themes/' )
    158158        ) . '</p>';
     
    253253
    254254    <?php if ( ! is_multisite() && current_user_can( 'install_themes' ) ) : ?>
    255         <a href="<?php echo esc_url( admin_url( 'theme-install.php' ) ); ?>" class="hide-if-no-js page-title-action"><?php echo esc_html_x( 'Add New', 'theme' ); ?></a>
     255        <a href="<?php echo esc_url( admin_url( 'theme-install.php' ) ); ?>" class="hide-if-no-js page-title-action"><?php echo esc_html__( 'Add New Theme' ); ?></a>
    256256    <?php endif; ?>
    257257
  • trunk/src/wp-admin/upload.php

    r55988 r56515  
    212212        if ( current_user_can( 'upload_files' ) ) {
    213213            ?>
    214             <a href="<?php echo esc_url( admin_url( 'media-new.php' ) ); ?>" class="page-title-action aria-button-if-js"><?php echo esc_html_x( 'Add New', 'file' ); ?></a>
     214            <a href="<?php echo esc_url( admin_url( 'media-new.php' ) ); ?>" class="page-title-action aria-button-if-js"><?php echo esc_html__( 'Add New Media File' ); ?></a>
    215215            <?php
    216216        }
     
    410410if ( current_user_can( 'upload_files' ) ) {
    411411    ?>
    412     <a href="<?php echo esc_url( admin_url( 'media-new.php' ) ); ?>" class="page-title-action"><?php echo esc_html_x( 'Add New', 'file' ); ?></a>
     412    <a href="<?php echo esc_url( admin_url( 'media-new.php' ) ); ?>" class="page-title-action"><?php echo esc_html__( 'Add New Media File' ); ?></a>
    413413                        <?php
    414414}
  • trunk/src/wp-admin/user-edit.php

    r56175 r56515  
    239239            <?php if ( ! IS_PROFILE_PAGE ) : ?>
    240240                <?php if ( current_user_can( 'create_users' ) ) : ?>
    241                     <a href="user-new.php" class="page-title-action"><?php echo esc_html_x( 'Add New', 'user' ); ?></a>
     241                    <a href="user-new.php" class="page-title-action"><?php echo esc_html__( 'Add New User' ); ?></a>
    242242                <?php elseif ( is_multisite() && current_user_can( 'promote_users' ) ) : ?>
    243                     <a href="user-new.php" class="page-title-action"><?php echo esc_html_x( 'Add Existing', 'user' ); ?></a>
     243                    <a href="user-new.php" class="page-title-action"><?php echo esc_html__( 'Add Existing User' ); ?></a>
    244244                <?php endif; ?>
    245245            <?php endif; ?>
  • trunk/src/wp-admin/users.php

    r55878 r56515  
    695695                '<a href="%1$s" class="page-title-action">%2$s</a>',
    696696                esc_url( admin_url( 'user-new.php' ) ),
    697                 esc_html_x( 'Add New', 'user' )
     697                esc_html__( 'Add New User' )
    698698            );
    699699        } elseif ( is_multisite() && current_user_can( 'promote_users' ) ) {
     
    701701                '<a href="%1$s" class="page-title-action">%2$s</a>',
    702702                esc_url( admin_url( 'user-new.php' ) ),
    703                 esc_html_x( 'Add Existing', 'user' )
     703                esc_html__( 'Add Existing User' )
    704704            );
    705705        }
  • trunk/src/wp-includes/class-wp-post-type.php

    r55988 r56515  
    832832            'name'                     => array( _x( 'Posts', 'post type general name' ), _x( 'Pages', 'post type general name' ) ),
    833833            'singular_name'            => array( _x( 'Post', 'post type singular name' ), _x( 'Page', 'post type singular name' ) ),
    834             'add_new'                  => array( _x( 'Add New', 'post' ), _x( 'Add New', 'page' ) ),
     834            'add_new'                  => array( __( 'Add New Post' ), __( 'Add New Page' ) ),
    835835            'add_new_item'             => array( __( 'Add New Post' ), __( 'Add New Page' ) ),
    836836            'edit_item'                => array( __( 'Edit Post' ), __( 'Edit Page' ) ),
  • trunk/src/wp-includes/customize/class-wp-customize-header-image-control.php

    r55276 r56515  
    214214                <?php
    215215                if ( current_theme_supports( 'custom-header', 'video' ) ) {
    216                     _e( 'Click &#8220;Add new image&#8221; to upload an image file from your computer. Your theme works best with an image that matches the size of your video &#8212; you&#8217;ll be able to crop your image once you upload it for a perfect fit.' );
     216                    _e( 'Click &#8220;Add New Image&#8221; to upload an image file from your computer. Your theme works best with an image that matches the size of your video &#8212; you&#8217;ll be able to crop your image once you upload it for a perfect fit.' );
    217217                } elseif ( $width && $height ) {
    218218                    printf(
    219219                        /* translators: %s: Header size in pixels. */
    220                         __( 'Click &#8220;Add new image&#8221; to upload an image file from your computer. Your theme works best with an image with a header size of %s pixels &#8212; you&#8217;ll be able to crop your image once you upload it for a perfect fit.' ),
     220                        __( 'Click &#8220;Add New Image&#8221; to upload an image file from your computer. Your theme works best with an image with a header size of %s pixels &#8212; you&#8217;ll be able to crop your image once you upload it for a perfect fit.' ),
    221221                        sprintf( '<strong>%s &times; %s</strong>', $width, $height )
    222222                    );
     
    224224                    printf(
    225225                        /* translators: %s: Header width in pixels. */
    226                         __( 'Click &#8220;Add new image&#8221; to upload an image file from your computer. Your theme works best with an image with a header width of %s pixels &#8212; you&#8217;ll be able to crop your image once you upload it for a perfect fit.' ),
     226                        __( 'Click &#8220;Add New Image&#8221; to upload an image file from your computer. Your theme works best with an image with a header width of %s pixels &#8212; you&#8217;ll be able to crop your image once you upload it for a perfect fit.' ),
    227227                        sprintf( '<strong>%s</strong>', $width )
    228228                    );
     
    230230                    printf(
    231231                        /* translators: %s: Header height in pixels. */
    232                         __( 'Click &#8220;Add new image&#8221; to upload an image file from your computer. Your theme works best with an image with a header height of %s pixels &#8212; you&#8217;ll be able to crop your image once you upload it for a perfect fit.' ),
     232                        __( 'Click &#8220;Add New Image&#8221; to upload an image file from your computer. Your theme works best with an image with a header height of %s pixels &#8212; you&#8217;ll be able to crop your image once you upload it for a perfect fit.' ),
    233233                        sprintf( '<strong>%s</strong>', $height )
    234234                    );
     
    248248                <?php if ( current_user_can( 'upload_files' ) ) : ?>
    249249                <button type="button"<?php echo $visibility; ?> class="button remove" aria-label="<?php esc_attr_e( 'Hide header image' ); ?>"><?php _e( 'Hide image' ); ?></button>
    250                 <button type="button" class="button new" id="header_image-button" aria-label="<?php esc_attr_e( 'Add new header image' ); ?>"><?php _e( 'Add new image' ); ?></button>
     250                <button type="button" class="button new" id="header_image-button" aria-label="<?php esc_attr_e( 'Add New Header Image' ); ?>"><?php _e( 'Add New Image' ); ?></button>
    251251                <?php endif; ?>
    252252            </div>
  • trunk/src/wp-includes/post.php

    r56491 r56515  
    7676                'name'           => _x( 'Media', 'post type general name' ),
    7777                'name_admin_bar' => _x( 'Media', 'add new from admin bar' ),
    78                 'add_new'        => _x( 'Add New', 'file' ),
     78                'add_new'        => __( 'Add New Media File' ),
    7979                'edit_item'      => __( 'Edit Media' ),
    8080                'view_item'      => __( 'View Attachment Page' ),
     
    203203                'name'               => _x( 'Changesets', 'post type general name' ),
    204204                'singular_name'      => _x( 'Changeset', 'post type singular name' ),
    205                 'add_new'            => _x( 'Add New', 'Customize Changeset' ),
     205                'add_new'            => __( 'Add New Changeset' ),
    206206                'add_new_item'       => __( 'Add New Changeset' ),
    207207                'new_item'           => __( 'New Changeset' ),
     
    285285                'name'                     => _x( 'Patterns', 'post type general name' ),
    286286                'singular_name'            => _x( 'Pattern', 'post type singular name' ),
    287                 'add_new'                  => _x( 'Add New', 'Pattern' ),
    288                 'add_new_item'             => __( 'Add new Pattern' ),
     287                'add_new'                  => __( 'Add New Pattern' ),
     288                'add_new_item'             => __( 'Add New Pattern' ),
    289289                'new_item'                 => __( 'New Pattern' ),
    290290                'edit_item'                => __( 'Edit Block Pattern' ),
     
    348348                'name'                  => _x( 'Templates', 'post type general name' ),
    349349                'singular_name'         => _x( 'Template', 'post type singular name' ),
    350                 'add_new'               => _x( 'Add New', 'Template' ),
     350                'add_new'               => __( 'Add New Template' ),
    351351                'add_new_item'          => __( 'Add New Template' ),
    352352                'new_item'              => __( 'New Template' ),
     
    409409                'name'                  => _x( 'Template Parts', 'post type general name' ),
    410410                'singular_name'         => _x( 'Template Part', 'post type singular name' ),
    411                 'add_new'               => _x( 'Add New', 'Template Part' ),
     411                'add_new'               => __( 'Add New Template Part' ),
    412412                'add_new_item'          => __( 'Add New Template Part' ),
    413413                'new_item'              => __( 'New Template Part' ),
     
    506506                'name'                  => _x( 'Navigation Menus', 'post type general name' ),
    507507                'singular_name'         => _x( 'Navigation Menu', 'post type singular name' ),
    508                 'add_new'               => _x( 'Add New', 'Navigation Menu' ),
     508                'add_new'               => __( 'Add New Navigation Menu' ),
    509509                'add_new_item'          => __( 'Add New Navigation Menu' ),
    510510                'new_item'              => __( 'New Navigation Menu' ),
     
    19321932 *          by `$post_type_object->label`. Default is 'Posts' / 'Pages'.
    19331933 * - `singular_name` - Name for one object of this post type. Default is 'Post' / 'Page'.
    1934  * - `add_new` - Default is 'Add New' for both hierarchical and non-hierarchical types.
     1934 * - `add_new` - Default is 'Add New Type' for both hierarchical and non-hierarchical types.
    19351935 *             When internationalizing this string, please use a {@link https://developer.wordpress.org/plugins/internationalization/how-to-internationalize-your-plugin/#disambiguation-by-context gettext context}
    1936  *             matching your post type. Example: `_x( 'Add New', 'product', 'textdomain' );`.
     1936 *             matching your post type. Example: `__( 'Add New Product', 'textdomain' );`.
    19371937 * - `add_new_item` - Label for adding a new singular item. Default is 'Add New Post' / 'Add New Page'.
    19381938 * - `edit_item` - Label for editing a singular item. Default is 'Edit Post' / 'Edit Page'.
Note: See TracChangeset for help on using the changeset viewer.