From ceae2e1a80ee1d5c6ef41051d1a179ce02427154 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Tue, 1 Nov 2016 17:25:21 -0400 Subject: [PATCH] Update the blocks for theme Updating the block section so it can be used to call as a function. --- functions.php | 1 + parts/glm-blocks.php | 69 +++++++++++++++++++---------------------- sections/footer.php | 10 +++--- sections/front-page.php | 6 ++-- 4 files changed, 39 insertions(+), 47 deletions(-) diff --git a/functions.php b/functions.php index 5b98ff4..9e27dc5 100644 --- a/functions.php +++ b/functions.php @@ -1,6 +1,7 @@ ID); -switch ($post_id) { -case 'partners': - $defaultBlockGroup = PARTNERS_BLOCKS; - break; -default: - $defaultBlockGroup = DEFAULT_BLOCKS; - break; +if ( !function_exists( 'glm_blocks_per_section' ) ) { + function glm_blocks_per_section( $section ) { + if ( function_exists( 'fetch_all_glm_blocks' ) ) { + $blocks = fetch_all_glm_blocks( $section ); + ?> +
+ + + +
+ - -
- - - -
- - diff --git a/sections/footer.php b/sections/footer.php index 9607795..1594e78 100644 --- a/sections/footer.php +++ b/sections/footer.php @@ -1,9 +1,7 @@

Discover The Possibilities

- +
@@ -75,7 +73,7 @@
- +
- + - \ No newline at end of file + diff --git a/sections/front-page.php b/sections/front-page.php index 5edadc3..dd48432 100644 --- a/sections/front-page.php +++ b/sections/front-page.php @@ -3,9 +3,7 @@
- +
@@ -17,4 +15,4 @@
- \ No newline at end of file + -- 2.17.1