Plugin Directory

Changeset 3425037


Ignore:
Timestamp:
12/22/2025 05:16:54 AM (3 months ago)
Author:
scaleflex
Message:

Fix the bug that the asset synced doesn't update metadata/URL link after being inserted again

Location:
scaleflex-vxp-dam-dmo
Files:
52 added
4 edited

Legend:

Unmodified
Added
Removed
  • scaleflex-vxp-dam-dmo/trunk/README.txt

    r3422460 r3425037  
    55Tested up to: 6.8.3
    66Requires at least: 4.8
    7 Stable tag: 1.0.30
     7Stable tag: 1.0.31
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    269269* Update README file
    270270
     271= 1.0.31 =
     272* Fix the bug that the asset synced doesn't update metadata/URL link after being inserted again
    271273
    272274== Upgrade Notice ==
  • scaleflex-vxp-dam-dmo/trunk/function/register-action.php

    r3417031 r3425037  
    11671167
    11681168        $checkFile = $this->SFXVXP_Helper->get_attachments_with_meta_value('sfxvxp_dam_uuid', $uuid);
     1169        $fileObject = json_decode(wp_json_encode($file), FALSE);
    11691170        if (!$checkFile) {
    1170             $fileObject = json_decode(wp_json_encode($file), FALSE);
    11711171            $attachment_id = $this->SFXVXP_Helper->upload_attachment_from_dam($fileObject);
    11721172            if (!$attachment_id) {
     
    11761176                ], 400);
    11771177            }
    1178             $this->SFXVXP_Helper->sync_metadata($fileObject, $attachment_id);
    11791178        } else {
    11801179            $attachment_id = $this->SFXVXP_Helper->get_attachment_id_by_meta('sfxvxp_dam_uuid', $uuid);
    1181         }
     1180            $attachment_metadata = wp_get_attachment_metadata($attachment_id);
     1181            $sfx_attachment_metadata = $this->SFXVXP_Helper->generateSfxMetadata($fr_link, $attachment_metadata, $attachment_id);
     1182            update_post_meta($attachment_id, 'sfxvxp_dam_metadata', $sfx_attachment_metadata);
     1183        }
     1184        $this->SFXVXP_Helper->sync_metadata($fileObject, $attachment_id);
    11821185
    11831186        $base_url = strtok($fr_link, '?');
  • scaleflex-vxp-dam-dmo/trunk/function/vxp-helper.php

    r3407495 r3425037  
    301301    }
    302302
    303     private function generateSfxMetadata($file_url, $attachment_metadata, $attachment_id) {
     303    public function generateSfxMetadata($file_url, $attachment_metadata, $attachment_id) {
    304304        if (isset($attachment_metadata['file']) && $attachment_metadata['file'] != '') {
    305305            $attachment_metadata['file'] = $file_url;
  • scaleflex-vxp-dam-dmo/trunk/scaleflex-vxp.php

    r3422460 r3425037  
    33 * Plugin Name: Scaleflex VXP - DAM & Cloudimage
    44 * Description: Scaleflex VXP centralizes, manages, optimizes and accelerates your media assets such as images, videos and document in one single source of truth, improving team collaboration and brand consistency.
    5  * Version: 1.0.30
     5 * Version: 1.0.31
    66 * Author: Scaleflex
    77 * Author URI: https://www.scaleflex.com
     
    1818
    1919// Define plugin constants
    20 define('SFXVXP_VERSION', '1.0.30');
     20define('SFXVXP_VERSION', '1.0.31');
    2121define('SFXVXP_PLUGIN_DIR', plugin_dir_path(__FILE__));
    2222define('SFXVXP_PLUGIN_URL', plugin_dir_url(__FILE__));
Note: See TracChangeset for help on using the changeset viewer.