Changeset 1780015
- Timestamp:
- 12/02/2017 09:44:01 PM (8 years ago)
- Location:
- magic-meta-box/trunk/includes
- Files:
-
- 2 edited
-
fields.php (modified) (1 diff)
-
repeater-fields.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
magic-meta-box/trunk/includes/fields.php
r1779994 r1780015 1 1 <?php 2 include( 'fields/'. $type .'.php' ); 2 $fieldsArray = array('text', 'password', 'textarea', 'url', 'email', 'date', 'DateTime', 'time', 'num', 'checkbox', 'multicheckbox', 'radio', 'select', 'multiselect', 'color', 'image', 'gallery', 'file', 'embed', 'slider', 'map', 'wp_editor', 'editor'); 3 4 if (in_array($type, $fieldsArray)) { 5 include( 'fields/'. $type .'.php' ); 6 } 3 7 $fieldattrs = $field; 4 8 $fieldattrs['id'] = $id; -
magic-meta-box/trunk/includes/repeater-fields.php
r1779994 r1780015 1 1 <?php 2 $fieldsArray = array('text', 'password', 'textarea', 'url', 'email', 'date', 'DateTime', 'time', 'num', 'checkbox', 'multicheckbox', 'radio', 'select', 'multiselect', 'color', 'image', 'gallery', 'file', 'embed', 'slider', 'editor'); 2 3 $count_repeat = 0; 3 4 $data = (self::gsmb_get($id) == null)? get_post_meta($post->ID,$id,true) : array(); … … 20 21 } 21 22 $value_field = isset($data[$count_repeat][$opt['id']])? $data[$count_repeat][$opt['id']] : $opt['std']; 22 23 include( 'repeated-fields/'. $opt['type'] .'.php' ); 23 if (in_array($opt['type'], $fieldsArray)) { 24 include( 'repeated-fields/'. $opt['type'] .'.php' ); 25 } 24 26 25 27 $fieldopt = $opt;
Note: See TracChangeset
for help on using the changeset viewer.