Changeset 1076239
- Timestamp:
- 01/26/2015 08:39:23 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
showcase-visual-composer-addon/trunk/includes/vc-showcase.php
r1076237 r1076239 3 3 add_action( 'vc_before_init', 'showcase_vc_addon_function' ); 4 4 5 6 7 5 add_shortcode_param( 'number', 'sc_number_field' ); 8 // Function generate param type "number"9 6 function sc_number_field($settings, $value) 10 7 { … … 16 13 $suffix = isset($settings['suffix']) ? $settings['suffix'] : ''; 17 14 $class = isset($settings['class']) ? $settings['class'] : ''; 18 $output = '<input type="number" min="'.$min.'" max="'.$max.'" class="wpb_vc_param_value ' . $param_name . ' ' . $type . ' ' . $class . '" name="' . $param_name . '" value="'.$value.'" style="max-width:100px; margin-right: 10px;" />'.$suffix;15 $output .= '<input type="number" min="'.$min.'" max="'.$max.'" class="wpb_vc_param_value ' . $param_name . ' ' . $type . ' ' . $class . '" name="' . $param_name . '" value="'.$value.'" style="max-width:100px; margin-right: 10px;" />'.$suffix; 19 16 return $output; 20 17 } 21 18 22 // Generate param type "sc_title_separator"23 19 add_shortcode_param( 'sc_title_separator', 'sc_title_separator_field' ); 24 20 function sc_title_separator_field( $settings, $value ) { … … 26 22 $type = isset($settings['type']) ? $settings['type'] : ''; 27 23 $class = isset($settings['class']) ? $settings['class'] : ''; 28 $output = '<h4 class="wpb-textinput wpb_vc_param_value ' . $param_name . ' ' . $type . ' ' . $class . '">• '. $value .'</h4>';24 $output .= '<h4 class="wpb-textinput wpb_vc_param_value ' . $param_name . ' ' . $type . ' ' . $class . '">• '. $value .'</h4>'; 29 25 return $output; 30 26 } 31 27 32 // Generate param type "custom_size"33 28 add_shortcode_param( 'custom_size', 'sc_custom_size' ); 34 29 function sc_custom_size( $settings, $value ) { … … 50 45 } 51 46 52 53 47 function showcase_vc_addon_function() { 54 48
Note: See TracChangeset
for help on using the changeset viewer.