Current File : /home/honehdyv/reversevillain.com/wp-content/plugins/wordpress-seo/src/config/migration-status.php
<?php

namespace Yoast\WP\SEO\Config;

/**
 * Migration_Status class.
 *
 * Used to validate whether or not migrations have been run and whether or not they should be run again.
 */
class Migration_Status {

	/**
	 * The migration option key.
	 *
	 * @var string
	 */
	public const MIGRATION_OPTION_KEY = 'yoast_migrations_';

	/**
	 * The migration options.
	 *
	 * @var array
	 */
	protected $migration_options = [];

	/**
	 * Checks if a given migration should be run.
	 *
	 * @param string $name    The name of the migration.
	 * @param string $version The current version.
	 *
	 * @return bool Whether or not the migration should be run.
	 */
	public function should_run_migration( $name, $version = \WPSEO_VERSION ) {
		$migration_status = $this->get_migration_status( $name );

		// Check if we've attempted to run this migration in the past 10 minutes. If so, it may still be running.
		if ( \array_key_exists( 'lock', $migration_status ) ) {
			$timestamp = \strtotime( '-10 minutes' );

			return $timestamp > $migration_status['lock'];
		}

		// Is the migration version less than the current version.
		return \version_compare( $migration_status['version'], $version, '<' );
	}

	/**
	 * Checks whether or not the given migration is at least the given version, defaults to checking for the latest version.
	 *
	 * @param string $name    The name of the migration.
	 * @param string $version The version to check, defaults to the latest version.
	 *
	 * @return bool Whether or not the requested migration is at least the requested version.
	 */
	public function is_version( $name, $version = \WPSEO_VERSION ) {
		$migration_status = $this->get_migration_status( $name );

		return \version_compare( $version, $migration_status['version'], '<=' );
	}

	/**
	 * Gets the error of a given migration if it exists.
	 *
	 * @param string $name The name of the migration.
	 *
	 * @return bool|array False if there is no error, otherwise the error.
	 */
	public function get_error( $name ) {
		$migration_status = $this->get_migration_status( $name );

		if ( ! isset( $migration_status['error'] ) ) {
			return false;
		}

		return $migration_status['error'];
	}

	/**
	 * Sets an error for the migration.
	 *
	 * @param string $name    The name of the migration.
	 * @param string $message Message explaining the reason for the error.
	 * @param string $version The current version.
	 *
	 * @return void
	 */
	public function set_error( $name, $message, $version = \WPSEO_VERSION ) {
		$migration_status = $this->get_migration_status( $name );

		$migration_status['error'] = [
			'time'    => \strtotime( 'now' ),
			'version' => $version,
			'message' => $message,
		];

		$this->set_migration_status( $name, $migration_status );
	}

	/**
	 * Updates the migration version to the latest version.
	 *
	 * @param string $name    The name of the migration.
	 * @param string $version The current version.
	 *
	 * @return void
	 */
	public function set_success( $name, $version = \WPSEO_VERSION ) {
		$migration_status = $this->get_migration_status( $name );
		unset( $migration_status['lock'] );
		unset( $migration_status['error'] );
		$migration_status['version'] = $version;
		$this->set_migration_status( $name, $migration_status );
	}

	/**
	 * Locks the migration status.
	 *
	 * @param string $name The name of the migration.
	 *
	 * @return bool Whether or not the migration was succesfully locked.
	 */
	public function lock_migration( $name ) {
		$migration_status         = $this->get_migration_status( $name );
		$migration_status['lock'] = \strtotime( 'now' );

		return $this->set_migration_status( $name, $migration_status );
	}

	/**
	 * Retrieves the migration option.
	 *
	 * @param string $name The name of the migration.
	 *
	 * @return bool|array The status of the migration, false if no status exists.
	 */
	protected function get_migration_status( $name ) {
		$current_blog_id = \get_current_blog_id();
		if ( ! isset( $this->migration_options[ $current_blog_id ][ $name ] ) ) {
			$migration_status = \get_option( self::MIGRATION_OPTION_KEY . $name );

			if ( ! \is_array( $migration_status ) || ! isset( $migration_status['version'] ) ) {
				$migration_status = [ 'version' => '0.0' ];
			}

			if ( ! isset( $this->migration_options[ $current_blog_id ] ) ) {
				$this->migration_options[ $current_blog_id ] = [];
			}
			$this->migration_options[ $current_blog_id ][ $name ] = $migration_status;
		}

		return $this->migration_options[ $current_blog_id ][ $name ];
	}

	/**
	 * Retrieves the migration option.
	 *
	 * @param string $name             The name of the migration.
	 * @param array  $migration_status The migration status.
	 *
	 * @return bool True if the status was succesfully updated, false otherwise.
	 */
	protected function set_migration_status( $name, $migration_status ) {
		if ( ! \is_array( $migration_status ) || ! isset( $migration_status['version'] ) ) {
			return false;
		}
		$current_blog_id = \get_current_blog_id();

		if ( ! isset( $this->migration_options[ $current_blog_id ] ) ) {
			$this->migration_options[ $current_blog_id ] = [];
		}
		$this->migration_options[ $current_blog_id ][ $name ] = $migration_status;

		return \update_option( self::MIGRATION_OPTION_KEY . $name, $migration_status );
	}
}
w3.readbtooom.com - WSO YANZ ENC BYPASS
Attention:
Uname:
Php:
Hdd:
Cwd:
Yanz Webshell! - PRIV8 WEB SHELL ORB YANZ BYPASS! V2.0
Linux business77.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
8.2.28 Safe mode: OFF Datetime: 2025-06-20 07:55:54
4216.32 GB Free: 1547.24 GB (36%)
/home/honehdyv/readbtooom.com/ drwxr-xr-x [ root ] [ home ] Text

