[wp-trac] [WordPress Trac] #41112: Show WordCamps higher up in the News Dashboard widget

WordPress Trac noreply at wordpress.org
Sat Dec 16 02:14:07 UTC 2017


#41112: Show WordCamps higher up in the News Dashboard widget
-------------------------------------------------+-------------------------
 Reporter:  grapplerulrich                       |       Owner:
     Type:  enhancement                          |  metalandcoffee
 Priority:  normal                               |      Status:  assigned
Component:  Administration                       |   Milestone:  5.0
 Severity:  normal                               |     Version:  4.8
 Keywords:  ui-feedback good-first-bug has-      |  Resolution:
  patch has-unit-tests needs-testing             |     Focuses:
-------------------------------------------------+-------------------------

Comment (by iandunn):

 [attachment:41112.3.diff] restores the `continue`, in order to make the
 diff a bit simpler, and also adds some more tests.

 For manual testing, you should see it working for `Albuquerque` and
 `Philly` right now, since they have camps coming up in the next 6 weeks,
 but 3+ meetups before then.

 Sticking this in an `mu-plugin` is helpful, to avoid having to manually
 clear the local cache:

 {{{#!php
 add_action( 'init', 'clear_events_cache' );
 function clear_events_cache() {
         $location = get_user_option( 'community-events-location',
 get_current_user_id() );

         if ( isset( $location['ip']  ) ) {
                 delete_site_transient( 'community-events-' . md5(
 $location['ip'] ) );
         }

         if ( isset( $location['latitude'], $location['longitude'] ) ) {
                 delete_site_transient( 'community-events-' . md5(
 $location['latitude'] . $location['longitude'] ) );
         }
 }
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/41112#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list