Twenty Fourteen: allow slider "Previous" and "Next" labels to be translated, props michahwave. Fixes #25897.
Built from https://develop.svn.wordpress.org/trunk@26071 git-svn-id: http://core.svn.wordpress.org/trunk@25991 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
5bb8d78e07
commit
8e0733a6c7
|
@ -235,8 +235,13 @@ function twentyfourteen_scripts() {
|
|||
if ( is_active_sidebar( 'sidebar-3' ) )
|
||||
wp_enqueue_script( 'jquery-masonry' );
|
||||
|
||||
if ( is_front_page() && 'slider' == get_theme_mod( 'featured_content_layout' ) )
|
||||
wp_enqueue_script( 'twentyfourteen-slider', get_template_directory_uri() . '/js/slider.js', array( 'jquery' ), '20131028', true );
|
||||
if ( is_front_page() && 'slider' == get_theme_mod( 'featured_content_layout' ) ) {
|
||||
wp_enqueue_script( 'twentyfourteen-slider', get_template_directory_uri() . '/js/slider.js', array( 'jquery' ), '20131109', true );
|
||||
wp_localize_script( 'twentyfourteen-slider', 'featuredSliderDefaults', array(
|
||||
'prevText' => __( 'Previous', 'twentyfourteen' ),
|
||||
'nextText' => __( 'Next', 'twentyfourteen' )
|
||||
) );
|
||||
}
|
||||
|
||||
wp_enqueue_script( 'twentyfourteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20131102', true );
|
||||
}
|
||||
|
|
|
@ -546,9 +546,9 @@
|
|||
animationSpeed: 600, // Integer: Set the speed of animations, in milliseconds.
|
||||
controlsContainer: '', // jQuery Object/Selector: container navigation to append elements.
|
||||
|
||||
// Text labels: @todo allow translation
|
||||
prevText: 'Previous', // String: Set the text for the "previous" directionNav item.
|
||||
nextText: 'Next' // String: Set the text for the "next" directionNav item.
|
||||
// Text labels.
|
||||
prevText: featuredSliderDefaults.prevText, // String: Set the text for the "previous" directionNav item.
|
||||
nextText: featuredSliderDefaults.nextText // String: Set the text for the "next" directionNav item.
|
||||
};
|
||||
|
||||
// FeaturedSlider: plugin function.
|
||||
|
|
Loading…
Reference in New Issue