Make WordPress Core


Ignore:
Timestamp:
06/20/2015 07:49:43 PM (7 years ago)
Author:
ocean90
Message:

Customizer: Improve handling of posts with no title.

Use the #%d (no title) string as a fallback which is already used on the nav menus screen.
Add a translator comment to all occurrences of the #%d (no title) string.

see #32576.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/nav-menu.php

    r32764 r32892  
    703703
    704704                if ( '' === $original_title ) {
     705                    /* translators: %d: ID of a post */
    705706                    $original_title = sprintf( __( '#%d (no title)' ), $original_object->ID );
    706707                }
     
    765766            $menu_item->type_label = $object->labels->singular_name;
    766767
    767             if ( '' === $menu_item->post_title )
     768            if ( '' === $menu_item->post_title ) {
     769                /* translators: %d: ID of a post */
    768770                $menu_item->post_title = sprintf( __( '#%d (no title)' ), $menu_item->ID );
     771            }
    769772
    770773            $menu_item->title = $menu_item->post_title;
Note: See TracChangeset for help on using the changeset viewer.