status = $status; $this->singleProcess = $singleProcess; } public function run() { if ( ! ( $this->hasWpmlStartedBeforeThisCommand() && Manager::hasFiles() ) ) { $this->status->markComplete(); return true; } $this->singleProcess->runPage(); if ( $this->singleProcess->isCompleted() ) { \wpml_get_admin_notices()->remove_notice( RegenerationInProgressNotice::GROUP, RegenerationInProgressNotice::ID ); return true; } \wpml_get_admin_notices()->add_notice( make( RegenerationInProgressNotice::class ) ); return false; } /** * @return bool */ private function hasWpmlStartedBeforeThisCommand() { return (bool) version_compare( get_option( WPML_Installation::WPML_START_VERSION_KEY, '0.0.0' ), self::WPML_VERSION_FOR_THIS_COMMAND, '<' ); } public function run_ajax() { } public function run_frontend() { } public static function get_command_id() { return __CLASS__; } }