}
return $queryParts;
});
+
+add_filter('glm_blocks', function() {
+ if(function_exists('fetch_all_glm_blocks')) {
+ $blocks = fetch_all_glm_blocks();
+
+ return $blocks;
+ }
+ return false;
+});
+
+add_filter('glm_block_image', function($id) {
+ echo get_the_post_thumbnail($id, 'glm-block-image');
+});
+
/**
* Return the client info option for the given key
*
{/if} {*list_show_list*}
<div id="manufacturers-brands-container">
- :    -    D               Blocks go here
+ {$blocks = apply_filters('glm_blocks', '')}
+ {if $blocks}
+ {foreach $blocks as $block name="glm_block"}
+
+ {if $smarty.foreach.glm_block.index % 3 == 0}
+ <div class="glm-row">
+ {/if}
+ {if $block->url}
+ <a href="{$block->url}">
+ {/if}
+ <div class="glm-small-12 glm-medium-4 glm-column">
+ <h4>{$block->post_title}</h4>
+ {apply_filters('glm_block_image', $block->ID)}
+ </div>
+ {if $block->url}
+ </a>
+ {/if}
+ {if $smarty.foreach.glm_block.index % 3 == 2}
+ </div>
+ {/if}
+ {/foreach}
+ {/if}
+
</div>
<script type="text/javascript">
jQuery(document).ready(function($) {