From 80aa640134921525837eb15b496b4c4c0f400806 Mon Sep 17 00:00:00 2001 From: eoxia-amandine Date: Thu, 23 May 2024 18:07:55 +0200 Subject: [PATCH] #54 fix: templates call --- inc/blocks.php | 10 +++++----- inc/blocks/bfs-course-lesson/bfs-course-lesson.php | 3 +-- inc/blocks/bfs-course-signup/bfs-course-signup.php | 2 +- inc/blocks/bfs-course-tax/bfs-course-tax.php | 3 +-- inc/blocks/bfs-course-time/bfs-course-time.php | 3 +-- inc/blocks/bfs-login/bfs-login.php | 3 +-- inc/generateBlock.js | 2 +- sensei/archive-course.php | 6 +++--- sensei/archive-message.php | 4 ++-- sensei/learner-profile.php | 4 ++-- sensei/single-message.php | 4 ++-- 11 files changed, 20 insertions(+), 24 deletions(-) diff --git a/inc/blocks.php b/inc/blocks.php index 833ef10..6b0816e 100644 --- a/inc/blocks.php +++ b/inc/blocks.php @@ -7,11 +7,11 @@ */ if ( class_exists( 'Sensei_Main', true ) ) { - require get_stylesheet_directory() . '/inc/blocks/bfs-course-signup/bfs-course-signup.php'; - require get_stylesheet_directory() . '/inc/blocks/bfs-course-tax/bfs-course-tax.php'; - require get_stylesheet_directory() . '/inc/blocks/bfs-course-lesson/bfs-course-lesson.php'; - require get_stylesheet_directory() . '/inc/blocks/bfs-course-time/bfs-course-time.php'; - require get_stylesheet_directory() . '/inc/blocks/bfs-login/bfs-login.php'; + require get_template_directory() . '/inc/blocks/bfs-course-signup/bfs-course-signup.php'; + require get_template_directory() . '/inc/blocks/bfs-course-tax/bfs-course-tax.php'; + require get_template_directory() . '/inc/blocks/bfs-course-lesson/bfs-course-lesson.php'; + require get_template_directory() . '/inc/blocks/bfs-course-time/bfs-course-time.php'; + require get_template_directory() . '/inc/blocks/bfs-login/bfs-login.php'; } /** diff --git a/inc/blocks/bfs-course-lesson/bfs-course-lesson.php b/inc/blocks/bfs-course-lesson/bfs-course-lesson.php index 233d999..6c71615 100644 --- a/inc/blocks/bfs-course-lesson/bfs-course-lesson.php +++ b/inc/blocks/bfs-course-lesson/bfs-course-lesson.php @@ -13,7 +13,7 @@ define( 'BFS_COURSE_LESSON_DIR', dirname(__DIR__, 1) . '/bfs-course-lesson' ); } if ( ! defined( 'BFS_COURSE_LESSON_URL' ) ) { - define( 'BFS_COURSE_LESSON_URL', get_stylesheet_directory_uri() . '/inc/blocks/bfs-course-lesson' ); + define( 'BFS_COURSE_LESSON_URL', get_template_directory_uri() . '/inc/blocks/bfs-course-lesson' ); } /** @@ -40,4 +40,3 @@ function bfs_course_lesson_load_json( $paths ) { return $paths; } add_filter( 'acf/settings/load_json', 'bfs_course_lesson_load_json' ); - \ No newline at end of file diff --git a/inc/blocks/bfs-course-signup/bfs-course-signup.php b/inc/blocks/bfs-course-signup/bfs-course-signup.php index 0a2a910..6c34935 100644 --- a/inc/blocks/bfs-course-signup/bfs-course-signup.php +++ b/inc/blocks/bfs-course-signup/bfs-course-signup.php @@ -13,7 +13,7 @@ define( 'BFS_COURSE_SIGNUP_DIR', dirname(__DIR__, 1) . '/bfs-course-signup' ); } if ( ! defined( 'BFS_COURSE_SIGNUP_URL' ) ) { - define( 'BFS_COURSE_SIGNUP_URL', get_stylesheet_directory_uri() . '/inc/blocks/bfs-course-signup' ); + define( 'BFS_COURSE_SIGNUP_URL', get_template_directory_uri() . '/inc/blocks/bfs-course-signup' ); } /** diff --git a/inc/blocks/bfs-course-tax/bfs-course-tax.php b/inc/blocks/bfs-course-tax/bfs-course-tax.php index 2682b25..4ad90ff 100644 --- a/inc/blocks/bfs-course-tax/bfs-course-tax.php +++ b/inc/blocks/bfs-course-tax/bfs-course-tax.php @@ -13,7 +13,7 @@ define( 'BFS_COURSE_TAX_DIR', dirname(__DIR__, 1) . '/bfs-course-tax' ); } if ( ! defined( 'BFS_COURSE_TAX_URL' ) ) { - define( 'BFS_COURSE_TAX_URL', get_stylesheet_directory_uri() . '/inc/blocks/bfs-course-tax' ); + define( 'BFS_COURSE_TAX_URL', get_template_directory_uri() . '/inc/blocks/bfs-course-tax' ); } /** @@ -40,4 +40,3 @@ function bfs_course_tax_load_json( $paths ) { return $paths; } add_filter( 'acf/settings/load_json', 'bfs_course_tax_load_json' ); - \ No newline at end of file diff --git a/inc/blocks/bfs-course-time/bfs-course-time.php b/inc/blocks/bfs-course-time/bfs-course-time.php index 8047f89..913d16a 100644 --- a/inc/blocks/bfs-course-time/bfs-course-time.php +++ b/inc/blocks/bfs-course-time/bfs-course-time.php @@ -13,7 +13,7 @@ define( 'BFS_COURSE_TIME_DIR', dirname(__DIR__, 1) . '/bfs-course-time' ); } if ( ! defined( 'BFS_COURSE_TIME_URL' ) ) { - define( 'BFS_COURSE_TIME_URL', get_stylesheet_directory_uri() . '/inc/blocks/bfs-course-time' ); + define( 'BFS_COURSE_TIME_URL', get_template_directory_uri() . '/inc/blocks/bfs-course-time' ); } /** @@ -40,4 +40,3 @@ function bfs_course_time_load_json( $paths ) { return $paths; } add_filter( 'acf/settings/load_json', 'bfs_course_time_load_json' ); - \ No newline at end of file diff --git a/inc/blocks/bfs-login/bfs-login.php b/inc/blocks/bfs-login/bfs-login.php index e20bf2f..52f0536 100644 --- a/inc/blocks/bfs-login/bfs-login.php +++ b/inc/blocks/bfs-login/bfs-login.php @@ -13,7 +13,7 @@ define( 'BFS_LOGIN_DIR', dirname(__DIR__, 1) . '/bfs-login' ); } if ( ! defined( 'BFS_LOGIN_URL' ) ) { - define( 'BFS_LOGIN_URL', get_stylesheet_directory_uri() . '/inc/blocks/bfs-login' ); + define( 'BFS_LOGIN_URL', get_template_directory_uri() . '/inc/blocks/bfs-login' ); } /** @@ -40,4 +40,3 @@ function bfs_login_load_json( $paths ) { return $paths; } add_filter( 'acf/settings/load_json', 'bfs_login_load_json' ); - \ No newline at end of file diff --git a/inc/generateBlock.js b/inc/generateBlock.js index 65a94d2..0300fb5 100644 --- a/inc/generateBlock.js +++ b/inc/generateBlock.js @@ -130,7 +130,7 @@ if ( ! defined( '{{blockVar}}_DIR' ) ) { define( '{{blockVar}}_DIR', dirname(__DIR__, 1) . '/{{blockName}}' ); } if ( ! defined( '{{blockVar}}_URL' ) ) { - define( '{{blockVar}}_URL', get_stylesheet_directory_uri() . '/inc/blocks/{{blockName}}' ); + define( '{{blockVar}}_URL', get_template_directory_uri() . '/inc/blocks/{{blockName}}' ); } /** diff --git a/sensei/archive-course.php b/sensei/archive-course.php index 110a157..59665e9 100644 --- a/sensei/archive-course.php +++ b/sensei/archive-course.php @@ -8,9 +8,9 @@ diff --git a/sensei/archive-message.php b/sensei/archive-message.php index d16570e..4133139 100644 --- a/sensei/archive-message.php +++ b/sensei/archive-message.php @@ -8,8 +8,8 @@ diff --git a/sensei/learner-profile.php b/sensei/learner-profile.php index 7f2436f..0d2bbd3 100644 --- a/sensei/learner-profile.php +++ b/sensei/learner-profile.php @@ -8,9 +8,9 @@ diff --git a/sensei/single-message.php b/sensei/single-message.php index 1d3ff8a..cc4650c 100644 --- a/sensei/single-message.php +++ b/sensei/single-message.php @@ -8,8 +8,8 @@