diff --git a/wp-includes/class-wp-customize-nav-menus.php b/wp-includes/class-wp-customize-nav-menus.php index b15269d68b..0c4fb6f852 100644 --- a/wp-includes/class-wp-customize-nav-menus.php +++ b/wp-includes/class-wp-customize-nav-menus.php @@ -109,9 +109,14 @@ final class WP_Customize_Nav_Menus { 'post_type' => $taxonomy_or_post_type, ) ); foreach ( $posts as $post ) { + $post_title = $post->post_title; + if ( '' === $post_title ) { + /* translators: %d: ID of a post */ + $post_title = sprintf( __( '#%d (no title)' ), $post->ID ); + } $items[] = array( 'id' => "post-{$post->ID}", - 'title' => html_entity_decode( get_the_title( $post ), ENT_QUOTES, get_bloginfo( 'charset' ) ), + 'title' => html_entity_decode( $post_title, ENT_QUOTES, get_bloginfo( 'charset' ) ), 'type' => 'post_type', 'type_label' => get_post_type_object( $post->post_type )->labels->singular_name, 'object' => $post->post_type, @@ -216,13 +221,18 @@ final class WP_Customize_Nav_Menus { // Check if any posts were found. if ( $get_posts->post_count ) { foreach ( $get_posts->posts as $post ) { + $post_title = $post->post_title; + if ( '' === $post_title ) { + /* translators: %d: ID of a post */ + $post_title = sprintf( __( '#%d (no title)' ), $post->ID ); + } $results[] = array( 'id' => 'post-' . $post->ID, 'type' => 'post_type', 'type_label' => $post_type_objects[ $post->post_type ]->labels->singular_name, 'object' => $post->post_type, 'object_id' => intval( $post->ID ), - 'title' => html_entity_decode( get_the_title( $post ), ENT_QUOTES, get_bloginfo( 'charset' ) ), + 'title' => html_entity_decode( $post_title, ENT_QUOTES, get_bloginfo( 'charset' ) ), ); } } @@ -270,7 +280,7 @@ final class WP_Customize_Nav_Menus { 'allMenus' => wp_get_nav_menus(), 'itemTypes' => $this->available_item_types(), 'l10n' => array( - 'untitled' => _x( '(no label)', 'Missing menu item navigation label.' ), + 'untitled' => _x( '(no label)', 'missing menu item navigation label' ), 'custom_label' => __( 'Custom Link' ), /* translators: %s: Current menu location */ 'menuLocation' => __( '(Currently set to: %s)' ), diff --git a/wp-includes/nav-menu.php b/wp-includes/nav-menu.php index 578bf23e62..d255859190 100644 --- a/wp-includes/nav-menu.php +++ b/wp-includes/nav-menu.php @@ -702,6 +702,7 @@ function wp_setup_nav_menu_item( $menu_item ) { $original_title = $original_object->post_title; if ( '' === $original_title ) { + /* translators: %d: ID of a post */ $original_title = sprintf( __( '#%d (no title)' ), $original_object->ID ); } @@ -764,8 +765,10 @@ function wp_setup_nav_menu_item( $menu_item ) { $menu_item->object = $object->name; $menu_item->type_label = $object->labels->singular_name; - if ( '' === $menu_item->post_title ) + if ( '' === $menu_item->post_title ) { + /* translators: %d: ID of a post */ $menu_item->post_title = sprintf( __( '#%d (no title)' ), $menu_item->ID ); + } $menu_item->title = $menu_item->post_title; $menu_item->url = get_permalink( $menu_item->ID ); diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index f190ad0b9f..1b4901cc92 100644 --- a/wp-includes/post-template.php +++ b/wp-includes/post-template.php @@ -1418,6 +1418,7 @@ class Walker_Page extends Walker { $css_classes = implode( ' ', apply_filters( 'page_css_class', $css_class, $page, $depth, $args, $current_page ) ); if ( '' === $page->post_title ) { + /* translators: %d: ID of a post */ $page->post_title = sprintf( __( '#%d (no title)' ), $page->ID ); } @@ -1508,6 +1509,7 @@ class Walker_PageDropdown extends Walker { $title = $page->post_title; if ( '' === $title ) { + /* translators: %d: ID of a post */ $title = sprintf( __( '#%d (no title)' ), $page->ID ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index 229cbb74a4..14e95206b3 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.3-alpha-32891'; +$wp_version = '4.3-alpha-32892'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.