removing custom output functions , too specific to a theme
authorAnthony Talarico <talarico@gaslightmedia.com>
Mon, 3 Dec 2018 18:31:21 +0000 (13:31 -0500)
committerAnthony Talarico <talarico@gaslightmedia.com>
Mon, 3 Dec 2018 18:31:21 +0000 (13:31 -0500)
glm-blocks.php

index 8927cb7..4a517cf 100644 (file)
@@ -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 .= '<div id="glm-blocks" class="glm-blocks-container">';
-            $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 .= '<div class="small-text-center medium-text-left glm-block">';
-                if($block->url):
-                    $out .= '<a href="'.$block->url.'"'.(($block->externalUrl)? ' target="_blank"':'').'>';
-                endif;
-                $out .= '<img src="'.$thumbnail[0].'"/>';
-                $out .= '<div class="land-page-block-image" style="background: url('.$thumbnail.');"></div>';
-                $out .= '<h5 class="glm-block-title">'.$block->post_title.'</h5>';
-                if($block->url):
-                    $out .= '</a>';
-                endif;
-                if($block->url):
-                    $buttonText = ($count < 1) ? "SIGN UP" : "BUY NOW";
-                    $out .= '<a class="sign-up-button" href="'.$block->url.'"'.(($block->externalUrl)? ' target="_blank"':'').'>' . $buttonText .'</div>';
-                endif;
-                $out .= '</div>';
-                $count++;
-            endforeach;
-            $out .= '</div>';
-        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 .= '<div id="glm-blocks" class="glm-blocks-container">';
-            $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 .= '<div class="small-text-center medium-text-left glm-block">';
-                if($block->url):
-                    $out .= '<a href="'.$block->url.'"'.(($block->externalUrl)? ' target="_blank"':'').'>';
-                endif;
-                $out .= '<img src="'.$thumbnail[0].'"/>';
-                $out .= '<div class="land-page-block-image" style="background: url('.$thumbnail.');"></div>';
-                $out .= '<h5 class="glm-block-title">'.$block->post_title.'</h5>';
-                if($block->url):
-                    $out .= '</a>';
-                endif;
-                if($block->url):
-                    $buttonText = ($count < 1) ? "SIGN UP" : "BUY NOW";
-                    $out .= '<a class="sign-up-button" href="'.$block->url.'"'.(($block->externalUrl)? ' target="_blank"':'').'>' . $buttonText .'</a>';
-                endif;
-                $out .= '</div>';
-                $count++;
-            endforeach;
-            $out .= '</div>';
-        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