From 1351a9105fd96050ae336c5669b2b3abc99a697c Mon Sep 17 00:00:00 2001 From: arthur Date: Wed, 31 Aug 2022 17:26:59 +0800 Subject: [PATCH 1/7] Add the load_theme_textdomain function call --- archeo/functions.php | 2 ++ disco/functions.php | 2 ++ geologist-blue/functions.php | 27 +++++++++++++++++++++++++++ geologist-cream/functions.php | 27 +++++++++++++++++++++++++++ geologist-slate/functions.php | 27 +++++++++++++++++++++++++++ geologist-yellow/functions.php | 27 +++++++++++++++++++++++++++ geologist/functions.php | 27 +++++++++++++++++++++++++++ livro/functions.php | 2 ++ pendant/functions.php | 3 +++ quadrat-black/functions.php | 3 +++ quadrat-green/functions.php | 3 +++ quadrat-red/functions.php | 3 +++ quadrat-white/functions.php | 3 +++ quadrat-yellow/functions.php | 3 +++ quadrat/functions.php | 3 +++ remote/functions.php | 2 ++ skatepark/functions.php | 2 ++ stewart/functions.php | 2 ++ videomaker-white/functions.php | 7 +++++-- videomaker/functions.php | 7 +++++-- vivre/functions.php | 2 ++ 21 files changed, 180 insertions(+), 4 deletions(-) create mode 100644 geologist-blue/functions.php create mode 100644 geologist-cream/functions.php create mode 100644 geologist-slate/functions.php create mode 100644 geologist-yellow/functions.php create mode 100644 geologist/functions.php diff --git a/archeo/functions.php b/archeo/functions.php index 2900a3de73..2acd8af4d9 100644 --- a/archeo/functions.php +++ b/archeo/functions.php @@ -19,6 +19,8 @@ * @return void */ function archeo_support() { + // Make theme available for translation. + load_theme_textdomain( 'archeo', get_template_directory() . '/languages' ); // Add support for block styles. add_theme_support( 'wp-block-styles' ); diff --git a/disco/functions.php b/disco/functions.php index 6b340bc45c..50ba99a589 100644 --- a/disco/functions.php +++ b/disco/functions.php @@ -19,6 +19,8 @@ * @return void */ function disco_support() { + // Make theme available for translation. + load_theme_textdomain( 'disco', get_template_directory() . '/languages' ); // Enqueue editor styles. add_editor_style( 'style.css' ); diff --git a/geologist-blue/functions.php b/geologist-blue/functions.php new file mode 100644 index 0000000000..a9f23af64b --- /dev/null +++ b/geologist-blue/functions.php @@ -0,0 +1,27 @@ + Date: Thu, 1 Sep 2022 09:59:52 +0800 Subject: [PATCH 2/7] Fix incorrect domain --- vivre/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vivre/functions.php b/vivre/functions.php index ebeb157910..c837213fa6 100644 --- a/vivre/functions.php +++ b/vivre/functions.php @@ -20,7 +20,7 @@ */ function vivre_support() { // Make theme available for translation. - load_theme_textdomain( 'stewart', get_template_directory() . '/languages' ); + load_theme_textdomain( 'vivre', get_template_directory() . '/languages' ); // Enqueue editor styles. add_editor_style( 'style.css' ); From f4b87945b45f37ad360a08e9292881e2c5f7b3c3 Mon Sep 17 00:00:00 2001 From: arthur Date: Wed, 14 Sep 2022 16:45:15 +0800 Subject: [PATCH 3/7] Load blockbase translations --- blockbase/functions.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/blockbase/functions.php b/blockbase/functions.php index 02423118e1..b16e731bc8 100644 --- a/blockbase/functions.php +++ b/blockbase/functions.php @@ -1,6 +1,9 @@ Date: Mon, 17 Oct 2022 11:02:17 -0400 Subject: [PATCH 4/7] Moved all calls to load_theme_textdomain to be handled by Blockbase (not the children) --- blockbase/functions.php | 7 +++++-- geologist-blue/functions.php | 27 --------------------------- geologist-cream/functions.php | 27 --------------------------- geologist-slate/functions.php | 27 --------------------------- geologist-yellow/functions.php | 27 --------------------------- geologist/functions.php | 27 --------------------------- quadrat-black/functions.php | 3 --- quadrat-green/functions.php | 3 --- quadrat-red/functions.php | 3 --- quadrat-white/functions.php | 3 --- quadrat-yellow/functions.php | 3 --- quadrat/functions.php | 3 --- videomaker-white/functions.php | 7 ++----- videomaker/functions.php | 7 ++----- 14 files changed, 9 insertions(+), 165 deletions(-) delete mode 100644 geologist-blue/functions.php delete mode 100644 geologist-cream/functions.php delete mode 100644 geologist-slate/functions.php delete mode 100644 geologist-yellow/functions.php delete mode 100644 geologist/functions.php diff --git a/blockbase/functions.php b/blockbase/functions.php index b16e731bc8..0629802670 100644 --- a/blockbase/functions.php +++ b/blockbase/functions.php @@ -2,7 +2,10 @@ if ( ! function_exists( 'blockbase_support' ) ) : function blockbase_support() { // Make theme available for translation. - load_theme_textdomain( 'blockbase', get_template_directory() . '/languages' ); + load_theme_textdomain( 'blockbase' ); + if ( ! 'blockbase' === wp_get_theme()->get( 'TextDomain' ) ) { + load_theme_textdomain( wp_get_theme()->get( 'TextDomain' ) ); + } // Alignwide and alignfull classes in the block editor. add_theme_support( 'align-wide' ); @@ -26,7 +29,7 @@ function blockbase_support() { // Enqueue editor styles. add_editor_style( array( - '/assets/ponyfill.css' + '/assets/ponyfill.css', ) ); diff --git a/geologist-blue/functions.php b/geologist-blue/functions.php deleted file mode 100644 index a9f23af64b..0000000000 --- a/geologist-blue/functions.php +++ /dev/null @@ -1,27 +0,0 @@ - __( 'Primary Navigation', 'videomaker' ), - 'social' => __( 'Social Navigation', 'videomaker' ), - 'footer' => __( 'Footer Navigation', 'videomaker' ) + 'social' => __( 'Social Navigation', 'videomaker' ), + 'footer' => __( 'Footer Navigation', 'videomaker' ), ) ); } diff --git a/videomaker/functions.php b/videomaker/functions.php index 403d3b3c91..2333da0f53 100644 --- a/videomaker/functions.php +++ b/videomaker/functions.php @@ -4,15 +4,12 @@ * Add Editor Styles */ function videomaker_support() { - // Make theme available for translation. - load_theme_textdomain( 'videomaker', get_template_directory() . '/languages' ); - // Primary navigation is used on the header and the footer pattern register_nav_menus( array( 'primary' => __( 'Primary Navigation', 'videomaker' ), - 'social' => __( 'Social Navigation', 'videomaker' ), - 'footer' => __( 'Footer Navigation', 'videomaker' ) + 'social' => __( 'Social Navigation', 'videomaker' ), + 'footer' => __( 'Footer Navigation', 'videomaker' ), ) ); } From c58bb6671b56e139b93c4b3118a364bc8cdde023 Mon Sep 17 00:00:00 2001 From: Jason Crist Date: Mon, 17 Oct 2022 11:09:30 -0400 Subject: [PATCH 5/7] Refactored calls to load_theme_textdomain to not include the default location to simplify the call --- archeo/functions.php | 2 +- disco/functions.php | 2 +- livro/functions.php | 8 ++++---- loudness/functions.php | 2 ++ pendant/functions.php | 2 +- pixl/functions.php | 2 ++ rainfall/functions.php | 3 +++ remote/functions.php | 2 +- skatepark/functions.php | 2 +- stewart/functions.php | 2 +- vivre/functions.php | 2 +- 11 files changed, 18 insertions(+), 11 deletions(-) diff --git a/archeo/functions.php b/archeo/functions.php index 2acd8af4d9..8205c8f295 100644 --- a/archeo/functions.php +++ b/archeo/functions.php @@ -20,7 +20,7 @@ */ function archeo_support() { // Make theme available for translation. - load_theme_textdomain( 'archeo', get_template_directory() . '/languages' ); + load_theme_textdomain( 'archeo' ); // Add support for block styles. add_theme_support( 'wp-block-styles' ); diff --git a/disco/functions.php b/disco/functions.php index 50ba99a589..1bdca533aa 100644 --- a/disco/functions.php +++ b/disco/functions.php @@ -20,7 +20,7 @@ */ function disco_support() { // Make theme available for translation. - load_theme_textdomain( 'disco', get_template_directory() . '/languages' ); + load_theme_textdomain( 'disco' ); // Enqueue editor styles. add_editor_style( 'style.css' ); diff --git a/livro/functions.php b/livro/functions.php index 7bf9b861c9..f504f5b06c 100644 --- a/livro/functions.php +++ b/livro/functions.php @@ -20,7 +20,7 @@ */ function livro_support() { // Make theme available for translation. - load_theme_textdomain( 'livro', get_template_directory() . '/languages' ); + load_theme_textdomain( 'livro' ); // Add support for block styles. add_theme_support( 'wp-block-styles' ); @@ -77,9 +77,9 @@ function livro_register_block_pattern_categories() { //Needed until https://github.com/WordPress/gutenberg/issues/39500 is fixed. $block_pattern_categories = array( - 'pages' => array( 'label' => __( 'Pages', 'livro' ) ), - 'footer' => array( 'label' => __( 'Footers', 'livro' ) ), - 'header' => array( 'label' => __( 'Headers', 'livro' ) ) + 'pages' => array( 'label' => __( 'Pages', 'livro' ) ), + 'footer' => array( 'label' => __( 'Footers', 'livro' ) ), + 'header' => array( 'label' => __( 'Headers', 'livro' ) ), ); /** diff --git a/loudness/functions.php b/loudness/functions.php index f6580e895a..b069555bad 100644 --- a/loudness/functions.php +++ b/loudness/functions.php @@ -23,6 +23,8 @@ function decibel_support() { // Enqueue editor styles. add_editor_style( 'style.css' ); + // Make theme available for translation. + load_theme_textdomain( 'loudness' ); } endif; diff --git a/pendant/functions.php b/pendant/functions.php index 2b11acce29..e6634e2a08 100644 --- a/pendant/functions.php +++ b/pendant/functions.php @@ -20,7 +20,7 @@ */ function pendant_support() { // Make theme available for translation. - load_theme_textdomain( 'pendant', get_template_directory() . '/languages' ); + load_theme_textdomain( 'pendant' ); // Add support for block styles. add_theme_support( 'wp-block-styles' ); diff --git a/pixl/functions.php b/pixl/functions.php index d86e71afd3..ab8d7edfb1 100644 --- a/pixl/functions.php +++ b/pixl/functions.php @@ -23,6 +23,8 @@ function pixl_support() { // Enqueue editor styles. add_editor_style( 'style.css' ); + // Make theme available for translation. + load_theme_textdomain( 'pixl' ); } endif; diff --git a/rainfall/functions.php b/rainfall/functions.php index 0b4c86fb59..84685d1445 100644 --- a/rainfall/functions.php +++ b/rainfall/functions.php @@ -22,6 +22,9 @@ function rainfall_support() { // Enqueue editor styles. add_editor_style( 'style.css' ); + + // Make theme available for translation. + load_theme_textdomain( 'rainfall' ); } endif; diff --git a/remote/functions.php b/remote/functions.php index 68551bff66..1aab79854d 100644 --- a/remote/functions.php +++ b/remote/functions.php @@ -20,7 +20,7 @@ */ function remote_support() { // Make theme available for translation. - load_theme_textdomain( 'remote', get_template_directory() . '/languages' ); + load_theme_textdomain( 'remote' ); // Add support for block styles. add_theme_support( 'wp-block-styles' ); diff --git a/skatepark/functions.php b/skatepark/functions.php index a6e73cfb54..0dcd16b8a6 100644 --- a/skatepark/functions.php +++ b/skatepark/functions.php @@ -31,7 +31,7 @@ function skatepark_add_featured_image_class( $classes ) { */ function skatepark_support() { // Make theme available for translation. - load_theme_textdomain( 'skatepark', get_template_directory() . '/languages' ); + load_theme_textdomain( 'skatepark' ); // Add support for block styles. add_theme_support( 'wp-block-styles' ); diff --git a/stewart/functions.php b/stewart/functions.php index 7d5ca9eae8..366178a18a 100644 --- a/stewart/functions.php +++ b/stewart/functions.php @@ -5,7 +5,7 @@ */ function stewart_support() { // Make theme available for translation. - load_theme_textdomain( 'stewart', get_template_directory() . '/languages' ); + load_theme_textdomain( 'stewart' ); // Add support for block styles. add_theme_support( 'wp-block-styles' ); diff --git a/vivre/functions.php b/vivre/functions.php index c837213fa6..0af21e1d6d 100644 --- a/vivre/functions.php +++ b/vivre/functions.php @@ -20,7 +20,7 @@ */ function vivre_support() { // Make theme available for translation. - load_theme_textdomain( 'vivre', get_template_directory() . '/languages' ); + load_theme_textdomain( 'vivre' ); // Enqueue editor styles. add_editor_style( 'style.css' ); From ea4911db775188ecf565fae439a30d361a026d66 Mon Sep 17 00:00:00 2001 From: Jason Crist Date: Mon, 17 Oct 2022 11:27:42 -0400 Subject: [PATCH 6/7] Added load_theme_textdomain call to block canvas --- block-canvas/functions.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block-canvas/functions.php b/block-canvas/functions.php index 0e642df19e..4187f2f2fe 100644 --- a/block-canvas/functions.php +++ b/block-canvas/functions.php @@ -23,6 +23,8 @@ function block_canvas_support() { // Enqueue editor styles. add_editor_style( 'style.css' ); + // Make theme available for translation. + load_theme_textdomain( 'block-canvas' ); } endif; From a0c640a3b9ea9a766aef64e16d1f776297a1cc7e Mon Sep 17 00:00:00 2001 From: Jason Crist Date: Fri, 28 Oct 2022 11:42:51 -0400 Subject: [PATCH 7/7] Removed unrelated videomaker changes --- videomaker-white/functions.php | 8 ++++---- videomaker/functions.php | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/videomaker-white/functions.php b/videomaker-white/functions.php index 2333da0f53..92db11bdd0 100644 --- a/videomaker-white/functions.php +++ b/videomaker-white/functions.php @@ -3,14 +3,14 @@ /** * Add Editor Styles */ -function videomaker_support() { +function videomaker_editor_styles() { // Primary navigation is used on the header and the footer pattern register_nav_menus( array( 'primary' => __( 'Primary Navigation', 'videomaker' ), - 'social' => __( 'Social Navigation', 'videomaker' ), - 'footer' => __( 'Footer Navigation', 'videomaker' ), + 'social' => __( 'Social Navigation', 'videomaker' ), + 'footer' => __( 'Footer Navigation', 'videomaker' ) ) ); } -add_action( 'after_setup_theme', 'videomaker_support' ); +add_action( 'after_setup_theme', 'videomaker_editor_styles' ); diff --git a/videomaker/functions.php b/videomaker/functions.php index 2333da0f53..92db11bdd0 100644 --- a/videomaker/functions.php +++ b/videomaker/functions.php @@ -3,14 +3,14 @@ /** * Add Editor Styles */ -function videomaker_support() { +function videomaker_editor_styles() { // Primary navigation is used on the header and the footer pattern register_nav_menus( array( 'primary' => __( 'Primary Navigation', 'videomaker' ), - 'social' => __( 'Social Navigation', 'videomaker' ), - 'footer' => __( 'Footer Navigation', 'videomaker' ), + 'social' => __( 'Social Navigation', 'videomaker' ), + 'footer' => __( 'Footer Navigation', 'videomaker' ) ) ); } -add_action( 'after_setup_theme', 'videomaker_support' ); +add_action( 'after_setup_theme', 'videomaker_editor_styles' );