Skip to content

Commit

Permalink
Fixes for blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
jawngee committed Apr 1, 2020
1 parent 79083f4 commit e3e5c69
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 14 deletions.
5 changes: 3 additions & 2 deletions Classes/Core/Blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ private function loadBlocks() {
},
'category' => $block->categorySlug(),
'icon' => $block->icon(),
'keywords' => $block->keywords()
'keywords' => $block->keywords(),
'mode' => $block->mode()
]);

$block->registerFields();
Expand Down Expand Up @@ -166,7 +167,7 @@ private function processFieldsData($fields, $blockData) {
}


return (object)$data;
return $data;
}

/**
Expand Down
29 changes: 20 additions & 9 deletions Classes/UI/Block.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,11 @@ class Block {
/** @var string */
protected $category= null;

/** @var string */
protected $icon= null;
/** @var string */
protected $icon= null;

/** @var string */
protected $mode = 'preview';

/** @var array */
protected $keywords= [];
Expand Down Expand Up @@ -148,13 +151,21 @@ public function icon() {
return $this->icon;
}

/**
* Keywords for the block
* @return array
*/
public function keywords() {
return $this->keywords;
}
/**
* Keywords for the block
* @return array
*/
public function keywords() {
return $this->keywords;
}

/**
* Mode for the block
* @return string
*/
public function mode() {
return $this->mode;
}

/**
* Title for the block
Expand Down
1 change: 0 additions & 1 deletion Classes/UI/ListTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ protected function display_tablenav( $which ) {
// }
?>
<div class="tablenav <?php echo esc_attr($which); ?>">

<?php if($this->has_items()): ?>
<div class="alignleft actions bulkactions">
<?php $this->bulk_actions($which); ?>
Expand Down
4 changes: 2 additions & 2 deletions stem.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
Plugin URI: https://github.com/jawngee/stem
Description: Framework for building applications using Wordpress and Symfony
Author: Jon Gilkison
Version: 0.7.11
Version: 0.7.12
Author URI: http://interfacelab.com
*/

define('ILAB_STEM', __FILE__);
define('ILAB_STEM_DIR', dirname(__FILE__));
define('ILAB_STEM_VIEW_DIR', ILAB_STEM_DIR.'/views');
define('ILAB_STEM_VERSION', '0.7.11');
define('ILAB_STEM_VERSION', '0.7.12');

if (file_exists(ILAB_STEM_DIR.'/vendor/autoload.php')) {
require_once ILAB_STEM_DIR.'/vendor/autoload.php';
Expand Down

0 comments on commit e3e5c69

Please sign in to comment.