Skip to content

Commit

Permalink
Fixed callback functions in fields with type list
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiopvilar committed Aug 11, 2015
1 parent 9627c92 commit f538f56
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions src/utility/RegisterMetabox.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ public function doRegister(){

$meta_boxes = array();
$wp_fields = array(
'title',
'editor',
'thumbnail',
'excerpt',
'comments',
'revisions',
'trackbacks',
'title',
'editor',
'thumbnail',
'excerpt',
'comments',
'revisions',
'trackbacks',
'page-attributes'
);

Expand Down Expand Up @@ -118,10 +118,8 @@ public function doRegister(){

$function = $content['options'];

if(strpos($function, '(') > -1){

eval('$options = '.$function.';');

if(is_string($function)){
$options = call_user_func($function);
}else{
$options = $function;
}
Expand Down Expand Up @@ -217,4 +215,4 @@ public function doRegister(){

}

}
}

0 comments on commit f538f56

Please sign in to comment.