diff --git a/src/wp-content/themes/twentyeleven/functions.php b/src/wp-content/themes/twentyeleven/functions.php index 7dc3bf52ef..f17bf729f3 100644 --- a/src/wp-content/themes/twentyeleven/functions.php +++ b/src/wp-content/themes/twentyeleven/functions.php @@ -79,8 +79,15 @@ if ( ! function_exists( 'twentyeleven_setup' ) ) : * If you're building a theme based on Twenty Eleven, use * a find and replace to change 'twentyeleven' to the name * of your theme in all the template files. + * + * Manual loading of text domain is not required after the introduction of + * just in time translation loading in WordPress version 4.6. + * + * @ticket 58318 */ - load_theme_textdomain( 'twentyeleven', get_template_directory() . '/languages' ); + if ( version_compare( $GLOBALS['wp_version'], '4.6', '<' ) ) { + load_theme_textdomain( 'twentyeleven', get_template_directory() . '/languages' ); + } // This theme styles the visual editor with editor-style.css to match the theme style. add_editor_style(); diff --git a/src/wp-content/themes/twentyfifteen/functions.php b/src/wp-content/themes/twentyfifteen/functions.php index 25f5a22eeb..0091b2828c 100644 --- a/src/wp-content/themes/twentyfifteen/functions.php +++ b/src/wp-content/themes/twentyfifteen/functions.php @@ -57,9 +57,17 @@ if ( ! function_exists( 'twentyfifteen_setup' ) ) : * Make theme available for translation. * Translations can be filed at WordPress.org. See: https://translate.wordpress.org/projects/wp-themes/twentyfifteen * If you're building a theme based on twentyfifteen, use a find and replace - * to change 'twentyfifteen' to the name of your theme in all the template files + * to change 'twentyfifteen' to the name of your theme in all the template files. + * + * Manual loading of text domain is not required after the introduction of + * just in time translation loading in WordPress version 4.6. + * + * @ticket 58318 */ - load_theme_textdomain( 'twentyfifteen' ); + + if ( version_compare( $GLOBALS['wp_version'], '4.6', '<' ) ) { + load_theme_textdomain( 'twentyfifteen' ); + } // Add default posts and comments RSS feed links to head. add_theme_support( 'automatic-feed-links' ); diff --git a/src/wp-content/themes/twentyfourteen/functions.php b/src/wp-content/themes/twentyfourteen/functions.php index 4441910d67..798a5fd8fa 100644 --- a/src/wp-content/themes/twentyfourteen/functions.php +++ b/src/wp-content/themes/twentyfourteen/functions.php @@ -64,8 +64,15 @@ if ( ! function_exists( 'twentyfourteen_setup' ) ) : * If you're building a theme based on Twenty Fourteen, use a find and * replace to change 'twentyfourteen' to the name of your theme in all * template files. + * + * Manual loading of text domain is not required after the introduction of + * just in time translation loading in WordPress version 4.6. + * + * @ticket 58318 */ - load_theme_textdomain( 'twentyfourteen' ); + if ( version_compare( $GLOBALS['wp_version'], '4.6', '<' ) ) { + load_theme_textdomain( 'twentyfourteen' ); + } /* * This theme styles the visual editor to resemble the theme style. diff --git a/src/wp-content/themes/twentynineteen/functions.php b/src/wp-content/themes/twentynineteen/functions.php index 99f7c21e6e..92199f09a0 100644 --- a/src/wp-content/themes/twentynineteen/functions.php +++ b/src/wp-content/themes/twentynineteen/functions.php @@ -26,13 +26,6 @@ if ( ! function_exists( 'twentynineteen_setup' ) ) : * as indicating support for post thumbnails. */ function twentynineteen_setup() { - /* - * Make theme available for translation. - * Translations can be filed in the /languages/ directory. - * If you're building a theme based on Twenty Nineteen, use a find and replace - * to change 'twentynineteen' to the name of your theme in all the template files. - */ - load_theme_textdomain( 'twentynineteen', get_template_directory() . '/languages' ); // Add default posts and comments RSS feed links to head. add_theme_support( 'automatic-feed-links' ); diff --git a/src/wp-content/themes/twentyseventeen/functions.php b/src/wp-content/themes/twentyseventeen/functions.php index 7709d63980..436e683971 100644 --- a/src/wp-content/themes/twentyseventeen/functions.php +++ b/src/wp-content/themes/twentyseventeen/functions.php @@ -25,13 +25,6 @@ if ( version_compare( $GLOBALS['wp_version'], '4.7-alpha', '<' ) ) { * as indicating support for post thumbnails. */ function twentyseventeen_setup() { - /* - * Make theme available for translation. - * Translations can be filed at WordPress.org. See: https://translate.wordpress.org/projects/wp-themes/twentyseventeen - * If you're building a theme based on Twenty Seventeen, use a find and replace - * to change 'twentyseventeen' to the name of your theme in all the template files. - */ - load_theme_textdomain( 'twentyseventeen' ); // Add default posts and comments RSS feed links to head. add_theme_support( 'automatic-feed-links' ); diff --git a/src/wp-content/themes/twentysixteen/functions.php b/src/wp-content/themes/twentysixteen/functions.php index 1125bc72bd..d66fbbad48 100644 --- a/src/wp-content/themes/twentysixteen/functions.php +++ b/src/wp-content/themes/twentysixteen/functions.php @@ -49,9 +49,16 @@ if ( ! function_exists( 'twentysixteen_setup' ) ) : * Make theme available for translation. * Translations can be filed at WordPress.org. See: https://translate.wordpress.org/projects/wp-themes/twentysixteen * If you're building a theme based on Twenty Sixteen, use a find and replace - * to change 'twentysixteen' to the name of your theme in all the template files + * to change 'twentysixteen' to the name of your theme in all the template files. + * + * Manual loading of text domain is not required after the introduction of + * just in time translation loading in WordPress version 4.6. + * + * @ticket 58318 */ - load_theme_textdomain( 'twentysixteen' ); + if ( version_compare( $GLOBALS['wp_version'], '4.6', '<' ) ) { + load_theme_textdomain( 'twentysixteen' ); + } // Add default posts and comments RSS feed links to head. add_theme_support( 'automatic-feed-links' ); diff --git a/src/wp-content/themes/twentyten/functions.php b/src/wp-content/themes/twentyten/functions.php index 8bda350d40..fa9cb12cc1 100644 --- a/src/wp-content/themes/twentyten/functions.php +++ b/src/wp-content/themes/twentyten/functions.php @@ -128,8 +128,15 @@ if ( ! function_exists( 'twentyten_setup' ) ) : /* * Make theme available for translation. * Translations can be filed in the /languages/ directory. + * + * Manual loading of text domain is not required after the introduction of + * just in time translation loading in WordPress version 4.6. + * + * @ticket 58318 */ - load_theme_textdomain( 'twentyten', get_template_directory() . '/languages' ); + if ( version_compare( $GLOBALS['wp_version'], '4.6', '<' ) ) { + load_theme_textdomain( 'twentyten', get_template_directory() . '/languages' ); + } // This theme uses wp_nav_menu() in one location. register_nav_menus( diff --git a/src/wp-content/themes/twentythirteen/functions.php b/src/wp-content/themes/twentythirteen/functions.php index 72301b4a53..5ad412971b 100644 --- a/src/wp-content/themes/twentythirteen/functions.php +++ b/src/wp-content/themes/twentythirteen/functions.php @@ -75,8 +75,15 @@ function twentythirteen_setup() { * If you're building a theme based on Twenty Thirteen, use a find and * replace to change 'twentythirteen' to the name of your theme in all * template files. + * + * Manual loading of text domain is not required after the introduction of + * just in time translation loading in WordPress version 4.6. + * + * @ticket 58318 */ - load_theme_textdomain( 'twentythirteen' ); + if ( version_compare( $GLOBALS['wp_version'], '4.6', '<' ) ) { + load_theme_textdomain( 'twentythirteen' ); + } /* * This theme styles the visual editor to resemble the theme style, diff --git a/src/wp-content/themes/twentytwelve/functions.php b/src/wp-content/themes/twentytwelve/functions.php index de535ac5f2..8021515f69 100644 --- a/src/wp-content/themes/twentytwelve/functions.php +++ b/src/wp-content/themes/twentytwelve/functions.php @@ -51,8 +51,15 @@ function twentytwelve_setup() { * Translations can be filed at WordPress.org. See: https://translate.wordpress.org/projects/wp-themes/twentytwelve * If you're building a theme based on Twenty Twelve, use a find and replace * to change 'twentytwelve' to the name of your theme in all the template files. + * + * Manual loading of text domain is not required after the introduction of + * just in time translation loading in WordPress version 4.6. + * + * @ticket 58318 */ - load_theme_textdomain( 'twentytwelve' ); + if ( version_compare( $GLOBALS['wp_version'], '4.6', '<' ) ) { + load_theme_textdomain( 'twentytwelve' ); + } // This theme styles the visual editor with editor-style.css to match the theme style. add_editor_style(); diff --git a/src/wp-content/themes/twentytwenty/functions.php b/src/wp-content/themes/twentytwenty/functions.php index b721b991e1..65085df485 100644 --- a/src/wp-content/themes/twentytwenty/functions.php +++ b/src/wp-content/themes/twentytwenty/functions.php @@ -111,14 +111,6 @@ function twentytwenty_theme_support() { ) ); - /* - * Make theme available for translation. - * Translations can be filed in the /languages/ directory. - * If you're building a theme based on Twenty Twenty, use a find and replace - * to change 'twentytwenty' to the name of your theme in all the template files. - */ - load_theme_textdomain( 'twentytwenty' ); - // Add support for full and wide align images. add_theme_support( 'align-wide' ); diff --git a/src/wp-content/themes/twentytwentyone/functions.php b/src/wp-content/themes/twentytwentyone/functions.php index 3279c66e71..ff8c958be7 100644 --- a/src/wp-content/themes/twentytwentyone/functions.php +++ b/src/wp-content/themes/twentytwentyone/functions.php @@ -27,13 +27,6 @@ if ( ! function_exists( 'twenty_twenty_one_setup' ) ) { * @return void */ function twenty_twenty_one_setup() { - /* - * Make theme available for translation. - * Translations can be filed in the /languages/ directory. - * If you're building a theme based on Twenty Twenty-One, use a find and replace - * to change 'twentytwentyone' to the name of your theme in all the template files. - */ - load_theme_textdomain( 'twentytwentyone', get_template_directory() . '/languages' ); // Add default posts and comments RSS feed links to head. add_theme_support( 'automatic-feed-links' );