diff --git a/src/api/OptionPage.php b/src/api/OptionPage.php index f543398..03bbe58 100644 --- a/src/api/OptionPage.php +++ b/src/api/OptionPage.php @@ -33,6 +33,16 @@ private function parseFields(){ $obj = Form::textarea($key); break; + case 'multiple_choice': + + $obj = Form::checkboxes($key."[]"); // create a collection of checkboxeseaa + + foreach($value['options'] as $o => $v){ + $obj->add($o, $v); + } + + break; + default: $obj = Form::text($key); diff --git a/src/core/Post.php b/src/core/Post.php index 7d133fb..c5362d9 100644 --- a/src/core/Post.php +++ b/src/core/Post.php @@ -40,6 +40,8 @@ public function __construct($postObject, $model){ $this->author = $author; + $this->content = apply_filters('the_content', $this->content); + // Terms if( !empty($taxonomies)) @@ -48,6 +50,7 @@ public function __construct($postObject, $model){ $terms = array(); $obj = get_the_terms( $this->ID, $taxonomy ); + if(is_array($obj)) foreach($obj as $term){ $term->link = get_term_link($term->term_id, $taxonomy); array_push($terms, $term); diff --git a/src/utility/RegisterMetabox.php b/src/utility/RegisterMetabox.php index 1a6ca16..fe469ea 100644 --- a/src/utility/RegisterMetabox.php +++ b/src/utility/RegisterMetabox.php @@ -127,7 +127,7 @@ public function doRegister(){ case 'image': - if(!$content['multiple']){ + if(empty($content['multiple'])){ array_push($box['fields'], array( 'name' => $content['label'],