Plugin Directory

Changeset 2863220


Ignore:
Timestamp:
02/10/2023 11:59:58 AM (3 years ago)
Author:
zooza
Message:

Fixed rendering of Calendar, Video and Checkout widgets

Location:
zooza/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • zooza/trunk/README.txt

    r2807739 r2863220  
    55Requires at least: 3.0.1
    66Tested up to: 6.0.2
    7 Stable tag: 1.0.1
     7Stable tag: 1.0.2
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3535= 1.0.1 =
    3636* Initial version of the plugin
     37
     38= 1.0.2 =
     39* Fixed loading of Calendar, Video and Checkout widgets
  • zooza/trunk/includes/class-zooza.php

    r2807739 r2863220  
    7171            $this->version = ZOOZA_VERSION;
    7272        } else {
    73             $this->version = '1.0.0';
     73            $this->version = '1.0.2';
    7474        }
    7575        $this->plugin_name = 'zooza';
  • zooza/trunk/public/class-zooza-public.php

    r2807739 r2863220  
    9797    private function get_code( $widget, $api_key )    {
    9898
    99         return sprintf( "<script data-version='v1' data-widget-id='zooza' id='%s' type='text/javascript'>
     99        $version = 'v1';
     100
     101        $v2 = array( 'calendar', 'video', 'checkout' );
     102        if( in_array( $widget, $v2 ) )  {
     103            $version = 'v2';
     104        }
     105
     106        return sprintf( "<script data-version='%s' data-widget-id='zooza' id='%s' type='text/javascript'>
    100107( function() {
    101108function async_load(){
    102109    var s = document.createElement('script'); s.type = 'text/javascript'; s.async = true;
    103     var url = '//api.zooza.sk/widgets/v1';
     110    var url = '//api.zooza.sk/widgets/%s';
    104111    s.src = url + ( url.indexOf( '?' ) >= 0 ? '&' : '?' ) + 'ref=' + encodeURIComponent( window.location.href ) + '&type=%s';
    105112    var embedder = document.getElementById( '%s' );
     
    112119}
    113120} )();
    114 </script>", $api_key, $widget, $api_key );
     121</script>", $version, $api_key, $version, $widget, $api_key );
    115122
    116123    }
  • zooza/trunk/zooza.php

    r2807739 r2863220  
    1717 * Plugin URI:        https://zooza.sk/wordpress-plugin
    1818 * Description:       Plugin pre zákazníkov platformy Zooza pre jednoduché nastavenie registračných formulárov.
    19  * Version:           1.0.1
     19 * Version:           1.0.2
    2020 * Author:            Zooza
    2121 * Author URI:        https://zooza.sk
     
    3636 * Rename this for your plugin and update it as you release new versions.
    3737 */
    38 define( 'ZOOZA_VERSION', '1.0.1' );
     38define( 'ZOOZA_VERSION', '1.0.2' );
    3939
    4040/**
Note: See TracChangeset for help on using the changeset viewer.