From 9ddb14eb9728fcdc4c528304b5a09a39be494abc Mon Sep 17 00:00:00 2001 From: Lance Willett Date: Fri, 7 Feb 2014 17:46:46 +0000 Subject: [PATCH] Twenty Fourteen: translate `featured` tag slug used to link to specific tags in Posts editor. See #26526. git-svn-id: https://develop.svn.wordpress.org/trunk@27122 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-content/themes/twentyfourteen/inc/customizer.php | 7 +++++-- .../themes/twentyfourteen/inc/featured-content.php | 9 ++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/wp-content/themes/twentyfourteen/inc/customizer.php b/src/wp-content/themes/twentyfourteen/inc/customizer.php index 37a3755294..c1dd4034b1 100644 --- a/src/wp-content/themes/twentyfourteen/inc/customizer.php +++ b/src/wp-content/themes/twentyfourteen/inc/customizer.php @@ -33,7 +33,10 @@ function twentyfourteen_customize_register( $wp_customize ) { // Add the featured content section in case it's not already there. $wp_customize->add_section( 'featured_content', array( 'title' => __( 'Featured Content', 'twentyfourteen' ), - 'description' => sprintf( __( 'Use a tag to feature your posts. If no posts match the tag, sticky posts will be displayed instead.', 'twentyfourteen' ), admin_url( '/edit.php?tag=featured' ), admin_url( '/edit.php?show_sticky=1' ) ), + 'description' => sprintf( __( 'Use a tag to feature your posts. If no posts match the tag, sticky posts will be displayed instead.', 'twentyfourteen' ), + esc_url( add_query_arg( 'tag', _x( 'featured', 'featured content default tag slug', 'twentyfourteen' ), admin_url( 'edit.php' ) ) ), + admin_url( 'edit.php?show_sticky=1' ) + ), 'priority' => 130, ) ); @@ -98,7 +101,7 @@ function twentyfourteen_contextual_help() { 'title' => __( 'Twenty Fourteen', 'twentyfourteen' ), 'content' => '', diff --git a/src/wp-content/themes/twentyfourteen/inc/featured-content.php b/src/wp-content/themes/twentyfourteen/inc/featured-content.php index 5c359a2e22..514187ab9c 100644 --- a/src/wp-content/themes/twentyfourteen/inc/featured-content.php +++ b/src/wp-content/themes/twentyfourteen/inc/featured-content.php @@ -409,14 +409,17 @@ class Featured_Content { public static function customize_register( $wp_customize ) { $wp_customize->add_section( 'featured_content', array( 'title' => __( 'Featured Content', 'twentyfourteen' ), - 'description' => sprintf( __( 'Use the "featured" tag to feature your posts. You can change this to a tag of your choice; if no posts match the tag, sticky posts will be displayed instead.', 'twentyfourteen' ), admin_url( '/edit.php?tag=featured' ), admin_url( '/edit.php?show_sticky=1' ) ), + 'description' => sprintf( __( 'Use a tag to feature your posts. You can change this to a tag of your choice; if no posts match the tag, sticky posts will be displayed instead.', 'twentyfourteen' ), + esc_url( add_query_arg( 'tag', _x( 'featured', 'featured content default tag slug', 'twentyfourteen' ), admin_url( 'edit.php' ) ) ), + admin_url( 'edit.php?show_sticky=1' ) + ), 'priority' => 130, 'theme_supports' => 'featured-content', ) ); // Add Featured Content settings. $wp_customize->add_setting( 'featured-content[tag-name]', array( - 'default' => 'featured', + 'default' => _x( 'featured', 'featured content default tag slug', 'twentyfourteen' ), 'type' => 'option', 'sanitize_js_callback' => array( __CLASS__, 'delete_transient' ), ) ); @@ -476,7 +479,7 @@ class Featured_Content { $defaults = array( 'hide-tag' => 1, 'tag-id' => 0, - 'tag-name' => 'featured', + 'tag-name' => _x( 'featured', 'featured content default tag slug', 'twentyfourteen' ), ); $options = wp_parse_args( $saved, $defaults );