Plugin Directory

Changeset 3092095


Ignore:
Timestamp:
05/24/2024 11:35:29 AM (23 months ago)
Author:
eventilla
Message:

Fixed warnings and deprecated code.

Location:
eventilla-events/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • eventilla-events/trunk/README.txt

    r3086391 r3092095  
    66Tested up to: 6.5.2
    77Requires PHP: 7.4
    8 Stable tag: 1.8
     8Stable tag: 1.8.1
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4646
    4747== Changelog ==
     48= 1.8.1 =
     49Fixed warnings and deprecated code.
    4850= 1.8 =
    49 Added support for tag translations and display names. Also fixed deprecated jQuery call and cdn image links. Kudos to Tuukka @ Monkfish Creative!
     51Added support for tag translations and display names.
    5052= 1.7.8 =
    5153Fixed a static call to a non-static function.
  • eventilla-events/trunk/eventilla-wp.php

    r3086391 r3092095  
    1616 * Plugin URI:        https://www.eventilla.com/
    1717 * Description:       Eventilla Events brings your event information from eventilla.com to WordPress as custom posts.
    18  * Version:           1.8
     18 * Version:           1.8.1
    1919 * Author:            Eventilla
    2020 * Author URI:        http://www.eventilla.com
  • eventilla-events/trunk/includes/class-eventilla-wp-cron.php

    r2877664 r3092095  
    103103            // we are fetching all ids of events, so we can make a comparison and delete unsynced events
    104104            $eventilla_ids = [];
    105             foreach($eventilla_json_ob as $event) {
    106                 array_push($eventilla_ids, $event->id);
     105
     106            if(!is_null($eventilla_json_ob)) {
     107                foreach($eventilla_json_ob as $event) {
     108                    array_push($eventilla_ids, $event->id);
     109                }
    107110            }
     111
     112
    108113            $api_fetch->delete_unsync_events( $eventilla_ids );
    109114            if (function_exists('w3tc_pgcache_flush')) {
  • eventilla-events/trunk/includes/class-eventilla-wp-html-builder-shortcode.php

    r3086391 r3092095  
    249249        $event = str_replace( '{{EVENT_LINK}}', esc_attr( $meta_array['eventilla_url'][0] ), $event );
    250250        $event = str_replace( '{{EVENT_LINK_TEXT}}', esc_attr( 'Register now', 'eventilla_wp' ), $event );
    251         $event = str_replace( '{{EVENT_IMAGE}}', get_the_post_thumbnail(), $event);
     251
     252        $image = esc_attr($meta_array['eventilla_image'][0]);
     253
     254        if(!is_array($image) && substr($image,0,4)=='http') {
     255          $event = str_replace( '{{EVENT_IMAGE}}', $image, $event);
     256        } else {
     257          $event = str_replace( '{{EVENT_IMAGE}}', get_the_post_thumbnail(), $event);
     258        }
     259
    252260        return $event;
    253261    }
Note: See TracChangeset for help on using the changeset viewer.