Plugin Directory

Changeset 3244631


Ignore:
Timestamp:
02/21/2025 06:24:00 PM (10 months ago)
Author:
robosoft
Message:

3.2.24 - fix YouTube API issue, fixed media manager field issues

Location:
robo-gallery
Files:
1107 added
6 edited

Legend:

Unmodified
Added
Removed
  • robo-gallery/trunk/app/extensions/fields/config/metabox/image.php

    r2882999 r3244631  
    5454            'prefix' => null,
    5555            'name' => 'galleryImages',
     56            'cb_sanitize' => 'sanitizeDigitArrayAsString',
    5657            'default' => '',
    5758        ),
  • robo-gallery/trunk/app/extensions/fields/include/roboGalleryFieldsField/roboGalleryFieldsField.php

    r2882999 r3244631  
    270270
    271271    protected function normalize($value){
    272         if ($this->cbSanitize && is_callable($this->cbSanitize)) {
    273             $value = call_user_func($this->cbSanitize, $value);
    274         }
     272        if ($this->cbSanitize ){
     273            if( is_callable($this->cbSanitize)) {
     274                $value = call_user_func($this->cbSanitize, $value);
     275            }
     276
     277            if ( method_exists( $this, $this->cbSanitize ) ) {
     278                $value = call_user_func( array($this, $this->cbSanitize), $value);
     279            }
     280        }
     281
    275282        return $value;
    276283    }
     284
     285
     286    public function sanitizeDigitArrayAsString($value){
     287         $array = $this->sanitizeArray($value);
     288
     289        for ($i = 0; $i < count($array); $i++) {
     290            $array[$i] = (int) $array[$i];
     291        }
     292
     293        return implode( ',', $array );
     294    }
     295
     296    public function sanitizeArrayAsString($value){
     297        $array = $this->sanitizeArray($value);
     298        return implode( ',', $array );
     299    }
     300
     301    public function sanitizeArray($value){
     302        if( is_null($value) ){
     303            return array();
     304        }
     305       
     306        if( is_string($value) ){
     307            $array = explode( ',', $value );
     308        }else{
     309            $array = $value;
     310        }
     311       
     312        if( !is_array($array) ){ return array(); }
     313
     314        return $array;
     315    }
    277316}
  • robo-gallery/trunk/app/extensions/fields/template/field/text/images.tpl.php

    r3066013 r3244631  
    5454wp_enqueue_style ( ROBO_GALLERY_ASSETS_PREFIX.'-field-type-gallery', ROBO_GALLERY_FIELDS_URL.'asset/fields/gallery/style.css', array( ), '' );
    5555
    56 if ( $value == null || empty( $value ) || $value == ' ' || $value == '' ) $value = '';
     56$value = is_array($value) ? implode(',', $value) : $value;
    5757?>
    5858
     
    7070        <?php _e('Manage Images', 'robo-gallery'); ?>
    7171    </button>
    72     <?php $value = is_array($value) ? implode(',', $value) : $value; ?>
    7372    <input id="<?php echo $id; ?>" <?php echo $attributes; ?> type="hidden" name="<?php echo $name; ?>" value="<?php echo $value; ?>">
    7473</div>
  • robo-gallery/trunk/includes/rbs_gallery_settings.php

    r2952377 r3244631  
    11<?php
    2 /*
    3 *      Robo Gallery     
    4 *      Version: 3.2.14 - 40722
    5 *      By Robosoft
    6 *
    7 *      Contact: https://robogallery.co/
    8 *      Created: 2021
    9 *      Licensed under the GPLv2 license - http://opensource.org/licenses/gpl-2.0.php
    10 
    11  */
     2/* @@copyright@@ */
    123
    134if (! defined('WPINC')) {
     
    5950        register_setting('robo_gallery_settings_assets', ROBO_GALLERY_PREFIX.'jsFiles');
    6051
    61 
    6252        $args = array(
    63             'type' => 'string',
    64             'sanitize_callback' => 'sanitize_key',
    65             'default' => NULL,
    66         );
     53            'type' => 'string',
     54            'sanitize_callback' => 'sanitize_text_field',
     55            'default' => NULL,
     56        );
     57
    6758        register_setting('robo_gallery_settings_youtube', ROBO_GALLERY_PREFIX.'youtubeApiKey', $args);
    6859        register_setting('robo_gallery_settings_youtube', ROBO_GALLERY_PREFIX.'youtubeCacheTime');
     
    248239    public function youtubeOptions()
    249240    {
    250         $option_youtube = sanitize_key( get_option(ROBO_GALLERY_PREFIX.'youtubeApiKey', '') );
     241        $option_youtube =  sanitize_text_field( get_option(ROBO_GALLERY_PREFIX.'youtubeApiKey', '') );
    251242        ?>
    252243            <tr>
  • robo-gallery/trunk/readme.txt

    r3201991 r3244631  
    55Requires at least: 3.3
    66Tested up to: 6.7
    7 Stable tag: 3.2.23
     7Stable tag: 3.2.24
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    240240== Changelog ==
    241241
    242 = 3.2.23 =
    243 *  Fixed post code issues
    244 *  Compatibility with WordPress 6.7
     242= 3.2.24 =
     243*  Fix YouTube API issue, fixed media manager field issues
    245244
    246245= 3.2.22 =
     
    747746== Upgrade Notice ==
    748747
    749 = 3.2.23 =
    750 Fixed post code issues
    751 Compatibility with WordPress 6.7
     748= 3.2.24 =
     749Fix YouTube API issue, fixed media manager field issues
  • robo-gallery/trunk/robogallery.php

    r3201991 r3244631  
    44Plugin URI: https://robosoft.co/gallery
    55Description: Gallery modes photo gallery, images gallery, video gallery, Polaroid gallery, gallery lightbox, portfolio gallery, responsive gallery
    6 Version: 3.2.23
     6Version: 3.2.24
    77Author: RoboSoft
    88Author URI: https://robosoft.co/gallery
     
    1414if( !defined('WPINC') ) die;
    1515
    16 define("ROBO_GALLERY_VERSION",              '3.2.23' );
     16define("ROBO_GALLERY_VERSION",              '3.2.24' );
    1717
    1818
Note: See TracChangeset for help on using the changeset viewer.