Twenty Fourteen: translate featured tag slug used to link to specific tags in Posts editor. See #26526.

Built from https://develop.svn.wordpress.org/trunk@27122


git-svn-id: http://core.svn.wordpress.org/trunk@26989 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Lance Willett 2014-02-07 17:47:11 +00:00
parent 513202d24f
commit c2f46ac811
2 changed files with 11 additions and 5 deletions

View File

@ -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 <a href="%1$s">tag</a> to feature your posts. If no posts match the tag, <a href="%2$s">sticky posts</a> will be displayed instead.', 'twentyfourteen' ), admin_url( '/edit.php?tag=featured' ), admin_url( '/edit.php?show_sticky=1' ) ),
'description' => sprintf( __( 'Use a <a href="%1$s">tag</a> to feature your posts. If no posts match the tag, <a href="%2$s">sticky posts</a> 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' =>
'<ul>' .
'<li>' . sprintf( __( 'The home page features your choice of up to 6 posts prominently displayed in a grid or slider, controlled by the <a href="%1$s">featured</a> tag; you can change the tag and layout in <a href="%2$s">Appearance &rarr; Customize</a>. If no posts match the tag, <a href="%3$s">sticky posts</a> will be displayed instead.', 'twentyfourteen' ), admin_url( '/edit.php?tag=featured' ), admin_url( 'customize.php' ), admin_url( '/edit.php?show_sticky=1' ) ) . '</li>' .
'<li>' . sprintf( __( 'The home page features your choice of up to 6 posts prominently displayed in a grid or slider, controlled a <a href="%1$s">tag</a>; you can change the tag and layout in <a href="%2$s">Appearance &rarr; Customize</a>. If no posts match the tag, <a href="%3$s">sticky posts</a> 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( 'customize.php' ), admin_url( 'edit.php?show_sticky=1' ) ) . '</li>' .
'<li>' . sprintf( __( 'Enhance your site design by using <a href="%s">Featured Images</a> for posts you&rsquo;d like to stand out (also known as post thumbnails). This allows you to associate an image with your post without inserting it. Twenty Fourteen uses featured images for posts and pages&mdash;above the title&mdash;and in the Featured Content area on the home page.', 'twentyfourteen' ), 'http://codex.wordpress.org/Post_Thumbnails#Setting_a_Post_Thumbnail' ) . '</li>' .
'<li>' . sprintf( __( 'For an in-depth tutorial, and more tips and tricks, visit the <a href="%s">Twenty Fourteen documentation</a>.', 'twentyfourteen' ), 'http://codex.wordpress.org/Twenty_Fourteen' ) . '</li>' .
'</ul>',

View File

@ -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 <a href="%1$s">"featured" tag</a> to feature your posts. You can change this to a tag of your choice; if no posts match the tag, <a href="%2$s">sticky posts</a> will be displayed instead.', 'twentyfourteen' ), admin_url( '/edit.php?tag=featured' ), admin_url( '/edit.php?show_sticky=1' ) ),
'description' => sprintf( __( 'Use a <a href="%1$s">tag</a> to feature your posts. You can change this to a tag of your choice; if no posts match the tag, <a href="%2$s">sticky posts</a> 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 );