Plugin Directory

Changeset 2745337


Ignore:
Timestamp:
06/20/2022 02:34:15 PM (4 years ago)
Author:
fooevents
Message:

Release 1.6.38

Location:
fooevents-calendar
Files:
65 added
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • fooevents-calendar/trunk/class-fooevents-calendar.php

    r2729449 r2745337  
    13021302        }
    13031303
     1304        $product_ids = '';
     1305
     1306        if ( ! empty( $attributes['post'] ) ) {
     1307
     1308            $product_ids = array_map( 'trim', explode( ',', $attributes['post'] ) );
     1309
     1310        }
     1311
    13041312        if ( ! empty( $attributes['include_cat'] ) ) {
    13051313
    1306             $include_cats = explode( ',', $attributes['include_cat'] );
     1314            $include_cats = array_map( 'trim', explode( ',', $attributes['include_cat'] ) );
    13071315
    13081316        }
     
    13291337        if ( is_plugin_active( 'fooevents/fooevents.php' ) || is_plugin_active_for_network( 'fooevents/fooevents.php' ) ) {
    13301338
    1331             $events = $this->get_events( $include_cats );
     1339            $events = $this->get_events( $include_cats, $product_ids );
    13321340            $events = $this->fetch_events( $events, 'events_list', true );
    13331341
     
    14291437
    14301438        $calendar_id = 'fooevents_calendar';
     1439        $product_ids = '';
     1440
     1441        if ( ! empty( $attributes['post'] ) ) {
     1442
     1443            $product_ids = array_map( 'trim', explode( ',', $attributes['post'] ) );
     1444
     1445        }
    14311446
    14321447        if ( ! empty( $attributes['id'] ) ) {
     
    14431458        if ( ! empty( $attributes['include_cat'] ) ) {
    14441459
    1445             $include_cats = explode( ',', $attributes['include_cat'] );
     1460            $include_cats = array_map( 'trim', explode( ',', $attributes['include_cat'] ) );
    14461461
    14471462        }
     
    15031518        if ( is_plugin_active( 'fooevents/fooevents.php' ) || is_plugin_active_for_network( 'fooevents/fooevents.php' ) ) {
    15041519
    1505             $events = $this->get_events( $include_cats );
     1520            $events = $this->get_events( $include_cats, $product_ids );
    15061521            $events = $this->fetch_events( $events, $display_type, false );
    15071522
    15081523        }
    15091524
    1510         $non_product_events = $this->get_non_product_events( $include_cats );
     1525        $non_product_events = $this->get_non_product_events( $include_cats, $product_ids );
    15111526        $non_product_events = $this->fetch_events( $non_product_events, $display_type, false );
    15121527
     
    15231538
    15241539            $fooevents_bookings = new FooEvents_Bookings( true );
    1525             $booking_events     = $fooevents_bookings->get_bookings_for_calendar( $include_cats );
     1540            $booking_events     = $fooevents_bookings->get_bookings_for_calendar( $include_cats, $product_ids );
    15261541
    15271542            $events = array_merge_recursive( $events, $booking_events );
     
    16831698     * @return array
    16841699     */
    1685     public function get_events( $include_cats = array() ) {
     1700    public function get_events( $include_cats = array(), $product_ids = array() ) {
    16861701
    16871702        $args = array(
     
    17121727        }
    17131728
     1729        if ( ! empty( $product_ids ) ) {
     1730
     1731            $args['post__in'] = $product_ids;
     1732
     1733        }
     1734
    17141735        $events = new WP_Query( $args );
    17151736
     
    17241745     * @return array
    17251746     */
    1726     public function get_non_product_events( $include_cats = array() ) {
     1747    public function get_non_product_events( $include_cats = array(), $product_ids = array() ) {
    17271748
    17281749        $calendar_post_types = get_option( 'globalFooEventsCalendarPostTypes' );
     
    17611782
    17621783            }
     1784        }
     1785
     1786        if ( ! empty( $product_ids ) ) {
     1787
     1788            $args['post__in'] = $product_ids;
     1789
    17631790        }
    17641791
     
    31133140            'Σεπτέμβριος' => 'September',
    31143141            'Οκτώβριος'   => 'October',
    3115             'Νοέμβριος'   => 'November',
     3142            'Νοέμβριο��'   => 'November',
    31163143            'Δεκέμβριος'  => 'December',
    31173144
  • fooevents-calendar/trunk/fooevents-calendar.php

    r2729449 r2745337  
    44 * Plugin Name: Events Calendar for FooEvents
    55 * Description: Add event information to any post, page or custom post type and display it in a stylish calendar.
    6  * Version: 1.6.36
     6 * Version: 1.6.38
    77 * Author: FooEvents
    88 * Plugin URI: https://www.fooevents.com/fooevents-calendar/
  • fooevents-calendar/trunk/readme.txt

    r2729449 r2745337  
    33Tags: calendar, events calendar, event, booking, tickets
    44Requires at least: 5
    5 Tested up to: 5.9.3
    6 Stable tag: 1.6.36
     5Tested up to: 6.0.0
     6Stable tag: 1.6.38
    77License: GPLv2
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    157157
    158158== Changelog ==
     159
     160= 1.6.38 =
     161* FIXED: Various small bugs *
     162* TESTED ON: WordPress 6.0.0 and WooCommerce 6.6.0 *
     163
    159164= 1.6.36 =
    160165* UPDATED: Moment.js library *
  • fooevents-calendar/trunk/updatelog.txt

    r2729449 r2745337  
    33
    44------------------
     51.6.38
     6FIXED: Various small bugs
     7TESTED ON: WordPress 6.0.0 and WooCommerce 6.6.0
     8
    591.6.36
    610UPDATED: Moment.js library
Note: See TracChangeset for help on using the changeset viewer.