Changeset 1166402
- Timestamp:
- 05/23/2015 08:01:44 PM (11 years ago)
- Location:
- magic-meta-box/trunk
- Files:
-
- 1 added
- 4 edited
-
includes/repeater-fields.php (modified) (1 diff)
-
js/meta-box-map.js (modified) (2 diffs)
-
js/show-hide-metabox.js (added)
-
magic-metabox.php (modified) (4 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
magic-meta-box/trunk/includes/repeater-fields.php
r1151081 r1166402 15 15 $field_id = $id .'[' .$count_repeat . '][' . $opt['id'] .']'; 16 16 if(!isset($data[$count_repeat][$opt['id']])) { 17 $value_field = isset($opt['std']) ? $opt['std'] : ''; 17 $value_field = isset($opt['std'])? $opt['std'] : ''; 18 } 19 if(!isset($opt['std'])) { 20 $opt['std'] = ''; 18 21 } 19 22 $value_field = isset($data[$count_repeat][$opt['id']])? $data[$count_repeat][$opt['id']] : $opt['std']; -
magic-meta-box/trunk/js/meta-box-map.js
r1142770 r1166402 1 1 jQuery(document).ready(function($){ 2 //$('.mapMetaboxContainer').closest('tr').css({'display': 'table-column', 'visibility': 'hidden', 'height': 0, 'overflow': 'hidden'});3 //$('.mapMetaboxContainer').closest('tr').find('th').css({'vertical-align': 'baseline'});4 2 var marker_position = new google.maps.LatLng(map_dinamic_options.lat, map_dinamic_options.lng); 5 3 var map_position = new google.maps.LatLng(map_dinamic_options.lat, map_dinamic_options.lng); … … 71 69 $(this).addClass('hideTab'); 72 70 } 71 $('.tabsMetabox').addClass('showHideOpen'); 73 72 }); 74 73 }); -
magic-meta-box/trunk/magic-metabox.php
r1151081 r1166402 4 4 Plugin URI: https://wordpress.org/plugins/magic-meta-box/ 5 5 Description: Easy To Create Metabox For Your Theme 6 Version: 1.26 Version: 2.0 7 7 Author: Abdelrhman ElGreatly 8 8 License: GPLv2 … … 15 15 static $count_metabox = 0; 16 16 static $count_repeat_js = array(); 17 static $show_metabox = array(); 17 18 // create meta box based on given data 18 19 public function __construct($id, $opts) { … … 95 96 // Add the color picker css file 96 97 wp_register_script('metabox_js', plugins_url( 'js/metabox.js', __FILE__ ), array('wp-color-picker', 'jquery-ui-datepicker', 'jquery-ui-spinner', 'jquery-ui-slider')); 98 99 wp_register_script('show-hide-metabox', plugins_url( 'js/show-hide-metabox.js', __FILE__ ), array('jquery')); 97 100 } 98 101 } … … 125 128 $options = ''; 126 129 $repeat_count_add = 0; 130 if(isset($this->meta_box['show']) && !empty($this->meta_box['show'])){ 131 foreach ($this->meta_box['show'] as $key => $metaboxShow) { 132 if($key != 'template' && $key != 'post_format' && $key != 'relation'){ 133 for($i = 0; $i < count($this->meta_box['show'][$key]); $i++){ 134 if(is_string($metaboxShow[$i])){ 135 $term_obj = get_term_by('name', $metaboxShow[$i], $key); 136 $this->meta_box['show'][$key][$i] = $term_obj->term_id; 137 } 138 } 139 } 140 } 141 if(!isset($this->meta_box['show']['relation']) || empty($this->meta_box['show']['relation'])){ 142 $this->meta_box['show']['relation'] = 'or'; 143 } 144 self::$show_metabox[$this->id] = $this->meta_box['show']; 145 $show_metabox = array( 146 'show' => self::$show_metabox, 147 ); 148 wp_localize_script('show-hide-metabox', 'gs_show_hide', $show_metabox); 149 wp_enqueue_script('show-hide-metabox'); 150 } 127 151 foreach ($this->meta_box['fields'] as $field) { 128 152 extract($field); -
magic-meta-box/trunk/readme.txt
r1151081 r1166402 4 4 Requires at least: 4.0 5 5 Tested up to: 4.1.3 6 Stable tag: 1.26 Stable tag: 2.0 7 7 License: GPLv2 8 8 … … 14 14 ### Features:- 15 15 * Easy to use 16 * support a lot of fields16 * Support a lot of fields 17 17 * Has hooks to add custom field types 18 * placeholder for inputs 19 * support repeated single fields 20 * support repeated group of fields 21 * repeat editor field 22 * support tabs to make your custom fields user friendly 18 * Placeholder for inputs 19 * Support repeated single fields 20 * Support repeated group of fields 21 * Repeat editor field 22 * Show/Hide meta box with (javascript) 23 * Support tabs to make your custom fields user friendly 23 24 * Cross browsing 24 * shortcode for Google map to make map field user friendly25 * easily integrate with your theme25 * Shortcode for Google map to make map field user friendly 26 * Easily integrate with your theme 26 27 ### Documentation 27 28 * [Documentation PDF](http://www.mediafire.com/view/6f5wcf690q7gunq/Magic_Meta_Box_Documentation.pdf) … … 47 48 * add attribute to change default first option in select type 48 49 * add password field type 50 51 ### 2.0 52 53 * Show/Hide meta box with (javascript) 54 * Fix some bugs
Note: See TracChangeset
for help on using the changeset viewer.