Making WordPress.org


Ignore:
Timestamp:
09/19/2016 09:18:57 AM (8 years ago)
Author:
ocean90
Message:

Rosetta: Add handler for connecting new sites to Jetpack.

See #2003.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/rosetta/inc/site/class-global-wordpress-org.php

    r4028 r4096  
    22namespace WordPressdotorg\Rosetta\Site;
    33
     4use WordPressdotorg\Rosetta\Jetpack;
    45use WP_Site;
    56
     
    3940     */
    4041    public function register_events() {
    41         // TODO: Implement register_events() method.
     42        $jetpack_connector = new Jetpack\Connector();
     43        add_action( 'wpmu_new_blog', [ $jetpack_connector, 'schedule_connect_event' ], 20, 1 );
     44        add_action( $jetpack_connector->get_connect_event_name(), [ $jetpack_connector, 'connect_site' ] );
    4245    }
    4346}
Note: See TracChangeset for help on using the changeset viewer.