Changeset 3067351
- Timestamp:
- 04/09/2024 07:43:26 AM (4 months ago)
- Location:
- carousel-slider/trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
carousel-slider/trunk/carousel-slider.php
r3066158 r3067351 4 4 * Plugin URI: https://sayfulislam.com/?utm_source=wp-plugins&utm_campaign=plugin-uri&utm_medium=wp-dash 5 5 * Description: <strong>Carousel Slider</strong> allows you to create beautiful, touch enabled, responsive carousels and sliders. It let you create SEO friendly Image carousel from Media Library or from custom URL, Video carousel using Youtube and Vimeo video, Post carousel, Hero banner slider and various types of WooCommerce products carousels. 6 * Version: 2.2. 96 * Version: 2.2. 7 7 * Author: Sayful Islam 8 8 * Author URI: https://sayfulislam.com/?utm_source=wp-plugins&utm_campaign=author-uri&utm_medium=wp-dash … … 53 53 * @var string 54 54 */ 55 private $version = '2.2. 9';55 private $version = '2.2.'; 56 56 57 57 /** -
carousel-slider/trunk/includes/Supports/Sanitize.php
r2994748 r3067351 13 13 * Sanitize number options. 14 14 * 15 * @param mixed $valueThe value to be sanitized.15 * @param The value to be sanitized. 16 16 * 17 17 * @return int|float … … 32 32 * Sanitize float number 33 33 * 34 * @param mixed $valueThe value to be sanitized.34 * @param The value to be sanitized. 35 35 * 36 36 * @return float … … 47 47 * Sanitize integer number 48 48 * 49 * @param mixed $valueThe value to be sanitized.49 * @param The value to be sanitized. 50 50 * 51 51 * @return int … … 62 62 * Sanitize email 63 63 * 64 * @param mixed $valueThe value to be sanitized.64 * @param The value to be sanitized. 65 65 * 66 66 * @return string … … 73 73 * Sanitize url 74 74 * 75 * @param mixed $valueThe value to be sanitized.75 * @param The value to be sanitized. 76 76 * 77 77 * @return string … … 90 90 * - Strips octets 91 91 * 92 * @param mixed $valueThe value to be sanitized.92 * @param The value to be sanitized. 93 93 * 94 94 * @return string … … 105 105 * input in textarea elements. 106 106 * 107 * @param mixed $valueThe value to be sanitized.107 * @param The value to be sanitized. 108 108 * 109 109 * @return string … … 118 118 * This can be used for determining if an HTML checkbox has been checked. 119 119 * 120 * @param mixed $valueThe value to be sanitized.120 * @param The value to be sanitized. 121 121 * 122 122 * @return mixed|boolean|string … … 132 132 * Check if the given input is a valid date. 133 133 * 134 * @param mixed $valueThe value to be sanitized.134 * @param The value to be sanitized. 135 135 * 136 136 * @return boolean … … 149 149 * Sanitize short block html input 150 150 * 151 * @param mixed $valueThe value to be sanitized.151 * @param The value to be sanitized. 152 152 * 153 153 * @return string … … 160 160 * Sanitize colors. 161 161 * 162 * @param mixed $valueThe color.162 * @param The color. 163 163 * 164 164 * @return string … … 174 174 175 175 // This pattern will check and match 3/6/8-character hex, rgb, rgba, hsl, & hsla colors. 176 $pattern 176 $pattern = '/^(\#[\da-f]{3}|\#[\da-f]{6}|\#[\da-f]{8}|'; 177 177 $pattern .= 'rgba\(((\d{1,2}|1\d\d|2([0-4]\d|5[0-5]))\s*,\s*){2}((\d{1,2}|1\d\d|2([0-4]\d|5[0-5]))\s*)(,\s*(0\.\d+|1))\)|'; 178 178 $pattern .= 'hsla\(\s*((\d{1,2}|[1-2]\d{2}|3([0-5]\d|60)))\s*,\s*((\d{1,2}|100)\s*%)\s*,\s*((\d{1,2}|100)\s*%)(,\s*(0\.\d+|1))\)|'; … … 193 193 * Sanitize meta value 194 194 * 195 * @param mixed $valueThe value to be sanitized.195 * @param The value to be sanitized. 196 196 * 197 197 * @return mixed … … 222 222 * Sanitize array of integer 223 223 * 224 * @param mixed $valueThe value to be sanitized.224 * @param The value to be sanitized. 225 225 * 226 226 * @return array … … 233 233 return map_deep( $value, 'intval' ); 234 234 } 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 235 305 } -
carousel-slider/trunk/modules/HeroCarousel/Admin.php
r2994748 r3067351 842 842 'left' => '1rem', 843 843 ], 844 845 846 847 844 848 ] 845 849 ); -
carousel-slider/trunk/modules/HeroCarousel/Item.php
r2994748 r3067351 84 84 * Class constructor. 85 85 * 86 * @param array $argsOptional arguments.87 * @param array $slider_settingsSlider settings.86 * @param Optional arguments. 87 * @param Slider settings. 88 88 */ 89 89 public function __construct( array $args = [], array $slider_settings = [] ) { … … 104 104 * Set setting 105 105 * 106 * @param Setting|SliderSetting $settingThe SliderSetting object.106 * @param The SliderSetting object. 107 107 */ 108 108 public function set_setting( Setting $setting ) { … … 123 123 * Get default value 124 124 * 125 * @param string $keyProps key.126 * @param mixed $defaultDefault value.125 * @param Props key. 126 * @param Default value. 127 127 * 128 128 * @return mixed|string … … 135 135 * Sanitize item data 136 136 * 137 * @param array $dataThe data to be sanitized.137 * @param The data to be sanitized. 138 138 * 139 139 * @return array … … 262 262 'left' => '3rem', 263 263 ]; 264 $slide_padding = isset( $this->slider_settings['slide_padding'] ) && is_array( $this->slider_settings['slide_padding'] ) ? 265 $this->slider_settings['slide_padding'] : []; 264 $slide_padding = []; 265 if ( isset( $this->slider_settings['slide_padding'] ) && is_array( $this->slider_settings['slide_padding'] ) ) { 266 foreach ( $this->slider_settings['slide_padding'] as $position => $value ) { 267 if ( array_key_exists( $position, $default ) ) { 268 $slide_padding[ $position ] = $value; 269 } 270 } 271 } 266 272 267 273 return wp_parse_args( $slide_padding, $default ); … … 422 428 423 429 $styles = [ 424 'padding-top' => $slide_padding['top'],425 'padding-right' => $slide_padding['right'],426 'padding-bottom' => $slide_padding['bottom'],427 'padding-left' => $slide_padding['left'],430 'padding-top' => , 431 'padding-right' => , 432 'padding-bottom' => , 433 'padding-left' => , 428 434 ]; 429 435 … … 571 577 } 572 578 573 return '<' . ( $is_full_link ? 'a' : 'div' ) . ' ' . join( ' ', Helper::array_to_attribute( $cell_attr ) ) . '>'; 579 return '<' . ( $is_full_link ? 'a' : 'div' ) . ' ' . join( ' ', 580 Helper::array_to_attribute( $cell_attr ) ) . '>'; 574 581 } 575 582 -
carousel-slider/trunk/modules/HeroCarousel/Module.php
r2994748 r3067351 4 4 5 5 use CarouselSlider\Helper; 6 6 7 7 8 defined( 'ABSPATH' ) || exit; … … 45 46 * Register view for hero carousel 46 47 * 47 * @param array $viewsList of views.48 * @param List of views. 48 49 * 49 50 * @return array … … 58 59 * Save slider content and settings 59 60 * 60 * @param int $slider_idThe slider id.61 * @param array $dataUser submitted data.61 * @param The slider id. 62 * @param User submitted data. 62 63 */ 63 64 public function save_slider( int $slider_id, array $data ) { … … 76 77 } 77 78 78 if ( isset( $data['content_settings'] ) ) {79 $this->update_content_settings( $slider_id );79 if ( isset( $data['content_settings'] ) ) { 80 $this->update_content_settings( $slider_id ); 80 81 } 81 82 } … … 84 85 * Update hero carousel settings 85 86 * 86 * @param int $post_idpost id.87 * @param post id. 87 88 */ 88 private function update_content_settings( int $post_id ) { 89 // phpcs:ignore WordPress.Security.NonceVerification.Missing 90 $setting = $_POST['content_settings'] ?? []; 89 private function update_content_settings( int $post_id, array $setting ) { 91 90 $_settings = [ 92 'slide_height' => sanitize_text_field( $setting['slide_height'] ),93 'content_width' => sanitize_text_field( $setting['content_width'] ),91 'slide_height' => ( $setting['slide_height'] ), 92 'content_width' => ( $setting['content_width'] ), 94 93 'content_animation' => sanitize_text_field( $setting['content_animation'] ), 95 94 'slide_padding' => [ 96 'top' => sanitize_text_field( $setting['slide_padding']['top'] ),97 'right' => sanitize_text_field( $setting['slide_padding']['right'] ),98 'bottom' => sanitize_text_field( $setting['slide_padding']['bottom'] ),99 'left' => sanitize_text_field( $setting['slide_padding']['left'] ),95 'top' => ( $setting['slide_padding']['top'] ), 96 'right' => ( $setting['slide_padding']['right'] ), 97 'bottom' => ( $setting['slide_padding']['bottom'] ), 98 'left' => ( $setting['slide_padding']['left'] ), 100 99 ], 101 100 ]; -
carousel-slider/trunk/readme.txt
r3066158 r3067351 4 4 Tags: carousel, carousel slider, image carousel, product carousel, slider 5 5 Requires at least: 5.6 6 Tested up to: 6. 46 Tested up to: 6. 7 7 Requires PHP: 7.0 8 Stable tag: 2.2. 88 Stable tag: 2.2. 9 9 License: GPLv3 10 10 License URI: https://www.gnu.org/licenses/gpl-3.0.txt … … 97 97 == Changelog == 98 98 99 100 101 99 102 = version 2.2.9 - 2024-04-07 = 100 103 * Dev - Update compatibility with WooCommerce High-Performance Order Storage.
Note: See TracChangeset
for help on using the changeset viewer.