themeName; $this->wp_switch_theme( $name ); $current_theme = $this->wp_get_theme()->get_stylesheet(); if ( $current_theme === $name ) { $result->add_debug( "Switched theme to '$name'." ); } return $result; } /** * Returns the class name of the step this processor handles. * * @return string The class name of the step this processor handles. */ public function get_step_class(): string { return ActivateTheme::class; } /** * Check if the current user has the required capabilities for this step. * * @param object $schema The schema to process. * * @return bool True if the user has the required capabilities. False otherwise. */ public function check_step_capabilities( $schema ): bool { return current_user_can( 'switch_themes' ); } }