Adding post content editor to blocks
authorSteve Sutton <steve@gaslightmedia.com>
Mon, 11 May 2015 15:36:36 +0000 (11:36 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Mon, 11 May 2015 15:36:36 +0000 (11:36 -0400)
This will let blocks to have links

glm-blocks.php
models/block.php
views/front/showBlocks.php

index 24fd69a..ca4c89d 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
 Plugin Name: GLM Blocks
-Version: 1.1.2
+Version: 1.1.3
 Description: Displays blocks of content managed from the admin under Blocks.
 Author: Steve Sutton <steve@gaslightmedia.com>
 Author URI: http://www.gaslightmedia.com
index 144cbc0..efaebf3 100644 (file)
@@ -88,7 +88,7 @@ class glm_models_block
             'show_in_nav_menus'  => false,
             'can_export'         => true,
             'menu_position'      => 5,
-            'supports'           => array('thumbnail', 'title', 'excerpt', 'page-attributes'),
+            'supports'           => array('thumbnail', 'title', 'editor', 'excerpt', 'page-attributes'),
             'has_archive'        => false,
             'menu_icon'          => 'dashicons-exerpt-view',
             'capability_type'    => 'page',
index b3e7c9a..aee1ce1 100644 (file)
@@ -15,7 +15,7 @@
         <?php if($block->url):?>
         </a>
          <?php endif;?>
-        <p><?php echo $block->post_excerpt;?></p>
+        <p><?php echo $block->post_content . $block->post_excerpt;?></p>
     </div>
 </div>
-<?php endforeach;?>
\ No newline at end of file
+<?php endforeach;?>