Plugin Directory

Changeset 3067351

Timestamp:
04/09/2024 07:43:26 AM (4 months ago)
Author:
sayful
Message:

Add new version 2.2.10 of Carousel Slider

Location:
carousel-slider/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • carousel-slider/trunk/carousel-slider.php

    r3066158 r3067351  
    44 * Plugin URI: https://sayfulislam.com/?utm_source=wp-plugins&utm_campaign=plugin-uri&utm_medium=wp-dash
    55 * 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.9
     6 * Version: 2.2.
    77 * Author: Sayful Islam
    88 * Author URI: https://sayfulislam.com/?utm_source=wp-plugins&utm_campaign=author-uri&utm_medium=wp-dash
     
    5353         * @var string
    5454         */
    55         private $version = '2.2.9';
     55        private $version = '2.2.';
    5656
    5757        /**
  • carousel-slider/trunk/includes/Supports/Sanitize.php

    r2994748 r3067351  
    1313     * Sanitize number options.
    1414     *
    15      * @param mixed $value The value to be sanitized.
     15     * @param The value to be sanitized.
    1616     *
    1717     * @return int|float
     
    3232     * Sanitize float number
    3333     *
    34      * @param mixed $value The value to be sanitized.
     34     * @param The value to be sanitized.
    3535     *
    3636     * @return float
     
    4747     * Sanitize integer number
    4848     *
    49      * @param mixed $value The value to be sanitized.
     49     * @param The value to be sanitized.
    5050     *
    5151     * @return int
     
    6262     * Sanitize email
    6363     *
    64      * @param mixed $value The value to be sanitized.
     64     * @param The value to be sanitized.
    6565     *
    6666     * @return string
     
    7373     * Sanitize url
    7474     *
    75      * @param mixed $value The value to be sanitized.
     75     * @param The value to be sanitized.
    7676     *
    7777     * @return string
     
    9090     * - Strips octets
    9191     *
    92      * @param mixed $value The value to be sanitized.
     92     * @param The value to be sanitized.
    9393     *
    9494     * @return string
     
    105105     * input in textarea elements.
    106106     *
    107      * @param mixed $value The value to be sanitized.
     107     * @param The value to be sanitized.
    108108     *
    109109     * @return string
     
    118118     * This can be used for determining if an HTML checkbox has been checked.
    119119     *
    120      * @param mixed $value The value to be sanitized.
     120     * @param The value to be sanitized.
    121121     *
    122122     * @return mixed|boolean|string
     
    132132     * Check if the given input is a valid date.
    133133     *
    134      * @param mixed $value The value to be sanitized.
     134     * @param The value to be sanitized.
    135135     *
    136136     * @return boolean
     
    149149     * Sanitize short block html input
    150150     *
    151      * @param mixed $value The value to be sanitized.
     151     * @param The value to be sanitized.
    152152     *
    153153     * @return string
     
    160160     * Sanitize colors.
    161161     *
    162      * @param mixed $value The color.
     162     * @param The color.
    163163     *
    164164     * @return string
     
    174174
    175175        // This pattern will check and match 3/6/8-character hex, rgb, rgba, hsl, & hsla colors.
    176         $pattern  = '/^(\#[\da-f]{3}|\#[\da-f]{6}|\#[\da-f]{8}|';
     176        $pattern = '/^(\#[\da-f]{3}|\#[\da-f]{6}|\#[\da-f]{8}|';
    177177        $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))\)|';
    178178        $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))\)|';
     
    193193     * Sanitize meta value
    194194     *
    195      * @param mixed $value The value to be sanitized.
     195     * @param The value to be sanitized.
    196196     *
    197197     * @return mixed
     
    222222     * Sanitize array of integer
    223223     *
    224      * @param mixed $value The value to be sanitized.
     224     * @param The value to be sanitized.
    225225     *
    226226     * @return array
     
    233233        return map_deep( $value, 'intval' );
    234234    }
     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
    235305}
  • carousel-slider/trunk/modules/HeroCarousel/Admin.php

    r2994748 r3067351  
    842842                    'left'   => '1rem',
    843843                ],
     844
     845
     846
     847
    844848            ]
    845849        );
  • carousel-slider/trunk/modules/HeroCarousel/Item.php

    r2994748 r3067351  
    8484     * Class constructor.
    8585     *
    86      * @param array $args Optional arguments.
    87      * @param array $slider_settings Slider settings.
     86     * @param Optional arguments.
     87     * @param Slider settings.
    8888     */
    8989    public function __construct( array $args = [], array $slider_settings = [] ) {
     
    104104     * Set setting
    105105     *
    106      * @param Setting|SliderSetting $setting The SliderSetting object.
     106     * @param The SliderSetting object.
    107107     */
    108108    public function set_setting( Setting $setting ) {
     
    123123     * Get default value
    124124     *
    125      * @param string $key Props key.
    126      * @param mixed $default Default value.
     125     * @param Props key.
     126     * @param Default value.
    127127     *
    128128     * @return mixed|string
     
    135135     * Sanitize item data
    136136     *
    137      * @param array $data The data to be sanitized.
     137     * @param The data to be sanitized.
    138138     *
    139139     * @return array
     
    262262            'left'   => '3rem',
    263263        ];
    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        }
    266272
    267273        return wp_parse_args( $slide_padding, $default );
     
    422428
    423429        $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'   => ,
    428434        ];
    429435
     
    571577        }
    572578
    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 ) ) . '>';
    574581    }
    575582
  • carousel-slider/trunk/modules/HeroCarousel/Module.php

    r2994748 r3067351  
    44
    55use CarouselSlider\Helper;
     6
    67
    78defined( 'ABSPATH' ) || exit;
     
    4546     * Register view for hero carousel
    4647     *
    47      * @param array $views List of views.
     48     * @param List of views.
    4849     *
    4950     * @return array
     
    5859     * Save slider content and settings
    5960     *
    60      * @param int $slider_id The slider id.
    61      * @param array $data User submitted data.
     61     * @param The slider id.
     62     * @param User submitted data.
    6263     */
    6364    public function save_slider( int $slider_id, array $data ) {
     
    7677        }
    7778
    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 );
    8081        }
    8182    }
     
    8485     * Update hero carousel settings
    8586     *
    86      * @param int $post_id post id.
     87     * @param post id.
    8788     */
    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 ) {
    9190        $_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'] ),
    9493            'content_animation' => sanitize_text_field( $setting['content_animation'] ),
    9594            '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'] ),
    10099            ],
    101100        ];
  • carousel-slider/trunk/readme.txt

    r3066158 r3067351  
    44Tags: carousel, carousel slider, image carousel, product carousel, slider
    55Requires at least: 5.6
    6 Tested up to: 6.4
     6Tested up to: 6.
    77Requires PHP: 7.0
    8 Stable tag: 2.2.8
     8Stable tag: 2.2.
    99License: GPLv3
    1010License URI: https://www.gnu.org/licenses/gpl-3.0.txt
     
    9797== Changelog ==
    9898
     99
     100
     101
    99102= version 2.2.9 - 2024-04-07 =
    100103* Dev - Update compatibility with WooCommerce High-Performance Order Storage.
Note: See TracChangeset for help on using the changeset viewer.