Plugin Directory

Changeset 3273977


Ignore:
Timestamp:
04/15/2025 10:40:03 PM (12 months ago)
Author:
fullworks
Message:

Adding version 6.2.2

Location:
widget-for-eventbrite-api
Files:
8 added
24 edited
1 copied

Legend:

Unmodified
Added
Removed
  • widget-for-eventbrite-api/tags/6.2.2/admin/class-admin-pages.php

    r3250726 r3273977  
    180180
    181181    public function settings_setup() {
     182
     183        $this->settings_title = esc_html__( 'Display Eventbrite Events Settings', 'widget-for-eventbrite-api' );
     184
    182185
    183186        /* top level
  • widget-for-eventbrite-api/tags/6.2.2/admin/class-admin-settings.php

    r3250726 r3273977  
    3030        $this->version = $version;
    3131        $this->freemius = $freemius;
    32         $this->settings_title = esc_html__( 'Display Eventbrite Events Settings', 'widget-for-eventbrite-api' );
    3332        parent::__construct();
    3433    }
  • widget-for-eventbrite-api/tags/6.2.2/changelog.txt

    r3250726 r3273977  
     1= 6.2.2 =
     2Fix multiple issues with WP 6.8 compatability
     3
    14= 6.2.1 =
    25* Fix issue with wizard
  • widget-for-eventbrite-api/tags/6.2.2/frontend/class-frontend.php

    r3250726 r3273977  
    1111use stdClass;
    1212use WidgetForEventbriteAPI\Admin\Admin_Settings;
     13use WidgetForEventbriteAPI\Includes\Compat_Template_Loader;
    1314use WidgetForEventbriteAPI\Includes\ICS;
    1415use WidgetForEventbriteAPI\Includes\Template_Loader;
     16use WidgetForEventbriteAPI\Includes\Simple_Template_Loader;
    1517use WidgetForEventbriteAPI\Includes\Eventbrite_Query;
    1618use WidgetForEventbriteAPI\Includes\Twig;
     19use WidgetForEventbriteAPI\Includes\Utilities;
    1720use WidgetForEventbriteAPI\Shortcodes\Shortcodes;
    1821use WP_Block_Type_Registry;
     
    131134            ob_start();
    132135            $theme = wp_get_theme();
    133             $template_loader = new Template_Loader();
     136            $template_loader = new Compat_Template_Loader();
     137            $p = get_post();
    134138            $template_loader->set_template_data( array(
    135139                'template_loader' => $template_loader,
     
    138142                'template'        => strtolower( $theme->template ),
    139143                'plugin_name'     => $this->plugin_name,
    140                 'utilities'       => $this->utilities,
     144                'utilities'       => new Utilities($p),
    141145                'unique_id'       => uniqid(),
    142146                'instance'        => $wfea_instance_counter,
  • widget-for-eventbrite-api/tags/6.2.2/includes/class-utilities.php

    r3250726 r3273977  
    5353    private $freemius;
    5454
     55    private $event;
     56
    5557    /**
    5658     * Utilities constructor.
     
    7375        }
    7476        return self::$instance;
     77    }
     78
     79    public function set_event( $event ) {
     80        $this->event = $event;
     81    }
     82
     83    public function get_event() {
     84        return $this->event;
    7585    }
    7686
     
    281291     */
    282292    public function get_booknow_link( $args ) {
    283         return $this->format_booknow_link( $args, get_post()->url );
     293        return $this->format_booknow_link( $args, $this->get_event()->url );
    284294    }
    285295
     
    300310        $cta['availability_class'] = 'event__available';
    301311        $cta['class'] = ( isset( $arg[1] ) ? $arg[1] : 'book-now__link' );
    302         if ( 'completed' == get_post()->status || 'ended' == get_post()->status ) {
     312        if ( 'completed' == $this->get_event()->status || 'ended' == $this->get_event()->status ) {
    303313            $cta['availability_class'] = 'event__past';
    304314            if ( $this->get_element( 'past_event_button', $args ) ) {
     
    309319            }
    310320        }
    311         if ( 'started' == get_post()->status ) {
     321        if ( 'started' == $this->get_event()->status ) {
    312322            $cta['availability_class'] = 'event__started';
    313323            if ( $this->get_element( 'started_event_button', $args ) ) {
     
    412422
    413423    public function get_event_attr( $attr ) {
    414         return $this->get_value_by_string( get_post(), $attr );
     424        return $this->get_value_by_string( $this->get_event(), $attr );
    415425    }
    416426
     
    428438     */
    429439    public function get_event_eb_url( $ext = null ) {
    430         $post = get_post();
     440        $post = $this->get_event();
    431441        return apply_filters( 'wfea_eb_url', $post->url . $ext );
    432442    }
     
    447457     */
    448458    public function get_event_end() {
    449         return apply_filters( 'wfea_eventbrite_event_end', get_post()->end );
     459        return apply_filters( 'wfea_eventbrite_event_end', $this->get_event()->end );
    450460    }
    451461
     
    465475     */
    466476    public function get_event_start() {
    467         return apply_filters( 'wfea_eventbrite_event_start', get_post()->start );
     477        return apply_filters( 'wfea_eventbrite_event_start', $this->get_event()->start );
    468478    }
    469479
     
    558568     */
    559569    public function get_original_booknow_link( $args ) {
    560         return $this->format_booknow_link( $args, get_post()->eb_url );
     570        return $this->format_booknow_link( $args, $this->get_event()->eb_url );
    561571    }
    562572
  • widget-for-eventbrite-api/tags/6.2.2/includes/vendor/gamajo/template-loader/class-gamajo-template-loader.php

    r1784834 r3273977  
    257257
    258258            if ( $load && $located ) {
    259                 load_template( $located, $require_once );
     259                require_once $located;
    260260            }
    261261
  • widget-for-eventbrite-api/tags/6.2.2/includes/widgets/elementor/class-eventbrite-widget-elementor-helpers.php

    r3163179 r3273977  
    223223        $events = Eventbrite_Manager::$instance->get_organizations_events( $args, false );
    224224        if ( !is_wp_error( $events ) ) {
    225             wp_send_json( wp_list_pluck( $events->events, 'post_title', 'ID' ) );
     225            wp_send_json( wp_list_pluck( $events->events ?? array(), 'post_title', 'ID' ) );
    226226        }
    227227        die;
     
    248248        }
    249249        $events = $this->get_events_list( $args );
    250         $events_options = wp_list_pluck( $events, $option_type );
     250        $events_options = wp_list_pluck( $events ?? array(), $option_type );
    251251        $dropdown_options = array();
    252252        foreach ( $events_options as $event_option ) {
     
    282282            false
    283283        );
    284         $organizations_list = wp_list_pluck( $response->organizations, 'name', 'id' );
     284        $organizations_list = wp_list_pluck( $response->organizations ?? array(), 'name', 'id' );
    285285        $organizations_list = array(
    286286            '' => __( 'Select', 'widget-for-eventbrite-api' ),
     
    297297        );
    298298        if ( !is_wp_error( $subcats ) ) {
    299             return wp_list_pluck( $subcats->subcategories, 'name', 'id' );
     299            return wp_list_pluck( $subcats->subcategories ?? array(), 'name', 'id' );
    300300        }
    301301        return array();
  • widget-for-eventbrite-api/tags/6.2.2/readme.txt

    r3250726 r3273977  
    22Contributors: fullworks
    33Tags: eventbrite, widget, events, eventbrite widget, eventbrite shortcode
    4 Tested up to: 6.7
    5 Stable tag: 6.2.1
     4Tested up to: 6.8
     5Stable tag: 6.2.2
    66Requires PHP: 7.4
    77License: GPL-2.0-or-later
  • widget-for-eventbrite-api/tags/6.2.2/templates__free/common_layout_card.php

    r3156254 r3273977  
    1616        <?php
    1717        $data->args['readmore'] = false;
    18         if ( false !== $data->events && $data->events->have_posts() ) {
    19             while ( $data->events->have_posts() ) {
    20                 $data->events->the_post();
     18        if ( ( $data->events->post_count ?? 0 ) > 0 ) {
     19            foreach ( $data->events->posts as $event ) {
     20                $data->utilities->set_event( $event );
    2121                $data->event->booknow = $data->utilities->get_booknow_link( $data->args );
    2222                $data->event->cta     = $data->utilities->get_cta( $data->args );
  • widget-for-eventbrite-api/tags/6.2.2/templates__free/common_layout_widget.php

    r3156254 r3273977  
    2222    ( ! empty( $data->utilities->get_element( 'style', $data->args ) ) ? '' . esc_attr( $data->utilities->get_element( 'style', $data->args ) ) . '' : '' )
    2323);
    24 if ( false !== $data->events && $data->events->have_posts() ) {
     24if ( ( $data->events->post_count ?? 0) > 0 ) {
    2525    $data->template_loader->get_template_part( 'paginate_links_top' . $data->event->plan);
    2626    ?>
    2727    <div class="eaw-ulx">
    28         <?php while ( $data->events->have_posts() ) {
    29             $data->events->the_post();
     28        <?php foreach ( $data->events->posts as $event ) {
     29            $data->utilities->set_event( $event );
    3030            $data->event->booknow = $data->utilities->get_booknow_link( $data->args );
    3131            $data->event->cta     = $data->utilities->get_cta( $data->args );
  • widget-for-eventbrite-api/tags/6.2.2/widget-for-eventbrite-api.php

    r3250726 r3273977  
    77 * Plugin URI:        https://fullworksplugins.com/products/widget-for-eventbrite/
    88 * Description:       Easily display Eventbrite events on your WordPress site
    9  * Version:           6.2.1
     9 * Version:           6.2.2
    1010 * Requires at least: 5.6
    1111 * Requires PHP:      7.4
     
    4242define( 'WIDGET_FOR_EVENTBRITE_API_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
    4343define( 'WIDGET_FOR_EVENTBRITE_API_PLUGINS_TOP_DIR', plugin_dir_path( __DIR__ ) );
    44 define( 'WIDGET_FOR_EVENTBRITE_API_PLUGIN_VERSION', '6.2.1' );
     44define( 'WIDGET_FOR_EVENTBRITE_API_PLUGIN_VERSION', '6.2.2' );
    4545// Include the plugin autoloader, so we can dynamically include the classes.
    4646require_once WIDGET_FOR_EVENTBRITE_API_PLUGIN_DIR . 'includes/vendor/autoload.php';
  • widget-for-eventbrite-api/tags/6.2.2/widgets/class-widget.php

    r3250726 r3273977  
    77
    88use stdClass;
     9use WidgetForEventbriteAPI\Includes\Compat_Template_Loader;
    910use WidgetForEventbriteAPI\Includes\Eventbrite_Query;
    1011use WidgetForEventbriteAPI\Includes\Template_Loader;
     12use WidgetForEventbriteAPI\Includes\Simple_Template_Loader;
    1113use WidgetForEventbriteAPI\Includes\Utilities;
    1214use WP_Widget;
     
    628630            $template = 'layout_widget';
    629631            $theme = wp_get_theme();
    630             $template_loader = new Template_Loader();
     632            $template_loader = new Compat_Template_Loader();
    631633            $template_loader->set_template_data( array(
    632634                'template_loader' => $template_loader,
     
    635637                'template'        => strtolower( $theme->template ),
    636638                'plugin_name'     => 'widget-for-eventbrite-api',
    637                 'utilities'       => $this->utilities,
     639                'utilities'       => new Utilities(get_post()),
    638640                'unique_id'       => uniqid(),
    639641                'instance'        => $wfea_instance_counter,
  • widget-for-eventbrite-api/trunk/admin/class-admin-pages.php

    r3250726 r3273977  
    180180
    181181    public function settings_setup() {
     182
     183        $this->settings_title = esc_html__( 'Display Eventbrite Events Settings', 'widget-for-eventbrite-api' );
     184
    182185
    183186        /* top level
  • widget-for-eventbrite-api/trunk/admin/class-admin-settings.php

    r3250726 r3273977  
    3030        $this->version = $version;
    3131        $this->freemius = $freemius;
    32         $this->settings_title = esc_html__( 'Display Eventbrite Events Settings', 'widget-for-eventbrite-api' );
    3332        parent::__construct();
    3433    }
  • widget-for-eventbrite-api/trunk/changelog.txt

    r3250726 r3273977  
     1= 6.2.2 =
     2Fix multiple issues with WP 6.8 compatability
     3
    14= 6.2.1 =
    25* Fix issue with wizard
  • widget-for-eventbrite-api/trunk/frontend/class-frontend.php

    r3250726 r3273977  
    1111use stdClass;
    1212use WidgetForEventbriteAPI\Admin\Admin_Settings;
     13use WidgetForEventbriteAPI\Includes\Compat_Template_Loader;
    1314use WidgetForEventbriteAPI\Includes\ICS;
    1415use WidgetForEventbriteAPI\Includes\Template_Loader;
     16use WidgetForEventbriteAPI\Includes\Simple_Template_Loader;
    1517use WidgetForEventbriteAPI\Includes\Eventbrite_Query;
    1618use WidgetForEventbriteAPI\Includes\Twig;
     19use WidgetForEventbriteAPI\Includes\Utilities;
    1720use WidgetForEventbriteAPI\Shortcodes\Shortcodes;
    1821use WP_Block_Type_Registry;
     
    131134            ob_start();
    132135            $theme = wp_get_theme();
    133             $template_loader = new Template_Loader();
     136            $template_loader = new Compat_Template_Loader();
     137            $p = get_post();
    134138            $template_loader->set_template_data( array(
    135139                'template_loader' => $template_loader,
     
    138142                'template'        => strtolower( $theme->template ),
    139143                'plugin_name'     => $this->plugin_name,
    140                 'utilities'       => $this->utilities,
     144                'utilities'       => new Utilities($p),
    141145                'unique_id'       => uniqid(),
    142146                'instance'        => $wfea_instance_counter,
  • widget-for-eventbrite-api/trunk/includes/class-utilities.php

    r3250726 r3273977  
    5353    private $freemius;
    5454
     55    private $event;
     56
    5557    /**
    5658     * Utilities constructor.
     
    7375        }
    7476        return self::$instance;
     77    }
     78
     79    public function set_event( $event ) {
     80        $this->event = $event;
     81    }
     82
     83    public function get_event() {
     84        return $this->event;
    7585    }
    7686
     
    281291     */
    282292    public function get_booknow_link( $args ) {
    283         return $this->format_booknow_link( $args, get_post()->url );
     293        return $this->format_booknow_link( $args, $this->get_event()->url );
    284294    }
    285295
     
    300310        $cta['availability_class'] = 'event__available';
    301311        $cta['class'] = ( isset( $arg[1] ) ? $arg[1] : 'book-now__link' );
    302         if ( 'completed' == get_post()->status || 'ended' == get_post()->status ) {
     312        if ( 'completed' == $this->get_event()->status || 'ended' == $this->get_event()->status ) {
    303313            $cta['availability_class'] = 'event__past';
    304314            if ( $this->get_element( 'past_event_button', $args ) ) {
     
    309319            }
    310320        }
    311         if ( 'started' == get_post()->status ) {
     321        if ( 'started' == $this->get_event()->status ) {
    312322            $cta['availability_class'] = 'event__started';
    313323            if ( $this->get_element( 'started_event_button', $args ) ) {
     
    412422
    413423    public function get_event_attr( $attr ) {
    414         return $this->get_value_by_string( get_post(), $attr );
     424        return $this->get_value_by_string( $this->get_event(), $attr );
    415425    }
    416426
     
    428438     */
    429439    public function get_event_eb_url( $ext = null ) {
    430         $post = get_post();
     440        $post = $this->get_event();
    431441        return apply_filters( 'wfea_eb_url', $post->url . $ext );
    432442    }
     
    447457     */
    448458    public function get_event_end() {
    449         return apply_filters( 'wfea_eventbrite_event_end', get_post()->end );
     459        return apply_filters( 'wfea_eventbrite_event_end', $this->get_event()->end );
    450460    }
    451461
     
    465475     */
    466476    public function get_event_start() {
    467         return apply_filters( 'wfea_eventbrite_event_start', get_post()->start );
     477        return apply_filters( 'wfea_eventbrite_event_start', $this->get_event()->start );
    468478    }
    469479
     
    558568     */
    559569    public function get_original_booknow_link( $args ) {
    560         return $this->format_booknow_link( $args, get_post()->eb_url );
     570        return $this->format_booknow_link( $args, $this->get_event()->eb_url );
    561571    }
    562572
  • widget-for-eventbrite-api/trunk/includes/vendor/gamajo/template-loader/class-gamajo-template-loader.php

    r1784834 r3273977  
    257257
    258258            if ( $load && $located ) {
    259                 load_template( $located, $require_once );
     259                require_once $located;
    260260            }
    261261
  • widget-for-eventbrite-api/trunk/includes/widgets/elementor/class-eventbrite-widget-elementor-helpers.php

    r3163179 r3273977  
    223223        $events = Eventbrite_Manager::$instance->get_organizations_events( $args, false );
    224224        if ( !is_wp_error( $events ) ) {
    225             wp_send_json( wp_list_pluck( $events->events, 'post_title', 'ID' ) );
     225            wp_send_json( wp_list_pluck( $events->events ?? array(), 'post_title', 'ID' ) );
    226226        }
    227227        die;
     
    248248        }
    249249        $events = $this->get_events_list( $args );
    250         $events_options = wp_list_pluck( $events, $option_type );
     250        $events_options = wp_list_pluck( $events ?? array(), $option_type );
    251251        $dropdown_options = array();
    252252        foreach ( $events_options as $event_option ) {
     
    282282            false
    283283        );
    284         $organizations_list = wp_list_pluck( $response->organizations, 'name', 'id' );
     284        $organizations_list = wp_list_pluck( $response->organizations ?? array(), 'name', 'id' );
    285285        $organizations_list = array(
    286286            '' => __( 'Select', 'widget-for-eventbrite-api' ),
     
    297297        );
    298298        if ( !is_wp_error( $subcats ) ) {
    299             return wp_list_pluck( $subcats->subcategories, 'name', 'id' );
     299            return wp_list_pluck( $subcats->subcategories ?? array(), 'name', 'id' );
    300300        }
    301301        return array();
  • widget-for-eventbrite-api/trunk/readme.txt

    r3250726 r3273977  
    22Contributors: fullworks
    33Tags: eventbrite, widget, events, eventbrite widget, eventbrite shortcode
    4 Tested up to: 6.7
    5 Stable tag: 6.2.1
     4Tested up to: 6.8
     5Stable tag: 6.2.2
    66Requires PHP: 7.4
    77License: GPL-2.0-or-later
  • widget-for-eventbrite-api/trunk/templates__free/common_layout_card.php

    r3156254 r3273977  
    1616        <?php
    1717        $data->args['readmore'] = false;
    18         if ( false !== $data->events && $data->events->have_posts() ) {
    19             while ( $data->events->have_posts() ) {
    20                 $data->events->the_post();
     18        if ( ( $data->events->post_count ?? 0 ) > 0 ) {
     19            foreach ( $data->events->posts as $event ) {
     20                $data->utilities->set_event( $event );
    2121                $data->event->booknow = $data->utilities->get_booknow_link( $data->args );
    2222                $data->event->cta     = $data->utilities->get_cta( $data->args );
  • widget-for-eventbrite-api/trunk/templates__free/common_layout_widget.php

    r3156254 r3273977  
    2222    ( ! empty( $data->utilities->get_element( 'style', $data->args ) ) ? '' . esc_attr( $data->utilities->get_element( 'style', $data->args ) ) . '' : '' )
    2323);
    24 if ( false !== $data->events && $data->events->have_posts() ) {
     24if ( ( $data->events->post_count ?? 0) > 0 ) {
    2525    $data->template_loader->get_template_part( 'paginate_links_top' . $data->event->plan);
    2626    ?>
    2727    <div class="eaw-ulx">
    28         <?php while ( $data->events->have_posts() ) {
    29             $data->events->the_post();
     28        <?php foreach ( $data->events->posts as $event ) {
     29            $data->utilities->set_event( $event );
    3030            $data->event->booknow = $data->utilities->get_booknow_link( $data->args );
    3131            $data->event->cta     = $data->utilities->get_cta( $data->args );
  • widget-for-eventbrite-api/trunk/widget-for-eventbrite-api.php

    r3250726 r3273977  
    77 * Plugin URI:        https://fullworksplugins.com/products/widget-for-eventbrite/
    88 * Description:       Easily display Eventbrite events on your WordPress site
    9  * Version:           6.2.1
     9 * Version:           6.2.2
    1010 * Requires at least: 5.6
    1111 * Requires PHP:      7.4
     
    4242define( 'WIDGET_FOR_EVENTBRITE_API_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
    4343define( 'WIDGET_FOR_EVENTBRITE_API_PLUGINS_TOP_DIR', plugin_dir_path( __DIR__ ) );
    44 define( 'WIDGET_FOR_EVENTBRITE_API_PLUGIN_VERSION', '6.2.1' );
     44define( 'WIDGET_FOR_EVENTBRITE_API_PLUGIN_VERSION', '6.2.2' );
    4545// Include the plugin autoloader, so we can dynamically include the classes.
    4646require_once WIDGET_FOR_EVENTBRITE_API_PLUGIN_DIR . 'includes/vendor/autoload.php';
  • widget-for-eventbrite-api/trunk/widgets/class-widget.php

    r3250726 r3273977  
    77
    88use stdClass;
     9use WidgetForEventbriteAPI\Includes\Compat_Template_Loader;
    910use WidgetForEventbriteAPI\Includes\Eventbrite_Query;
    1011use WidgetForEventbriteAPI\Includes\Template_Loader;
     12use WidgetForEventbriteAPI\Includes\Simple_Template_Loader;
    1113use WidgetForEventbriteAPI\Includes\Utilities;
    1214use WP_Widget;
     
    628630            $template = 'layout_widget';
    629631            $theme = wp_get_theme();
    630             $template_loader = new Template_Loader();
     632            $template_loader = new Compat_Template_Loader();
    631633            $template_loader->set_template_data( array(
    632634                'template_loader' => $template_loader,
     
    635637                'template'        => strtolower( $theme->template ),
    636638                'plugin_name'     => 'widget-for-eventbrite-api',
    637                 'utilities'       => $this->utilities,
     639                'utilities'       => new Utilities(get_post()),
    638640                'unique_id'       => uniqid(),
    639641                'instance'        => $wfea_instance_counter,
Note: See TracChangeset for help on using the changeset viewer.