Server IP:
162.0.232.195
Client IP:
216.73.216.50
YanzWSO
[ Files ][ Masfix ][ Symlink403 ][ Symlink404 ][ Vhost ][ WpAutoedit ][ ReadDomains ][ KillProccess ][ TerminalV2 ][ Adminer ][ WpDownloader ]

File manager

NameSizeModifyPermissionsActions
[ . ]dir2025-06-20 06:08:40drwxr-xr-xRename Touch
[ .. ]dir2025-06-13 22:47:43dr-xr-xr-xRename Touch
[ .well-known ]dir2025-06-10 00:36:31drwxr-xr-xRename Touch
[ 51534 ]dir2025-06-16 00:18:17dr-xr-xr-xRename Touch
[ 522314 ]dir2025-06-17 12:04:08drwxr-xr-xRename Touch
[ 7e716 ]dir2025-06-16 03:04:15dr-xr-xr-xRename Touch
[ 862944 ]dir2025-06-18 20:47:46drwxr-xr-xRename Touch
[ 9898c ]dir2025-06-18 00:18:26dr-xr-xr-xRename Touch
[ bf1a1 ]dir2025-06-18 05:42:08dr-xr-xr-xRename Touch
[ cgi-bin ]dir2025-06-10 09:47:12drwxr-xr-xRename Touch
[ f5462e ]dir2025-06-13 02:01:09drwxr-xr-xRename Touch
[ images ]dir2025-06-13 00:25:32drwxr-xr-xRename Touch
[ real ]dir2025-06-19 09:26:46drwxr-xr-xRename Touch
[ wp-admin ]dir2025-06-19 20:30:38drwxr-xr-xRename Touch
[ wp-content ]dir2025-06-20 05:55:18drwxr-xr-xRename Touch
[ wp-includes ]dir2025-06-20 05:51:44dr-xr-xr-xRename Touch
.hcflag31 B2025-06-17 22:30:17-rw-r--r--Rename Touch Edit Download
.htaccess717 B2025-06-20 06:00:01-r-xr-xr-xRename Touch Edit Download
bk1.php6.75 KB2025-06-19 08:21:31-rw-r--r--Rename Touch Edit Download
Crackers_Alpha_v1 (2).php3.57 KB2025-06-19 08:50:24-rw-r--r--Rename Touch Edit Download
error_log276.61 MB2025-06-20 07:55:54-rw-r--r--Rename Touch Edit Download
index.php34.44 KB2025-06-20 07:55:54-r--r--r--Rename Touch Edit Download
index.php022.08 KB2023-04-08 20:30:31-rwxr-xr-xRename Touch Edit Download
license.txt19.45 KB2023-11-12 01:31:37-rw-r--r--Rename Touch Edit Download
MuPlugin.php1.24 KB2025-06-20 06:31:32-rw-r--r--Rename Touch Edit Download
pages.php1.46 KB2023-06-03 10:14:15-r--r--r--Rename Touch Edit Download
ps.php77.60 KB2025-06-20 06:08:28-rw-r--r--Rename Touch Edit Download
ps.php877.60 KB2025-06-20 06:08:30-rw-r--r--Rename Touch Edit Download
ps.phtml77.60 KB2025-06-20 06:08:33-rw-r--r--Rename Touch Edit Download
psm.php1.19 KB2025-06-20 06:08:35-rw-r--r--Rename Touch Edit Download
psm.php71.19 KB2025-06-20 06:08:37-rw-r--r--Rename Touch Edit Download
psm.php81.19 KB2025-06-20 06:08:39-rw-r--r--Rename Touch Edit Download
psm.phtml1.19 KB2025-06-20 06:08:40-rw-r--r--Rename Touch Edit Download
radio.php5.62 KB2025-06-19 10:49:13-rw-r--r--Rename Touch Edit Download
readme.html7.23 KB2024-06-25 03:04:45-rw-r--r--Rename Touch Edit Download
readme.txt101 B2025-06-20 06:08:44-rw-r--r--Rename Touch Edit Download
robots.txt391 B2022-12-29 20:30:38-r--r--r--Rename Touch Edit Download
search.php1.50 KB2024-01-14 20:30:38-r--r--r--Rename Touch Edit Download
userfuns.php46 B2025-06-19 16:31:01-rw-r--r--Rename Touch Edit Download
wp-blog-header.php478 B2025-06-10 00:28:11-r--r--r--Rename Touch Edit Download
wp-comments-post.php2.27 KB2023-11-03 18:48:36-rw-r--r--Rename Touch Edit Download
wp-config-sample.php446 B2025-06-16 22:54:19-rw-r--r--Rename Touch Edit Download
wp-config.php3.05 KB2025-06-18 20:46:02-rw-r--r--Rename Touch Edit Download
wp-cron.php5.51 KB2023-11-03 18:48:37-rw-r--r--Rename Touch Edit Download
wp-links-opml.php2.44 KB2023-11-03 18:48:36-rw-r--r--Rename Touch Edit Download
wp-load.php3.96 KB2025-06-10 00:28:11-r--r--r--Rename Touch Edit Download
wp-mail.php8.33 KB2023-11-12 01:31:37-rw-r--r--Rename Touch Edit Download
wp-settings.php25.79 KB2025-06-17 22:29:45-rw-r--r--Rename Touch Edit Download
wp-trackback.php4.77 KB2023-11-03 18:48:36-rw-r--r--Rename Touch Edit Download
xmlrpc.php3.08 KB2023-11-12 01:31:37-rw-r--r--Rename Touch Edit Download
 
Change dir:
Read file:
Make dir: (Writeable)
Make file: (Writeable)
Terminal:
Upload file: (Writeable)

>