From 4a0424390146159ce57ac7a336ae3bb524380dbe Mon Sep 17 00:00:00 2001 From: shreejana Date: Tue, 5 Nov 2019 16:44:53 +0545 Subject: [PATCH 1/7] Add - header hooks --- functions.php | 6 +++ header.php | 88 ++++++++++++++++++++++++++++--------- inc/hooks/header.php | 101 +++++++++++++++++++++++++++++++++++++++++++ inc/hooks/hooks.php | 52 ++++++++++++++++++++++ 4 files changed, 226 insertions(+), 21 deletions(-) create mode 100644 inc/hooks/header.php create mode 100644 inc/hooks/hooks.php diff --git a/functions.php b/functions.php index d6ee635..4b9f3d8 100644 --- a/functions.php +++ b/functions.php @@ -275,6 +275,12 @@ function cenote_scripts() { */ require get_template_directory() . '/inc/customizer.php'; +/** + * Load Hooks. + */ +require get_template_directory() . '/inc/hooks/hooks.php'; +require get_template_directory() . '/inc/hooks/header.php'; + /** * Meta boxes. */ diff --git a/header.php b/header.php index 999f27b..6afd8d9 100644 --- a/header.php +++ b/header.php @@ -13,11 +13,19 @@ > - - - - + + + > @@ -28,26 +36,64 @@ } ?> -
- + + + + + + + - - -
-
diff --git a/inc/hooks/header.php b/inc/hooks/header.php new file mode 100644 index 0000000..f98b7d1 --- /dev/null +++ b/inc/hooks/header.php @@ -0,0 +1,101 @@ + + + + + +
+ + + + +
+ +
+ Date: Wed, 6 Nov 2019 11:28:24 +0545 Subject: [PATCH 2/7] Add - footer hooks --- footer.php | 88 +++++++++++++++++++++++++++++------------- functions.php | 2 + inc/hooks/content.php | 0 inc/hooks/footer.php | 89 +++++++++++++++++++++++++++++++++++++++++++ inc/hooks/hooks.php | 46 ++++++++++++++++++++++ 5 files changed, 198 insertions(+), 27 deletions(-) create mode 100644 inc/hooks/content.php create mode 100644 inc/hooks/footer.php diff --git a/footer.php b/footer.php index c1f1e1e..9636fa8 100644 --- a/footer.php +++ b/footer.php @@ -10,36 +10,70 @@ */ ?> -
-
-
- - - -
- -
+ + + + + + + + + + + +
+
+ +
+ + + + + +
+ + +
+ + Date: Wed, 6 Nov 2019 12:09:21 +0545 Subject: [PATCH 3/7] Add - Content hooks --- inc/hooks/content.php | 30 ++++++++++++++++++++++++++++++ inc/hooks/hooks.php | 14 ++++++++++++++ index.php | 9 ++++++++- template-parts/content.php | 15 ++++++++++----- 4 files changed, 62 insertions(+), 6 deletions(-) diff --git a/inc/hooks/content.php b/inc/hooks/content.php index e69de29..45c3fcf 100644 --- a/inc/hooks/content.php +++ b/inc/hooks/content.php @@ -0,0 +1,30 @@ + + + - - From 5b8382b37bc1f628069d721489db2941f6521f22 Mon Sep 17 00:00:00 2001 From: shreejana Date: Wed, 6 Nov 2019 15:16:49 +0545 Subject: [PATCH 4/7] Update - hook name --- footer.php | 46 ++++++++++++++++++++++++-------------- header.php | 36 ++++++++++++++--------------- inc/hooks/hooks.php | 37 +++++++++++++++++------------- inc/template-functions.php | 2 +- index.php | 6 ++--- template-parts/content.php | 6 ++--- 6 files changed, 76 insertions(+), 57 deletions(-) diff --git a/footer.php b/footer.php index 9636fa8..af8c1eb 100644 --- a/footer.php +++ b/footer.php @@ -13,13 +13,13 @@ + + diff --git a/header.php b/header.php index 6afd8d9..959fa8f 100644 --- a/header.php +++ b/header.php @@ -16,13 +16,13 @@ @@ -38,60 +38,60 @@ diff --git a/inc/hooks/hooks.php b/inc/hooks/hooks.php index aa5ef55..a595739 100644 --- a/inc/hooks/hooks.php +++ b/inc/hooks/hooks.php @@ -11,7 +11,7 @@ * * @see cenote_head() */ -add_action( 'cenote_action_head', 'cenote_head', 10 ); +add_action( 'cenote_head', 'cenote_head', 10 ); /** * Before header. @@ -19,27 +19,27 @@ * @see cenote_page_start() * @see cenote_header_start() */ -add_action( 'cenote_action_before_header', 'cenote_page_start', 10 ); -add_action( 'cenote_action_before_header', 'cenote_header_start', 15 ); +add_action( 'cenote_before_header', 'cenote_page_start', 10 ); +add_action( 'cenote_before_header', 'cenote_header_start', 15 ); /** * Header Top Bar. * * @see cenote_header_top() */ -add_action( 'cenote_action_header_top', 'cenote_header_top', 10 ); +add_action( 'cenote_header_top', 'cenote_header_top', 10 ); /** * Header Main Area. * * @see cenote_header_bottom() */ -add_action( 'cenote_action_header_bottom', 'cenote_header_bottom', 10 ); +add_action( 'cenote_header_bottom', 'cenote_header_bottom', 10 ); /** * Header end. * * @see cenote_header_end() */ -add_action( 'cenote_action_header_end', 'cenote_header_end', 10 ); +add_action( 'cenote_header_end', 'cenote_header_end', 10 ); /* ------------------------------ CONTENT ------------------------------ */ @@ -49,21 +49,21 @@ * * @see cenote_content_start() */ -add_action( 'cenote_action_before_content', 'cenote_content_start', 10 ); +add_action( 'cenote_before_content', 'cenote_content_start', 10 ); /** * Read More. * * @see cenote_read_more() */ -add_action( 'cenote_action_read_more', 'cenote_read_more', 10 ); +add_action( 'cenote_read_more', 'cenote_read_more', 10 ); /** * Pagination. * * @see cenote_pagination() */ -add_action( 'cenote_action_pagination', 'cenote_pagination', 10 ); +add_action( 'cenote_pagination', 'cenote_pagination', 10 ); /* ------------------------------ FOOTER ------------------------------ */ @@ -73,37 +73,44 @@ * * @see cenote_content_end() */ -add_action( 'cenote_action_after_content', 'cenote_content_end', 10 ); +add_action( 'cenote_after_content', 'cenote_content_end', 10 ); /** * Before footer. * * @see cenote_footer_start() */ -add_action( 'cenote_action_before_footer', 'cenote_footer_start', 10 ); +add_action( 'cenote_before_footer', 'cenote_footer_start', 10 ); /** * Footer Top. * * @see cenote_footer_top() */ -add_action( 'cenote_action_footer_top', 'cenote_footer_top', 10 ); +add_action( 'cenote_footer_top', 'cenote_footer_top', 10 ); /** * Footer Bottom. * * @see cenote_footer_bottom() */ -add_action( 'cenote_action_footer_bottom', 'cenote_footer_bottom', 10 ); +add_action( 'cenote_footer_bottom', 'cenote_footer_bottom', 10 ); /** * Footer End. * * @see cenote_footer_end() + */ +add_action( 'cenote_after_footer', 'cenote_footer_end', 10 ); + +/** + * Page End. + * * @see cenote_page_end() */ -add_action( 'cenote_action_after_footer', 'cenote_footer_end', 10 ); -add_action( 'cenote_action_after_footer', 'cenote_page_end', 15 ); +add_action( 'cenote_after', 'cenote_page_end', 10 ); + + diff --git a/inc/template-functions.php b/inc/template-functions.php index 6812498..dd5935d 100644 --- a/inc/template-functions.php +++ b/inc/template-functions.php @@ -95,7 +95,7 @@ function cenote_add_footer_extras() { Date: Wed, 6 Nov 2019 15:26:33 +0545 Subject: [PATCH 5/7] spacing fix --- footer.php | 5 +---- inc/hooks/content.php | 8 ++++---- inc/hooks/footer.php | 24 ++++++++++++------------ inc/hooks/header.php | 28 ++++++++++++++-------------- 4 files changed, 31 insertions(+), 34 deletions(-) diff --git a/footer.php b/footer.php index af8c1eb..055eb51 100644 --- a/footer.php +++ b/footer.php @@ -86,10 +86,7 @@ do_action( 'cenote_after' ); ?> - + diff --git a/inc/hooks/content.php b/inc/hooks/content.php index 45c3fcf..2a6fd40 100644 --- a/inc/hooks/content.php +++ b/inc/hooks/content.php @@ -5,11 +5,11 @@ * @package cenote */ -if( !function_exists( 'cenote_read_more' )): +if ( ! function_exists( 'cenote_read_more' ) ) : /** * Post Read More. */ - function cenote_read_more(){ + function cenote_read_more() { ?>