'ids', 'number' => 0 ] ) as $site_id ) { switch_to_blog( (int) $site_id ); self::run_for_site(); restore_current_blog(); } return; } self::run_for_site(); } /** * Install the analytics tables and the prune cron on the current site. * * @return void */ private static function run_for_site(): void { \Optiontics\Core\Analytics\Schema::install(); // Deactivation clears the cron; put it back straight away. \Optiontics\Core\Analytics\Analytics_Lifecycle::schedule_prune(); } }