Plugin Directory

Changeset 3356187


Ignore:
Timestamp:
09/04/2025 03:02:31 PM (7 months ago)
Author:
scaleflex
Message:

Fixed javascript error on the widget

Location:
scaleflex-vxp-dam-dmo
Files:
57 added
3 edited

Legend:

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

    r3355530 r3356187  
    55Tested up to: 6.8
    66Requires at least: 4.8
    7 Stable tag: 1.0.20
     7Stable tag: 1.0.21
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    233233* Revert back to the previous widget version
    234234
     235= 1.0.21 =
     236* Fixed javascript error on the widget
     237
    235238== Upgrade Notice ==
    236239
  • scaleflex-vxp-dam-dmo/trunk/assets/js/dam-widget/sfxvxp-widget-page.js

    r3355530 r3356187  
    134134                }
    135135
    136                 // ['IMAGE', 'VIDEO', 'AUDIO', 'DOCUMENT', 'ARCHIVE']
    137                 const mediaFrame = wp.media.frame;
    138                 const mimeType = mediaFrame.options.mimeType;
    139                 if (mimeType !== undefined) {
    140                     widgetConfig.filters = {
    141                         mimeTypes: mimeType
    142                     };
    143                 }
    144 
    145                 if (mediaFrame.options.multiple === true) {
    146                     widgetConfig.disableMultipleSelect = false;
    147                 } else {
    148                     widgetConfig.disableMultipleSelect = true;
     136                if (wp.media !== undefined) {
     137                    // ['IMAGE', 'VIDEO', 'AUDIO', 'DOCUMENT', 'ARCHIVE']
     138                    const mediaFrame = wp.media.frame;
     139                    const mimeType = mediaFrame.options.mimeType;
     140                    if (mimeType !== undefined) {
     141                        widgetConfig.filters = {
     142                            mimeTypes: mimeType
     143                        };
     144                    }
     145
     146                    if (mediaFrame.options.multiple === true) {
     147                        widgetConfig.disableMultipleSelect = false;
     148                    } else {
     149                        widgetConfig.disableMultipleSelect = true;
     150                    }
    149151                }
    150152
  • scaleflex-vxp-dam-dmo/trunk/scaleflex-vxp.php

    r3355530 r3356187  
    33 * Plugin Name: Scaleflex VXP - DAM, DMO
    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.20
     5 * Version: 1.0.21
    66 * Author: Scaleflex
    77 * Author URI: https://www.scaleflex.com
     
    1818
    1919// Define plugin constants
    20 define('SFXVXP_VERSION', '1.0.20');
     20define('SFXVXP_VERSION', '1.0.21');
    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.