From: Anthony Talarico Date: Mon, 3 Dec 2018 18:31:21 +0000 (-0500) Subject: removing custom output functions , too specific to a theme X-Git-Tag: v1.6.2^2~1 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=9a512c14edf57bf20c6381d345975a2f1061a598;p=WP-Plugins%2Fglm-blocks.git removing custom output functions , too specific to a theme --- diff --git a/glm-blocks.php b/glm-blocks.php index 8927cb7..4a517cf 100644 --- a/glm-blocks.php +++ b/glm-blocks.php @@ -53,44 +53,7 @@ if (!function_exists('fetch_all_glm_blocks')) { return $frontController->fetchAllBlocks($catId); } } -if (!function_exists('landing_page_blocks')) { - function landing_page_blocks( $atts ){ - - $out = ''; - extract(shortcode_atts( - array('category' => '-1'), $atts, 'glm-blocks') - ); - if(function_exists('fetch_all_glm_blocks')): - $category = filter_var($atts['category'], FILTER_VALIDATE_INT); - - $blocks = fetch_all_glm_blocks($category); - $out .= '
'; - $count = 0; - foreach ($blocks as $block): - $post_image_id = get_post_thumbnail_id($block->ID); - $thumbnail = wp_get_attachment_image_src( $post_image_id, 'landing_page'); - $out .= '
'; - $count++; - endforeach; - $out .= ''; - endif; - return $out; - } -} + if (!function_exists('fetch_blocks_by_slug')) { function fetch_blocks_by_slug($cat) { @@ -99,44 +62,4 @@ if (!function_exists('fetch_blocks_by_slug')) { ); return $frontController->fetch_blocks_by_slug($cat); } -} -if (!function_exists('action_item_blocks')) { - function action_item_blocks( $atts ){ - - $out = ''; - extract(shortcode_atts( - array('category' => '-1'), $atts, 'glm-blocks') - ); - if(function_exists('fetch_blocks_by_slug')): - $category = filter_var($atts['category'], FILTER_SANITIZE_STRING); - fetch_blocks_by_slug($category); - $blocks = fetch_blocks_by_slug($category); - $out .= '
'; - $count++; - endforeach; - $out .= '
'; - endif; - return $out; - } -} -add_shortcode('glm-blocks-action-items', 'action_item_blocks'); -add_shortcode('glm-blocks', 'landing_page_blocks'); \ No newline at end of file +} \ No newline at end of file