Plugin Directory

Changeset 3405179


Ignore:
Timestamp:
11/28/2025 01:01:35 PM (3 months ago)
Author:
crowdaa
Message:

Version 2.2.2

Location:
crowdaa-sync
Files:
6 edited
44 copied

Legend:

Unmodified
Added
Removed
  • crowdaa-sync/tags/2.2.2/CHANGELOG

    r3383392 r3405179  
    77
    88## [Unreleased]
     9
     10## [2.2.2] - 2025-11-28
     11
     12### Changed
     13
     14- Fixed issue when updating a category from API to WP without changing the category picture : Because there is no filtering done in the plugin `custom-category-image`, it was always erasing it on the second sync.
    915
    1016## [2.2.1] - 2025-10-23
  • crowdaa-sync/tags/2.2.2/README.txt

    r3383392 r3405179  
    66Requires PHP: 7.3
    77Tested up to: 5.9
    8 Stable tag: 2.2.1
     8Stable tag: 2.2.2
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
  • crowdaa-sync/tags/2.2.2/admin/class-crowdaa-sync-add-info-wp.php

    r3376210 r3405179  
    522522  private function post_sync_api_term_picture($wp_term_id, $api_image)
    523523  {
     524    $synced_picture_prev_attachment = null;
    524525    $synced_picture_prev_image = null;
    525526    $synced_picture_ids_raw = get_term_meta($wp_term_id, 'crowdaa_picture', true);
     
    527528      $synced_picture_ids = unserialize($synced_picture_ids_raw);
    528529      $synced_picture_prev_image = $synced_picture_ids['api_id'];
     530      $synced_picture_prev_attachment = $synced_picture_ids['attachment_id'];
    529531    }
    530532
     
    563565        delete_term_meta($wp_term_id, '_category_image_id');
    564566      }
     567    } else if ($synced_picture_prev_attachment) {
     568      /*
     569       * Force the sync again because the plugin hook waits for $_POST data and will clear this field when updated...
     570       */
     571      update_term_meta($wp_term_id, '_category_image_id', $synced_picture_prev_attachment);
    565572    }
    566573  }
  • crowdaa-sync/tags/2.2.2/admin/class-crowdaa-sync-api.php

    r3383392 r3405179  
    633633      throw new Crowdaa_Sync_Error(__('Default article image not set', CROWDAA_SYNC_PLUGIN_NAME));
    634634    }
    635     $default_image = unserialize($default_image);
     635    if (is_string($default_image)) {
     636      $default_image = unserialize($default_image);
     637    }
    636638
    637639    $api_feedpicture_prev_attachment = null;
  • crowdaa-sync/tags/2.2.2/admin/partials/crowdaa-sync-admin-display.php

    r3229463 r3405179  
    210210        $default_image_url = null;
    211211        if ($default_image) {
    212           $default_image = unserialize($default_image);
     212          if (is_string($default_image)) {
     213            $default_image = unserialize($default_image);
     214          }
    213215          $default_image_url = $default_image['url'];
    214216        }
  • crowdaa-sync/tags/2.2.2/crowdaa-sync.php

    r3383392 r3405179  
    1414 * Plugin URI:       
    1515 * Description:       Plugin for synchronizing WordPress site and Crowdaa CMS
    16  * Version:           2.2.1
     16 * Version:           2.2.2
    1717 * Requires at least: 5.5
    1818 * Requires PHP:      7.2
     
    3434 * Uses SemVer - https://semver.org
    3535 */
    36 define('CROWDAA_SYNC_VERSION', '2.2.1');
     36define('CROWDAA_SYNC_VERSION', '2.2.2');
    3737define('CROWDAA_SYNC_PLUGIN_DIR', __DIR__);
    3838define('CROWDAA_SYNC_PLUGIN_NAME', 'crowdaa-sync');
  • crowdaa-sync/trunk/CHANGELOG

    r3383392 r3405179  
    77
    88## [Unreleased]
     9
     10## [2.2.2] - 2025-11-28
     11
     12### Changed
     13
     14- Fixed issue when updating a category from API to WP without changing the category picture : Because there is no filtering done in the plugin `custom-category-image`, it was always erasing it on the second sync.
    915
    1016## [2.2.1] - 2025-10-23
  • crowdaa-sync/trunk/README.txt

    r3383392 r3405179  
    66Requires PHP: 7.3
    77Tested up to: 5.9
    8 Stable tag: 2.2.1
     8Stable tag: 2.2.2
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
  • crowdaa-sync/trunk/admin/class-crowdaa-sync-add-info-wp.php

    r3376210 r3405179  
    522522  private function post_sync_api_term_picture($wp_term_id, $api_image)
    523523  {
     524    $synced_picture_prev_attachment = null;
    524525    $synced_picture_prev_image = null;
    525526    $synced_picture_ids_raw = get_term_meta($wp_term_id, 'crowdaa_picture', true);
     
    527528      $synced_picture_ids = unserialize($synced_picture_ids_raw);
    528529      $synced_picture_prev_image = $synced_picture_ids['api_id'];
     530      $synced_picture_prev_attachment = $synced_picture_ids['attachment_id'];
    529531    }
    530532
     
    563565        delete_term_meta($wp_term_id, '_category_image_id');
    564566      }
     567    } else if ($synced_picture_prev_attachment) {
     568      /*
     569       * Force the sync again because the plugin hook waits for $_POST data and will clear this field when updated...
     570       */
     571      update_term_meta($wp_term_id, '_category_image_id', $synced_picture_prev_attachment);
    565572    }
    566573  }
  • crowdaa-sync/trunk/admin/class-crowdaa-sync-api.php

    r3383392 r3405179  
    633633      throw new Crowdaa_Sync_Error(__('Default article image not set', CROWDAA_SYNC_PLUGIN_NAME));
    634634    }
    635     $default_image = unserialize($default_image);
     635    if (is_string($default_image)) {
     636      $default_image = unserialize($default_image);
     637    }
    636638
    637639    $api_feedpicture_prev_attachment = null;
  • crowdaa-sync/trunk/admin/partials/crowdaa-sync-admin-display.php

    r3229463 r3405179  
    210210        $default_image_url = null;
    211211        if ($default_image) {
    212           $default_image = unserialize($default_image);
     212          if (is_string($default_image)) {
     213            $default_image = unserialize($default_image);
     214          }
    213215          $default_image_url = $default_image['url'];
    214216        }
  • crowdaa-sync/trunk/crowdaa-sync.php

    r3383392 r3405179  
    1414 * Plugin URI:       
    1515 * Description:       Plugin for synchronizing WordPress site and Crowdaa CMS
    16  * Version:           2.2.1
     16 * Version:           2.2.2
    1717 * Requires at least: 5.5
    1818 * Requires PHP:      7.2
     
    3434 * Uses SemVer - https://semver.org
    3535 */
    36 define('CROWDAA_SYNC_VERSION', '2.2.1');
     36define('CROWDAA_SYNC_VERSION', '2.2.2');
    3737define('CROWDAA_SYNC_PLUGIN_DIR', __DIR__);
    3838define('CROWDAA_SYNC_PLUGIN_NAME', 'crowdaa-sync');
Note: See TracChangeset for help on using the changeset viewer.