Plugin Directory

Changeset 3461928


Ignore:
Timestamp:
02/15/2026 04:20:57 PM (3 weeks ago)
Author:
codeconfig
Message:

Release 1.3.7

Location:
integration-google-drive
Files:
12 edited
1 copied

Legend:

Unmodified
Added
Removed
  • integration-google-drive/tags/1.3.7/app/Authorization.php

    r3403340 r3461928  
    4141
    4242            $accessToken = $googleClient->authenticate($code);
     43
    4344            if (false === $accessToken) {
    4445                Notices::getInstance()->add([
  • integration-google-drive/tags/1.3.7/app/Client.php

    r3457775 r3461928  
    33namespace CodeConfig\IGD\App;
    44
    5 use function CodeConfig\ccpigd_fs;
    65use CodeConfig\IGD\Google\Client as GoogleClient;
    76use CodeConfig\IGD\Models\Notices;
     
    109use Exception;
    1110use WP_Error;
     11use function CodeConfig\ccpigd_fs;
    1212defined( 'ABSPATH' ) || exit( 'No direct script access allowed' );
    1313class Client {
  • integration-google-drive/tags/1.3.7/core/config.php

    r3457775 r3461928  
    88define('CCPIGD_DB_VERSION', '1.0.0');
    99define('CCPIGD_OPTIONS_VERSION', '1.0.0');
    10 define('CCPIGD_VERSION', '1.3.6');
     10define('CCPIGD_VERSION', '1.3.7');
    1111
    1212/**
  • integration-google-drive/tags/1.3.7/includes/Utils/Helpers.php

    r3457775 r3461928  
    22
    33namespace CodeConfig\IGD\Utils;
    4 
    5 use function array_key_exists;
    64
    75use CodeConfig\IGD\App\App;
    86use CodeConfig\IGD\Models\Notices;
    97
     8use function array_key_exists;
    109use function is_array;
    1110use function is_string;
     
    157156
    158157        $defaultSettings = ccpigdGetDefaultSettings();
    159 
    160         $validateData = self::sanitizeRecursiveSettings($settings, $defaultSettings, 'encode');
     158        $existingSettings = get_option(CCPIGD_OPTIONS_NAME, []);
     159        $validateDefault = self::sanitizeRecursiveSettings($existingSettings, $defaultSettings, 'decode');
     160
     161        $validateData = self::sanitizeRecursiveSettings($settings, $validateDefault, 'encode');
    161162
    162163        return update_option(CCPIGD_OPTIONS_NAME, $validateData);
     
    169170
    170171            if (is_array($value)) {
    171                 $sanitized[$key] = array_key_exists($key, $settings) && is_array($settings[$key]) ? self::sanitizeRecursiveSettings(wp_parse_args($settings[$key], $value), $value, $sensitive) : $value;
     172
     173                if (self::isSequentialArray($value) || (empty($value) && self::isSequentialArray($settings[$key]))) {
     174                    $sanitized[$key] = array_key_exists($key, $settings) && is_array($settings[$key])
     175                                ? array_values($settings[$key])
     176                                : $value;
     177
     178                } else {
     179                    $sanitized[$key] = array_key_exists($key, $settings) && is_array($settings[$key]) ? self::sanitizeRecursiveSettings(wp_parse_args($settings[$key], $value), $value, $sensitive) : $value;
     180                }
    172181            } else {
    173182
     
    177186                } elseif ('appClientSecret' === $key) {
    178187                    if ($sensitive === 'encode') {
    179                         $sanitized[$key] = self::encode($settings[$key] ?? '');
     188                        $sanitized[$key] = (strpos($settings[$key], '******') !== false) ? self::encode($value) : self::encode($settings[$key] ?? '');
    180189                    } elseif ($sensitive === 'mask') {
    181190                        $decodedAppSecret = self::decode($settings[$key] ?? '');
     
    196205
    197206        return $sanitized;
     207    }
     208
     209    private static function isSequentialArray(array $array): bool
     210    {
     211        return array_keys($array) === range(0, count($array) - 1);
    198212    }
    199213
  • integration-google-drive/tags/1.3.7/integration-google-drive.php

    r3457775 r3461928  
    99 * Plugin URI:        https://codeconfig.dev/integration-google-drive/
    1010 * Description:       Seamlessly integrate Google Drive with WordPress to embed, share, play, and download documents and media files directly from Google Drive.
    11  * Version:           1.3.6
     11 * Version:           1.3.7
    1212 * Requires at least: 6.2
    1313 * Requires PHP:      7.4
  • integration-google-drive/tags/1.3.7/readme.txt

    r3458033 r3461928  
    11=== Integration for Google Drive - Embeds, Gallery, Slider, Media Player, and Media Library Support ===
    2 Contributors: codeconfig, jakirmithunbd
     2Contributors: codeconfig, jakirmithunbd, freemius
    33Tags: google drive, file manager, gallery, media library, embed
    44Requires at least: 6.2
    55Tested up to: 6.9
    66Requires PHP: 7.4
    7 Stable tag: 1.3.6
     7Stable tag: 1.3.7
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    338338
    339339== Changelog ==
     340
     341= 1.3.7 (15-02-2026) =
     342* Fix: Media Library and integration saving issues
    340343
    341344= 1.3.6 (10-02-2026) =
  • integration-google-drive/trunk/app/Authorization.php

    r3403340 r3461928  
    4141
    4242            $accessToken = $googleClient->authenticate($code);
     43
    4344            if (false === $accessToken) {
    4445                Notices::getInstance()->add([
  • integration-google-drive/trunk/app/Client.php

    r3457775 r3461928  
    33namespace CodeConfig\IGD\App;
    44
    5 use function CodeConfig\ccpigd_fs;
    65use CodeConfig\IGD\Google\Client as GoogleClient;
    76use CodeConfig\IGD\Models\Notices;
     
    109use Exception;
    1110use WP_Error;
     11use function CodeConfig\ccpigd_fs;
    1212defined( 'ABSPATH' ) || exit( 'No direct script access allowed' );
    1313class Client {
  • integration-google-drive/trunk/core/config.php

    r3457775 r3461928  
    88define('CCPIGD_DB_VERSION', '1.0.0');
    99define('CCPIGD_OPTIONS_VERSION', '1.0.0');
    10 define('CCPIGD_VERSION', '1.3.6');
     10define('CCPIGD_VERSION', '1.3.7');
    1111
    1212/**
  • integration-google-drive/trunk/includes/Utils/Helpers.php

    r3457775 r3461928  
    22
    33namespace CodeConfig\IGD\Utils;
    4 
    5 use function array_key_exists;
    64
    75use CodeConfig\IGD\App\App;
    86use CodeConfig\IGD\Models\Notices;
    97
     8use function array_key_exists;
    109use function is_array;
    1110use function is_string;
     
    157156
    158157        $defaultSettings = ccpigdGetDefaultSettings();
    159 
    160         $validateData = self::sanitizeRecursiveSettings($settings, $defaultSettings, 'encode');
     158        $existingSettings = get_option(CCPIGD_OPTIONS_NAME, []);
     159        $validateDefault = self::sanitizeRecursiveSettings($existingSettings, $defaultSettings, 'decode');
     160
     161        $validateData = self::sanitizeRecursiveSettings($settings, $validateDefault, 'encode');
    161162
    162163        return update_option(CCPIGD_OPTIONS_NAME, $validateData);
     
    169170
    170171            if (is_array($value)) {
    171                 $sanitized[$key] = array_key_exists($key, $settings) && is_array($settings[$key]) ? self::sanitizeRecursiveSettings(wp_parse_args($settings[$key], $value), $value, $sensitive) : $value;
     172
     173                if (self::isSequentialArray($value) || (empty($value) && self::isSequentialArray($settings[$key]))) {
     174                    $sanitized[$key] = array_key_exists($key, $settings) && is_array($settings[$key])
     175                                ? array_values($settings[$key])
     176                                : $value;
     177
     178                } else {
     179                    $sanitized[$key] = array_key_exists($key, $settings) && is_array($settings[$key]) ? self::sanitizeRecursiveSettings(wp_parse_args($settings[$key], $value), $value, $sensitive) : $value;
     180                }
    172181            } else {
    173182
     
    177186                } elseif ('appClientSecret' === $key) {
    178187                    if ($sensitive === 'encode') {
    179                         $sanitized[$key] = self::encode($settings[$key] ?? '');
     188                        $sanitized[$key] = (strpos($settings[$key], '******') !== false) ? self::encode($value) : self::encode($settings[$key] ?? '');
    180189                    } elseif ($sensitive === 'mask') {
    181190                        $decodedAppSecret = self::decode($settings[$key] ?? '');
     
    196205
    197206        return $sanitized;
     207    }
     208
     209    private static function isSequentialArray(array $array): bool
     210    {
     211        return array_keys($array) === range(0, count($array) - 1);
    198212    }
    199213
  • integration-google-drive/trunk/integration-google-drive.php

    r3457775 r3461928  
    99 * Plugin URI:        https://codeconfig.dev/integration-google-drive/
    1010 * Description:       Seamlessly integrate Google Drive with WordPress to embed, share, play, and download documents and media files directly from Google Drive.
    11  * Version:           1.3.6
     11 * Version:           1.3.7
    1212 * Requires at least: 6.2
    1313 * Requires PHP:      7.4
  • integration-google-drive/trunk/readme.txt

    r3458033 r3461928  
    11=== Integration for Google Drive - Embeds, Gallery, Slider, Media Player, and Media Library Support ===
    2 Contributors: codeconfig, jakirmithunbd
     2Contributors: codeconfig, jakirmithunbd, freemius
    33Tags: google drive, file manager, gallery, media library, embed
    44Requires at least: 6.2
    55Tested up to: 6.9
    66Requires PHP: 7.4
    7 Stable tag: 1.3.6
     7Stable tag: 1.3.7
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    338338
    339339== Changelog ==
     340
     341= 1.3.7 (15-02-2026) =
     342* Fix: Media Library and integration saving issues
    340343
    341344= 1.3.6 (10-02-2026) =
Note: See TracChangeset for help on using the changeset viewer.