Skip to content

Commit

Permalink
Clean things up to use standard repeatable field argument instead of …
Browse files Browse the repository at this point in the history
…a field option
  • Loading branch information
jtsternberg committed May 4, 2015
1 parent 43cb736 commit ac6c724
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions includes/CMB2_Field.php
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,6 @@ public function repeatable_exception( $type ) {
'file', // Use file_list
'radio',
'title',
'group',
// @todo Ajax load wp_editor: http://wordpress.stackexchange.com/questions/51776/how-to-load-wp-editor-through-ajax-jquery
'wysiwyg',
'checkbox',
Expand Down Expand Up @@ -823,7 +822,7 @@ public function replace_hash( $value ) {
public function options( $key = '' ) {
if ( ! empty( $this->field_options ) ) {
if ( $key ) {
return array_key_exists( $key, $this->field_options ) ? $this->field_options[ $key ] : NULL;
return array_key_exists( $key, $this->field_options ) ? $this->field_options[ $key ] : false;
}

return $this->field_options;
Expand All @@ -840,7 +839,7 @@ public function options( $key = '' ) {
}

if ( $key ) {
return array_key_exists( $key, $this->field_options ) ? $this->field_options[ $key ] : NULL;
return array_key_exists( $key, $this->field_options ) ? $this->field_options[ $key ] : false;
}

return $this->field_options;
Expand All @@ -867,7 +866,7 @@ public function _set_field_defaults( $args ) {
'default' => null,
'select_all_button' => true,
'multiple' => false,
'repeatable' => false,
'repeatable' => isset( $args['type'] ) && 'group' == $args['type'],
'inline' => false,
'on_front' => true,
'show_names' => true,
Expand Down

0 comments on commit ac6c724

Please sign in to comment.