--- /dev/null
+# Gaslight Media Blocks Application
+
+##Setup Instructions
+###Install plugin
+ git clone git@cvs2:WP-Plugins/glm-blocks.git
+###Setup plugin in front-page.php
+Default setup
+```
+ <?php glm_blocks_show();?>
+```
+Default setup from the glmTheme (grunt-init)
+```
+<?php get_template_part('parts/glm-blocks');?>
+```
+
+Customize Output of Blocks.
+```
+<?php if(function_exists('fetch_all_glm_blocks')):?>
+<?php $blocks = fetch_all_glm_blocks();?>
+<div class="blocks">
+ <?php foreach ($blocks as $block):?>
+ <div class="text-center small-12 large-4 columns large-text-left blocks">
+ <?php if($block->url):?>
+ <a href="<?php echo $block->url;?>"<?php if($block->externalUrl){echo ' target="_blank"';}?>>
+ <?php endif;?>
+ <?php echo $block->thumbnail;?>
+ <?php if($block->url):?>
+ </a>
+ <?php endif;?>
+ <?php if($block->url):?>
+ <a class="title-posts" href="<?php echo $block->url;?>"<?php if($block->externalUrl){echo ' target="_blank"';}?>>
+ <?php endif;?>
+ <h1><?php echo $block->post_title;?></h1>
+ <?php if($block->url):?>
+ </a>
+ <?php endif;?>
+ <p><?php echo $block->post_excerpt;?></p>
+ <a class="blocks-readmore" href="<?php echo $block->url;?>">Read More...</a>
+ </div>
+ <?php endforeach;?>
+</div>
+<div class="separator"><hr></div>
+<?php endif;?>
+```
+
+##Directories and Files Structure
+###controllers
+ admin.php
+ front.php
+###models
+ block.php
+###views
+ admin
+ metaBoxes.php
+ front
+ showBlocks.php
+###glm-blocks (root)
+ glm-blocks.php
+ README.md
add_action('admin_init', array($this, 'remove_elements'));
}
+ /**
+ * Sets the pluginDirName variable
+ */
public function setPluginDir($dir)
{
$this->pluginDirName = $dir;
}
-
+ /**
+ * Hide certain elements from the normal post edit page.
+ */
function remove_elements()
{
if( isset($_GET['post']) && $_GET['post']