Changeset 4081 for sites/trunk/wordpress.org/public_html/wp-content/plugins/rosetta/inc/site/class-locale-main.php
- Timestamp:
- 09/16/2016 07:17:46 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/rosetta/inc/site/class-locale-main.php
r4080 r4081 45 45 public function register_events() { 46 46 if ( is_admin() ) { 47 $user_sync = new User\Sync(); 48 $user_sync->set_destination_site( get_site_by_path( get_site()->domain, Locale_Team::$path ) ); 49 $user_sync->set_roles_to_sync( [ 'editor' ] ); 50 $user_sync->setup(); 47 // Get the team site. 48 $result = get_sites( [ 49 'domain' => get_site()->domain, 50 'path' => Locale_Team::$path, 51 'number' => 1, 52 ] ); 53 $team_site = array_shift( $result ); 54 55 if ( $team_site ) { 56 $user_sync = new User\Sync(); 57 $user_sync->set_destination_site( $team_site ); 58 $user_sync->set_roles_to_sync( [ 'editor' ] ); 59 $user_sync->setup(); 60 } 51 61 } 52 62
Note: See TracChangeset
for help on using the changeset viewer.