Making WordPress.org


Ignore:
Timestamp:
03/25/2020 06:20:25 PM (7 years ago)
Author:
ryelle
Message:

Official WordPress Events: Add shortcode for displaying online events

This adds the shortcode [official_wordpress_events_online], which pulls only online events. The events are displayed using JS, so we can pick up the client's timezone and show events using their local timezone.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/official-wordpress-events/official-wordpress-events.php

    r9632 r9633  
    1616        const MEETUP_API_BASE_URL   = 'https://api.meetup.com/';
    1717        const MEETUP_MEMBER_ID      = 72560962;
     18        const CACHEBUSTER           = 2;
    1819
    1920        /*
    … …  
    172173                global $post;
    173174
    174                 wp_register_style( 'official-wordpress-events', plugins_url( 'official-wordpress-events.css', __FILE__ ), array(), 1 );
     175                wp_register_style(
     176                        'official-wordpress-events',
     177                        plugins_url( 'official-wordpress-events.css', __FILE__ ),
     178                        array(),
     179                        self::CACHEBUSTER
     180                );
    175181
    176182                if ( is_a( $post, 'WP_Post' ) && has_shortcode( $post->post_content, 'official_wordpress_events' ) ) {
    … …  
    825831
    826832require_once( __DIR__ . DIRECTORY_SEPARATOR . 'official-wordpress-event.php' );
     833require_once( __DIR__ . DIRECTORY_SEPARATOR . 'official-events-online.php' );
    827834$GLOBALS['Official_WordPress_Events'] = new Official_WordPress_Events();
Note: See TracChangeset for help on using the changeset viewer.