Make WordPress Core

Ticket #26526: 26526.diff

File 26526.diff, 3.1 KB (added by lancewillett, 11 years ago)

Translate the featured tag with added context

  • wp-content/themes/twentyfourteen/inc/customizer.php

     
    3333        // Add the featured content section in case it's not already there.
    3434        $wp_customize->add_section( 'featured_content', array(
    3535                'title'       => __( 'Featured Content', 'twentyfourteen' ),
    36                 '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' ) ),
     36                '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' ),
     37                        esc_url( admin_url( '/edit.php?tag=' ) . _x( 'featured', 'featured content default tag', 'twentyfourteen' ) ),
     38                        admin_url( '/edit.php?show_sticky=1' )
     39                ),
    3740                'priority'    => 130,
    3841        ) );
    3942
  • wp-content/themes/twentyfourteen/inc/featured-content.php

     
    406406        public static function customize_register( $wp_customize ) {
    407407                $wp_customize->add_section( 'featured_content', array(
    408408                        'title'          => __( 'Featured Content', 'twentyfourteen' ),
    409                         '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' ) ),
     409                        'description'    => sprintf( __( 'Use the <a href="%1$s">$2$s</a> tag to feature your posts. You can change this to a tag of your choice; if no posts match the tag, <a href="%3$s">sticky posts</a> will be displayed instead.', 'twentyfourteen' ),
     410                                esc_url( admin_url( '/edit.php?tag=' ) . _x( 'featured', 'featured content default tag', 'twentyfourteen' ) ),
     411                                _x( 'featured', 'featured content default tag', 'twentyfourteen' ),
     412                                admin_url( '/edit.php?show_sticky=1' )
     413                        ),
    410414                        'priority'       => 130,
    411415                        'theme_supports' => 'featured-content',
    412416                ) );
     
    413417
    414418                // Add Featured Content settings.
    415419                $wp_customize->add_setting( 'featured-content[tag-name]', array(
    416                         'default'              => 'featured',
     420                        'default'              => _x( 'featured', 'featured content default tag', 'twentyfourteen' ),
    417421                        'type'                 => 'option',
    418422                        'sanitize_js_callback' => array( __CLASS__, 'delete_transient' ),
    419423                ) );
     
    474478                        'hide-tag' => 1,
    475479                        'quantity' => 6,
    476480                        'tag-id'   => 0,
    477                         'tag-name' => 'featured',
     481                        'tag-name' => _x( 'featured', 'featured content default tag', 'twentyfourteen' ),
    478482                );
    479483
    480484                $options = wp_parse_args( $saved, $defaults );