Make WordPress Core

Ticket #63534: 63534-link-to-label.diff

File 63534-link-to-label.diff, 1.8 KB (added by sachinrajcp123, 7 months ago)

Testing Instructions: 1. Apply the patch. 2. Register a custom post type with: 'labels' => array( 'link_to' => ( 'Link to Book' ) ) 3. Verify the label is available via REST API and used in Gutenberg UI. 4. For post types without link_to, confirm fallback label shows “Link to <singular_name>”.

  • src/wp-includes/post.php

     
    17671767                /* translators: Post type general name. */
    17681768                'name'                  => _x( 'Posts', 'post type general name' ),
    17691769                /* translators: Post type singular name. */
    1770                 'singular_name'         => _x( 'Post', 'post type singular name' ),
     1770                'singular_name'         => _x( 'Post', 'post type singular name' ),
     1771                /* translators: Label used in UI for linking to this post type. */
     1772                'link_to'               => _x( 'Link to Post', 'post type link label' ),
     1773
     1774
    17711775                /* translators: Add new post. */
    17721776                'add_new'               => _x( 'Add New', 'post' ),
    17731777                /* translators: Add new post. */
     
    18751880                /* translators: Post type general name. */
    18761881                'name'                  => _x( 'Pages', 'post type general name' ),
    18771882                /* translators: Post type singular name. */
    1878                 'singular_name'         => _x( 'Page', 'post type singular name' ),
     1883                'singular_name'         => _x( 'Page', 'post type singular name' ),
     1884                /* translators: Label used in UI for linking to this post type. */
     1885                'link_to'               => _x( 'Link to Page', 'post type link label' ),
     1886
     1887
    18791888                /* translators: Add new page. */
    18801889                'add_new'               => _x( 'Add New', 'page' ),