id ); Capabilities::grant(); Site_Identity::ensure(); restore_current_blog(); } /** * いまのネットワークのサイトの ID。 * * @return int[] */ private static function network_site_ids() { return get_sites( array( 'fields' => 'ids', 'number' => 0, 'network_id' => get_current_network_id(), ) ); } /** * 無効化で外した定期の取り込みを張り直す。キーなしのサイトには予定を増やさない。 * * @return void */ private static function schedule_pull() { if ( '' !== Connection::api_key() ) { Sync_Pull::schedule(); } } /** * いまのサイトの cron を外す。 * * @return void */ private static function clear_cron_hooks() { foreach ( static::CRON_HOOKS as $hook ) { wp_clear_scheduled_hook( $hook ); } } }