- Timestamp:
- 08/13/2020 02:39:38 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/api.wordpress.org/public_html/events/1.0/index.php
r10113 r10165 183 183 $events = pin_next_online_wordcamp( $events, $_SERVER['HTTP_USER_AGENT'], time() ); 184 184 185 $events = pin_next_workshop_discussion_group( $events, $_SERVER['HTTP_USER_AGENT'] ); 186 185 187 $events = remove_duplicate_events( $events ); 186 188 … … 1256 1258 1257 1259 /** 1258 * Pin the next upcoming online WordCamp .1260 * Pin the next upcoming online WordCamp to the Events Widget. 1259 1261 * 1260 1262 * @param array $events … … 1337 1339 1338 1340 /** 1341 * Pin upcoming learn.wordpress.org discussion groups to the Events Widget. 1342 * 1343 * @param array $events 1344 * @param string $user_agent 1345 * 1346 * @return array 1347 */ 1348 function pin_next_workshop_discussion_group( $events, $user_agent ) { 1349 if ( ! is_client_core( $user_agent ) ) { 1350 return $events; 1351 } 1352 1353 if ( time() <= strtotime( '2020-08-13 2pm PDT' ) ) { 1354 array_unshift( 1355 $events, 1356 array( 1357 'type' => 'meetup', 1358 'title' => 'Discussion Group: Introduction to Contributing to WordPress', 1359 'url' => 'https://www.meetup.com/learn-wordpress-discussions/events/272512607/', 1360 'meetup' => 'Learn WordPress', 1361 'meetup_url' => 'https://www.meetup.com/learn-wordpress-discussions/', 1362 'date' => '2020-08-13 14:00:00', 1363 'end_date' => '2020-08-13 15:00:00', 1364 1365 'location' => array( 1366 'location' => 'Online', 1367 'country' => 'US', 1368 'latitude' => 37.78, 1369 'longitude' => -122.42, 1370 ) 1371 ) 1372 ); 1373 } 1374 1375 return $events; 1376 } 1377 1378 /** 1339 1379 * Remove duplicate events, based on the URL. 1340 1380 *
Note: See TracChangeset
for help on using the changeset viewer.