From 4b6e9a956840c8210eacbda5d092c92d7945cc01 Mon Sep 17 00:00:00 2001 From: Khoi Nguyen Date: Wed, 21 Sep 2022 14:02:54 +0700 Subject: [PATCH 1/5] Register child theme textdomain --- inc/theme-init.php | 7 ++++++- languages/.gitkeep | 0 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 languages/.gitkeep diff --git a/inc/theme-init.php b/inc/theme-init.php index fd8c33a..21fdb7f 100644 --- a/inc/theme-init.php +++ b/inc/theme-init.php @@ -15,4 +15,9 @@ function wp_theme_frontend_assets() { wp_enqueue_script('wp-theme-frontend-js', WP_THEME_URI . '/assets/css/frontend' . $build_prefix . '.css', [], WP_THEME_VERSION); } -add_action('wp_enqueue_scripts', 'wp_theme_frontend_assets'); +add_action('wp_enqueue_scripts', 'wp_theme_frontend_assets', 50); + +function wp_theme_setup_theme() { + load_child_theme_textdomain('wp-theme', get_stylesheet_directory() . '/languages'); +} +add_action('after_setup_theme', 'wp_theme_setup_theme'); diff --git a/languages/.gitkeep b/languages/.gitkeep new file mode 100644 index 0000000..e69de29 From aadf4a445f010dccd0c33d88b785e8a119c3694f Mon Sep 17 00:00:00 2001 From: Khoi Nguyen Date: Wed, 21 Sep 2022 14:03:04 +0700 Subject: [PATCH 2/5] Add parent theme --- style.css | 1 + 1 file changed, 1 insertion(+) diff --git a/style.css b/style.css index 25384cf..ed390c3 100644 --- a/style.css +++ b/style.css @@ -3,5 +3,6 @@ Theme Name: CT Torus Author: Code Tot JSC Author URI: https://codetot.com Text Domain: ct-torus +Template: ct-bones Version: 0.0.1 */ From 28173cfe1521bc5d50504c81e3b6dca6bbbac7e5 Mon Sep 17 00:00:00 2001 From: Khoi Nguyen Date: Wed, 21 Sep 2022 14:04:30 +0700 Subject: [PATCH 3/5] Fix ci --- src/js/components/back-to-top.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/js/components/back-to-top.js b/src/js/components/back-to-top.js index d497e8f..1cdca66 100644 --- a/src/js/components/back-to-top.js +++ b/src/js/components/back-to-top.js @@ -4,7 +4,7 @@ import { throttle } from 'lib/utils' const OFFSET = 200 const VISIBLE_CLASS = 'is-visible' -export default el => { +export default (el) => { const update = () => { if (getScrollTop() > OFFSET) { addClass(VISIBLE_CLASS, el) @@ -13,11 +13,15 @@ export default el => { } } - on('click', e => { - e.preventDefault() + on( + 'click', + (e) => { + e.preventDefault() - window.scrollTo(0, 0) - }, el) + window.scrollTo(0, 0) + }, + el + ) on('load', throttle(update, 300), window) } From b5a3ad1ae83042aaab34fd2b277c578a1e88b2f6 Mon Sep 17 00:00:00 2001 From: Khoi Nguyen Date: Wed, 21 Sep 2022 14:05:03 +0700 Subject: [PATCH 4/5] Revert a theme name --- style.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/style.css b/style.css index ed390c3..19d6904 100644 --- a/style.css +++ b/style.css @@ -1,8 +1,8 @@ /** -Theme Name: CT Torus +Theme Name: WP Theme Author: Code Tot JSC Author URI: https://codetot.com -Text Domain: ct-torus +Text Domain: wp-theme Template: ct-bones Version: 0.0.1 */ From 95225c71df6bb92dea45f51d4c4ce68976321cd0 Mon Sep 17 00:00:00 2001 From: Khoi Nguyen Date: Wed, 21 Sep 2022 14:26:20 +0700 Subject: [PATCH 5/5] Remove default index page --- index.php | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 index.php diff --git a/index.php b/index.php deleted file mode 100644 index 289fce6..0000000 --- a/index.php +++ /dev/null @@ -1,9 +0,0 @@ -