Changeset 1564960
- Timestamp:
- 12/30/2016 12:30:39 PM (9 years ago)
- Location:
- tally-types/trunk
- Files:
-
- 1 added
- 4 deleted
- 4 edited
-
assets/images/carousel-icon.png (deleted)
-
assets/images/services-icon.png (deleted)
-
assets/images/testimonials-icon.png (deleted)
-
assets/images/vcard-icon.png (deleted)
-
includes/metabox-helper.php (modified) (2 diffs)
-
includes/settings-page.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
tally-types.php (modified) (4 diffs)
-
types/gallery.php (added)
Legend:
- Unmodified
- Added
- Removed
-
tally-types/trunk/includes/metabox-helper.php
r1546419 r1564960 279 279 280 280 281 /* Image size Select 282 --------------------------------------*/ 283 function tallytypes_mb_field_image_size_select($arg){ 284 extract(array_merge( tallytypes_mb_field_default_arguments(), $arg )); 285 if($name == ''){ $name = $id; } 286 global $_wp_additional_image_sizes; 287 288 /* doing some data validation for Database output */ 289 $value = tallytypes_mb_field_sanitize($sanitize, $value); 290 291 tallytypes_mb_field_before($id, $title, $class); 292 echo '<select name="'.$name.'" id="'.$id.'">'; 293 echo '<option value="">--</option>'; 294 echo '<option value="thumbnail" '.selected($value, 'thumbnail').'>thumbnail</option>'; 295 echo '<option value="medium" '.selected($value, 'medium').'>medium</option>'; 296 echo '<option value="large" '.selected($value, 'large').'>large</option>'; 297 echo '<option value="full" '.selected($value, 'full').'>full</option>'; 298 foreach ( $_wp_additional_image_sizes as $item_key => $item ) { 299 echo '<option value="'.$item_key.'" '.selected($value, $item_key).'>'.$item_key.' ('.$item['width'].'x'.$item['height'].')</option>'; 300 } 301 echo '</select>'; 302 tallytypes_mb_field_after($des); 303 } 304 305 281 306 282 307 /* Class of the metabox generator … … 335 360 $field['value'] = $saved_value; 336 361 } 337 if($field['type'] == 'text'){ 338 tallytypes_mb_field_text($field); 339 }elseif($field['type'] == 'textarea'){ 340 tallytypes_mb_field_textarea($field); 341 }elseif($field['type'] == 'select'){ 342 tallytypes_mb_field_select($field); 343 }elseif($field['type'] == 'image_upload'){ 344 tallytypes_mb_field_image_upload($field); 345 }elseif($field['type'] == 'group'){ 346 tallytypes_mb_field_group($field); 347 }elseif($field['type'] == 'color'){ 348 tallytypes_mb_field_color($field); 349 } 362 363 $field_function_name = 'tallytypes_mb_field_'.$field['type']; 364 if(function_exists($field_function_name)){ 365 $field_function_name($field); 366 } 367 350 368 } 351 369 } -
tally-types/trunk/includes/settings-page.php
r1546419 r1564960 50 50 add_settings_field( 'grid', 'Enabal Grid','tallytypes_field_render_5', 'tallytypes', 'tallytypes_pluginPage_section'); 51 51 add_settings_field( 'Slider', 'Enabal Slider','tallytypes_field_render_6', 'tallytypes', 'tallytypes_pluginPage_section'); 52 add_settings_field( 'Gallery', 'Enabal Gallery','tallytypes_field_render_7', 'tallytypes', 'tallytypes_pluginPage_section'); 52 53 } 53 54 … … 123 124 echo '</select>'; 124 125 } 126 function tallytypes_field_render_7(){ 127 $id = 'gallery'; 128 $options = get_option( TALLYTYPES_OPTION_NAME ); 129 $value = (isset($options[$id])) ? $options[$id] : TALLYTYPES_ENABLE_GALLERY; 130 $value = ($value == false) ? 0 : $value; 131 echo '<select name="'.TALLYTYPES_OPTION_NAME.'['.$id.']">'; 132 echo '<option value="1" '.selected( $value, 1, false ).'>Yes</option>'; 133 echo '<option value="0" '.selected( $value, 0, false ).'>No</option>'; 134 echo '</select>'; 135 } -
tally-types/trunk/readme.txt
r1546419 r1564960 4 4 Requires at least: 4.4 5 5 Tested up to: 4.7 6 Stable tag: 2.06 Stable tag: 3.0 7 7 License: GPLv2 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.txt … … 37 37 38 38 == Changelog == 39 = 3.0 = 40 - Added new Post type Gallery 41 - Improve Metabox class 42 - Add new metabox field type "Image_size_select" 43 39 44 = 2.0 = 40 45 - Added new Post type Grid and Slider -
tally-types/trunk/tally-types.php
r1546419 r1564960 7 7 Plugin URI: http://tallythemes.com/ 8 8 Description: Provide Custom Post Types and Metaboxes 9 Version: 2.09 Version: 3.0 10 10 Author: TallyThemes 11 11 Author URI: http://tallythemes.com/ … … 40 40 define( 'TALLYTYPES_URL', plugin_dir_url( __FILE__ ) ); 41 41 define( 'TALLYTYPES_DRI', plugin_dir_path( __FILE__ ) ); 42 42 43 define( 'TALLYTYPES_OPTION_NAME', apply_filters('tallytypes_option_name', 'tallytypes_option') ); 43 define( 'TALLYTYPES_ENABLE_CAROUSEL', apply_filters('tallytypes_enable_carousel', true) ); 44 define( 'TALLYTYPES_ENABLE_SERVICES', apply_filters('tallytypes_enable_services', true) ); 45 define( 'TALLYTYPES_ENABLE_TESTIMONIALS', apply_filters('tallytypes_enable_testimonials', true) ); 46 define( 'TALLYTYPES_ENABLE_VCARD', apply_filters('tallytypes_enable_vcard', true) ); 47 define( 'TALLYTYPES_ENABLE_GRID', apply_filters('tallytypes_enable_grid', true) ); 48 define( 'TALLYTYPES_ENABLE_SLIDER', apply_filters('tallytypes_enable_slider', true) ); 44 45 define( 'TALLYTYPES_ENABLE_CAROUSEL', apply_filters('tallytypes_enable_carousel', false) ); 46 define( 'TALLYTYPES_ENABLE_SERVICES', apply_filters('tallytypes_enable_services', false) ); 47 define( 'TALLYTYPES_ENABLE_TESTIMONIALS', apply_filters('tallytypes_enable_testimonials', false) ); 48 define( 'TALLYTYPES_ENABLE_VCARD', apply_filters('tallytypes_enable_vcard', false) ); 49 define( 'TALLYTYPES_ENABLE_GRID', apply_filters('tallytypes_enable_grid', false) ); 50 define( 'TALLYTYPES_ENABLE_SLIDER', apply_filters('tallytypes_enable_slider', false) ); 51 define( 'TALLYTYPES_ENABLE_GALLERY', apply_filters('tallytypes_enable_gallery', false) ); 49 52 50 53 include('includes/metabox-helper.php'); … … 60 63 $tallytypes_is_grid = (isset($tallytypes_options['grid'])) ? $tallytypes_options['grid'] : TALLYTYPES_ENABLE_GRID; 61 64 $tallytypes_is_slider = (isset($tallytypes_options['slider'])) ? $tallytypes_options['slider'] : TALLYTYPES_ENABLE_SLIDER; 65 $tallytypes_is_gallery = (isset($tallytypes_options['gallery'])) ? $tallytypes_options['gallery'] : TALLYTYPES_ENABLE_GALLERY; 62 66 63 67 if($tallytypes_is_carousel == true){ … … 79 83 include('types/slider.php'); 80 84 } 85 if($tallytypes_is_gallery == true){ 86 include('types/gallery.php'); 87 }
Note: See TracChangeset
for help on using the changeset viewer.