Changeset 1677865
- Timestamp:
- 06/13/2017 07:13:34 PM (9 years ago)
- Location:
- bx-slider-by-trs/trunk
- Files:
-
- 9 edited
-
backend/assets/css/bxslider.css (modified) (2 diffs)
-
backend/assets/js/bxslider.js (modified) (1 diff)
-
backend/classes/class-bootstrap.php (modified) (2 diffs)
-
backend/classes/class-bx-slider-post.php (modified) (5 diffs)
-
backend/classes/class-shortcode-handler.php (modified) (3 diffs)
-
backend/includes/template-slider-item.php (modified) (1 diff)
-
bootstrap.php (modified) (1 diff)
-
frontend/classes/class-frontend-trs-bx-slider.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
bx-slider-by-trs/trunk/backend/assets/css/bxslider.css
r1676966 r1677865 8 8 9 9 .slider_img { 10 width: 100%;10 width: 50%; 11 11 height: auto; 12 12 display: block; 13 13 max-width: 100%; 14 14 } 15 16 .ui-state-highlight { 17 height: 300px; 18 line-height: 1.2em; 19 background: rgba(206, 206, 206, 0.18); 20 border: 1px solid #aaaaaa; 21 } 22 15 23 16 24 .buttons_wrapper{ … … 21 29 padding: 10px; 22 30 margin: 15px 0; 23 border : 1px dashed;31 border-bottom: 1px dashed #c4c4c4; 24 32 } 25 33 -
bx-slider-by-trs/trunk/backend/assets/js/bxslider.js
r1676073 r1677865 47 47 return false; 48 48 }); 49 50 51 if($('#adaptive_height'). prop("checked") === true){ 52 $('#slider_height').attr('readonly', true).attr('title', 'Disabled because adaptive height is enabled.'); 53 }else { 54 $('#slider_height').attr('readonly', false).attr('title', ''); 55 56 } 57 58 59 $('#adaptive_height').click(function (){ 60 61 if ($(this). prop("checked") === true) 62 $('#slider_height').attr('readonly', true).attr('title', 'Disabled because adaptive height is enabled.'); 63 else 64 $('#slider_height').attr('readonly', false).attr('title', ''); 65 66 }); 67 68 $( ".item-parent" ).sortable({ 69 placeholder: "ui-state-highlight" 70 }); 71 $( ".item-parent" ).disableSelection(); 49 72 }); 50 73 -
bx-slider-by-trs/trunk/backend/classes/class-bootstrap.php
r1677051 r1677865 16 16 $this->plugin_name = 'BX Slider by TRS'; 17 17 $this->plugin_slug = 'trs-bx-slider'; 18 $this->plugin_version = '1. 0.3';18 $this->plugin_version = '1.1'; 19 19 $this->plugin_text_domain = 'therightsol'; 20 20 … … 62 62 wp_enqueue_script('bx-slider'); 63 63 64 // jQuery Sortable 65 //wp_enqueue_script('jquery-ui-sortable'); 64 66 67 // Localization 65 68 wp_localize_script('bx-slider', 'bx_slider', [ 'ajax_url' => admin_url('admin-ajax.php') ]); 66 69 -
bx-slider-by-trs/trunk/backend/classes/class-bx-slider-post.php
r1677051 r1677865 130 130 { 131 131 $slider_meta = get_post_meta($post->ID, self::getDbSliderMetaKey(), true); 132 $slider_height = (isset($slider_meta['slider_height']) && !empty($slider_meta['slider_height'])) ? $slider_meta['slider_height'] : ''; 132 $slider_height = (isset($slider_meta['slider_height']) && !empty($slider_meta['slider_height'])) ? $slider_meta['slider_height'] : ''; 133 $adaptive_height = (isset($slider_meta['adaptive_height']) && !empty($slider_meta['adaptive_height'])) ? $slider_meta['adaptive_height'] : ''; 134 133 135 ob_start(); 134 136 ?> … … 141 143 <p class="description"><?php _e('Leave blank for auto height.'); ?></p> 142 144 </div> 145 146 <hr /> 143 147 144 148 <div class="slider_adaptive_height_wrapper"> 149 <label for="adaptive_height"><?php _e('Adaptive Height', parent::getPluginTextDomain()); ?></label> 150 <input type="checkbox" <?php echo checked('true', $adaptive_height) ?> name="slider_meta[adaptive_height]" class="adaptive_height" id="adaptive_height" value="true"> 151 <?php _e('Enable', parent::getPluginTextDomain()); ?> 152 <p class="description"><?php _e('Check to enable adaptive height. If adaptive height is checked then Slider height will not work.'); ?></p> 153 </div> 154 155 <hr /> 145 156 </div> 146 157 … … 188 199 189 200 ob_start(); 201 202 echo '<div class="item-parent">'; 190 203 191 204 foreach ($slider_imgs as $index => $imgArr){ … … 201 214 </div> 202 215 <?php 216 217 echo '</div>'; 218 203 219 $html = ob_get_clean(); 204 220 … … 262 278 } 263 279 280 if (!isset($posted_data['slider_meta']['adaptive_height'])) 281 $posted_data['slider_meta']['adaptive_height'] = false; 282 //$this->debug($posted_data, true); 283 264 284 if (isset($posted_data['slider_meta'])){ 265 285 update_post_meta( $post_id, self::$db_slider_meta_key, $posted_data['slider_meta']); 266 286 } 267 287 268 //$this->debug($posted_data, true);269 270 271 288 return; 272 289 } -
bx-slider-by-trs/trunk/backend/classes/class-shortcode-handler.php
r1677051 r1677865 6 6 7 7 public static $shortcode_slug = 'trs-bx-slider'; 8 8 private $adaptive_height = ''; 9 9 10 10 function __construct () 11 11 { 12 13 12 add_shortcode(self::getShortcodeSlug(), [$this, 'render_shortcode']); 14 13 add_action('wp_footer', [$this, 'render_dynamic_bx_slider_js']); 15 14 } 16 15 … … 21 20 { 22 21 return self::$shortcode_slug; 22 } 23 24 25 public function render_dynamic_bx_slider_js () 26 { 27 echo apply_filters('render_dynamic_bx_slider_js', (include_once (FRONTEND_INCLUDES_DIR . '/dynamic-bx-slider.php')) ); 23 28 } 24 29 … … 42 47 43 48 $slider_height = (isset($sliderMetaArr['slider_height']) && !empty($sliderMetaArr['slider_height'])) ? $sliderMetaArr['slider_height'] : ''; 44 45 $style = ''; 46 if (!empty($slider_height)): 47 $style .= 'style="'; 48 49 $style .= 'height: ' . $slider_height . 'px ; '; 50 $style .= 'width: 100%; '; 49 $adaptive_height = (isset($sliderMetaArr['adaptive_height']) && !empty($sliderMetaArr['adaptive_height'])) ? $sliderMetaArr['adaptive_height'] : ''; 51 50 52 51 53 $style .= '"'; 54 55 endif; 52 // configure class variables. 53 if (! empty($adaptive_height)){ 54 $this->adaptive_height = 'adaptiveHeight: true,'; 55 } 56 56 57 57 58 $style = ''; 59 if (empty($adaptive_height)){ 60 if (!empty($slider_height)): 61 $style .= 'style="'; 62 63 $style .= 'height: ' . $slider_height . 'px ; '; 64 $style .= 'width: 100%; '; 65 66 67 $style .= '"'; 68 69 endif; 70 } 58 71 59 72 ob_start(); -
bx-slider-by-trs/trunk/backend/includes/template-slider-item.php
r1676966 r1677865 2 2 3 3 4 <div class="item"> 4 5 <div class="item ui-state-default"> 5 6 <div class="img_and_caption_wrapper"> 6 7 <div class="img_container"> -
bx-slider-by-trs/trunk/bootstrap.php
r1677051 r1677865 15 15 * Plugin URI: # 16 16 * Description: Wonderful BX slider for WordPress. 17 * Version: 1. 0.317 * Version: 1.1 18 18 * Author: TheRightSolutions (TRS) 19 19 * Author URI: http://therightsol.com -
bx-slider-by-trs/trunk/frontend/classes/class-frontend-trs-bx-slider.php
r1677051 r1677865 26 26 wp_register_script('bx-slider-frontend', FRONTEND_ASSET_URL . '/js/bxslider-frontend.js', ['jquery'], null, true); 27 27 wp_register_style('bx-style-original', FRONTEND_ASSET_URL . '/css/jquery.bxslider.min.css', null, null, 'all'); 28 wp_register_style('bx-style-frontend', FRONTEND_ASSET_URL . '/css/bxslider-frontend.css', null, null, 'all');29 28 30 29 // Enqueuing 31 30 wp_enqueue_style('bx-style-original'); 32 31 wp_enqueue_script('bx-slider-original'); 32 wp_enqueue_style('bx-style-frontend'); 33 33 34 wp_enqueue_style('bx-style-frontend'); 35 wp_enqueue_script('bx-slider-frontend'); 34 // localization 36 35 //wp_localize_script('bx-slider', 'bx_slider', [ 'ajax_url' => admin_url('admin-ajax.php') ]); 37 36 } -
bx-slider-by-trs/trunk/readme.txt
r1677051 r1677865 18 18 19 19 == Changelog == 20 -v1.0.1-21 20 22 Dashboard GUI has been updated 23 Some Labels has been updated 24 Add Slider Short code on 'add slider' page 21 -v 1.1- 25 22 26 -v1.0.2- 23 Now you can sort slides with Slie Drag and Drop feature. 24 BX Slider has now adaptive height option. You can set it while creation of slider. 25 Enhanced slider dashboard view little bit. 27 26 28 Slider height meta option added 29 Minor bug fixed - image disappeared when slider is second time update [FIXED] 30 Add one more class for bootstrapping 27 -v 1.0.3- 31 28 32 -v1.0.3- 29 Minor Bug Fixes 33 30 34 Minor Bug Fixes 31 -v 1.0.2- 32 33 Slider height meta option added 34 Minor bug fixed - image disappeared when slider is second time update [FIXED] 35 Add one more class for bootstrapping 36 37 -v 1.0.1- 38 39 Dashboard GUI has been updated 40 Some Labels has been updated 41 Add Slider Short code on 'add slider' page 42 43 -v 1.0.0- 44 45 Starting the jurney
Note: See TracChangeset
for help on using the changeset viewer.