Making WordPress.org

Changeset 9633


Ignore:
Timestamp:
03/25/2020 06:20:25 PM (5 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.

Location:
sites/trunk/wordpress.org/public_html/wp-content/plugins/official-wordpress-events
Files:
3 added
3 edited

Legend:

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

    r1095 r9633  
    1 #ofe-events h3 {
     1.ofe-events h3 {
    22    margin-bottom: 1.3em;
    33    text-transform: uppercase;
     4    font-weight: bold;
     5    color: #23282D;
     6    font-size: 1.2em;
    47}
    58
    69    .owe-day-of-week {
    7         color: #a1a1a1;
     10        color: #767676;
    811    }
     12
     13.owe-timezone {
     14    font-style: italic;
     15}
    916
    1017ul.ofe-event-list {
  • 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();
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/official-wordpress-events/template-events.php

    r8870 r9633  
    1 <div id="ofe-events">
     1<div id="ofe-events" class="ofe-events">
    22    <?php foreach ( $events as $date => $day_events ) : ?>
    33
Note: See TracChangeset for help on using the changeset viewer.