Plugin Directory

Changeset 3337265


Ignore:
Timestamp:
07/31/2025 12:23:57 PM (7 months ago)
Author:
Arfa__
Message:

1.2.11

Fixed bug with loading of single listing items: 'Item ID must be an integer' error.

Location:
fast-etsy-listings/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • fast-etsy-listings/trunk/changelog.txt

    r3334758 r3337265  
    11== Changelog ==
     2
     3= 1.2.11 =
     4Fixed bug with loading of single listing items: 'Item ID must be an integer' error.
    25
    36= 1.2.10 =
  • fast-etsy-listings/trunk/constants.php

    r3334758 r3337265  
    55
    66define("FU_ETSY_PLUGIN_TITLE", "Fast Etsy Listings");
    7 define("FU_ETSY_PLUGIN_VER", "1.2.10");
     7define("FU_ETSY_PLUGIN_VER", "1.2.11");
    88define("FU_ETSY_PLUGIN_WEBSITE", "https://www.fubaby.com/wordpress-plugins/fast-etsy-listings/");
    99define("FU_ETSY_CALLCACHEEXPIRY", 360); // minutes (6 hrs)
  • fast-etsy-listings/trunk/fast-etsy-listings.php

    r3334758 r3337265  
    44 * Plugin URI: http://www.fubaby.com/wordpress-plugins/fast-etsy-listings/
    55 * Description: Display Etsy Shop listings on your site, using blocks and shortcodes.
    6  * Version: 1.2.10
     6 * Version: 1.2.11
    77 * Requires at least: 5.0
    88 * Requires PHP: 7.4
  • fast-etsy-listings/trunk/mce/mce-button-listing.js

    r3073400 r3337265  
    3838        editor.addCommand('etsy_listing_popup', function(ui, v) {
    3939            //setup defaults
    40             var id = v.id ? v.id : '';
     40            var item = v.item ? v.item : '';
    4141            var picwidth = v.picwidth ? v.picwidth : '';
    4242           
     
    4646          {
    4747            type: 'textbox',
    48             name: 'id',
     48            name: 'item',
    4949            label: editor.getLang('fuEtsyStrings.itemIdLabel'),
    50             value: id,
     50            value: item,
    5151            tooltip: editor.getLang('fuEtsyStrings.itemIdToolTip'),
    5252            minWidth: 300,
     
    6767                onsubmit: function( e ) {
    6868                    var shortcode_str = '[' + sh_tag;
    69                     // check for listing id
    70                     if (typeof e.data.id != 'undefined' && e.data.id.length)
    71                         shortcode_str += ' id="' + e.data.id + '"';
     69                    // check for item
     70                    if (typeof e.data.item != 'undefined' && e.data.item.length)
     71                        shortcode_str += ' item="' + e.data.item + '"';
    7272                    // check for picwidth
    7373                    if (typeof e.data.picwidth != 'undefined' && e.data.picwidth.length)
     
    9494        //open popup on placeholder double click
    9595        editor.on('DblClick',function(e) {
    96             var cls  = e.target.className.indexOf('wp-' + sh_tag);
    9796            if ( e.target.nodeName == 'IMG' && e.target.className.indexOf('wp-' + sh_tag) > -1 ) {
    9897                var data = e.target.attributes['data-sh-attr'].value;
     
    10099                //console.log(title);
    101100                editor.execCommand('etsy_listing_popup','',{
    102                     id : getAttr(data,'id'),
     101                    item : getAttr(data,'item'),
    103102                    picwidth : getAttr(data,'picwidth'),
    104103                });
  • fast-etsy-listings/trunk/readme.txt

    r3334758 r3337265  
    88Tested up to: 6.7
    99Requires PHP: 7.4
    10 Stable tag: 1.2.10
     10Stable tag: 1.2.11
    1111License: GPLv2 or later
    1212License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    153153== Changelog ==
    154154
     155= 1.2.11 =
     156Fixed bug with loading of single listing items: 'Item ID must be an integer' error.
     157
    155158= 1.2.10 =
    156159Fixed transient PHP warning when loading subscription info.
  • fast-etsy-listings/trunk/shortcode-listing.php

    r3073400 r3337265  
    3030    extract(shortcode_atts(array(
    3131        'id' => '',
     32        'item' => '',
    3233        'picwidth' => -1,
    3334        'arrangement' => -1
    3435    ), $atts));
    3536 
    36     $apicall = new fuEtsyItemApiCall($id);
     37    if (empty($item)) $item = $id;
     38    $apicall = new fuEtsyItemApiCall($item);
    3739    $apicall->picWidth = intval($picwidth);
    3840    if ($arrangement != -1) $apicall->arrangement = (int)$arrangement;
Note: See TracChangeset for help on using the changeset viewer.