Current File : /home/bdmcricketindia.in/public_html/wp-content/plugins/wordpress-seo/inc/class-upgrade-history.php
<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Internal
 */

/**
 * This class handles storing the current options for future reference.
 *
 * This should only be used during an upgrade routine.
 */
class WPSEO_Upgrade_History {

	/**
	 * Option to use to store/retrieve data from.
	 *
	 * @var string
	 */
	protected $option_name = 'wpseo_upgrade_history';

	/**
	 * WPSEO_Upgrade_History constructor.
	 *
	 * @param string|null $option_name Optional. Custom option to use to store/retrieve history from.
	 */
	public function __construct( $option_name = null ) {
		if ( $option_name !== null ) {
			$this->option_name = $option_name;
		}
	}

	/**
	 * Retrieves the content of the history items currently stored.
	 *
	 * @return array<array<string>> The contents of the history option.
	 */
	public function get() {
		$data = get_option( $this->get_option_name(), [] );
		if ( ! is_array( $data ) ) {
			return [];
		}

		return $data;
	}

	/**
	 * Adds a new history entry in the storage.
	 *
	 * @param string        $old_version  The version we are upgrading from.
	 * @param string        $new_version  The version we are upgrading to.
	 * @param array<string> $option_names The options that need to be stored.
	 *
	 * @return void
	 */
	public function add( $old_version, $new_version, array $option_names ) {
		$option_data = [];
		if ( $option_names !== [] ) {
			$option_data = $this->get_options_data( $option_names );
		}

		// Retrieve current history.
		$data = $this->get();

		// Add new entry.
		$data[ time() ] = [
			'options'     => $option_data,
			'old_version' => $old_version,
			'new_version' => $new_version,
		];

		// Store the data.
		$this->set( $data );
	}

	/**
	 * Retrieves the data for the specified option names from the database.
	 *
	 * @param array<string> $option_names The option names to retrieve.
	 *
	 * @return array<int|string, array<string|int|bool|float>> The retrieved data.
	 */
	protected function get_options_data( array $option_names ) {
		$wpdb = $this->get_wpdb();

		$results = $wpdb->get_results(
			$wpdb->prepare(
				'
				SELECT %i, %i FROM ' . $wpdb->options . ' WHERE
				%i IN ( ' . implode( ',', array_fill( 0, count( $option_names ), '%s' ) ) . ' )
				',
				array_merge( [ 'option_value', 'option_name', 'option_name' ], $option_names )
			),
			ARRAY_A
		);

		$data = [];
		foreach ( $results as $result ) {
			$data[ $result['option_name'] ] = maybe_unserialize( $result['option_value'] );
		}

		return $data;
	}

	/**
	 * Stores the new history state.
	 *
	 * @param array<array<string>> $data The data to store.
	 *
	 * @return void
	 */
	protected function set( array $data ) {
		// This should not be autoloaded!
		update_option( $this->get_option_name(), $data, false );
	}

	/**
	 * Retrieves the WPDB object.
	 *
	 * @return wpdb The WPDB object to use.
	 */
	protected function get_wpdb() {
		global $wpdb;

		return $wpdb;
	}

	/**
	 * Retrieves the option name to store the history in.
	 *
	 * @return string The option name to store the history in.
	 */
	protected function get_option_name() {
		return $this->option_name;
	}
}
BDM Cricket India: tips, teams, tournaments

Recent Posts

Casinò Non AAMS La Verità Nascosta sul Gioco Online Sicuro

Casinò Non AAMS: La Verità Nascosta sul Gioco Online Sicuro Vantaggi dei Casinò Non AAMS Misure di Sicurezza Necessarie Riconoscere una Piattaforma Affidabile Tipologie di Giochi Offerti Bonus e Promozioni: Un Vantaggio Competitivo Metodi di Pagamento Disponibili La Legalità dei Casinò Non AAMS Strategie per Giocare in Sicurezza Conclusioni Finali …

Read More »

Are Royal Reels the Key to Your Next Big Win_3

Are Royal Reels the Key to Your Next Big Win? Understanding the Mechanics of Royal Reels Popular Themes in Royal Reels Strategies for Maximizing Your Wins The Role of Technology in Enhancing Gameplay Social Aspects of Gaming Royal Reels Conclusion Are Royal Reels the Key to Your Next Big Win? …

Read More »

75% of Players Prefer Royal Reels for Unforgettable Wins!_1

75% of Players Prefer Royal Reels for Unforgettable Wins! The Allure of Royal Reels Innovative Features Building Community and Engagement The Mechanics Behind Royal Reels Payout Structures Strategies for Playing Royal Reels Staying Informed The Future of Royal Reels Incorporating Mobile Gaming Conclusion and Final Thoughts 75% of Players Prefer …

Read More »

CASHlib Casinos in Deutschland – Was bieten sie?

CASHlib Casinos gewinnen in Deutschland immer mehr an Bedeutung. Diese Casinos ermöglichen es Spielern, anonym und sicher mit Prepaid-Guthaben zu bezahlen – ganz ohne Bankverbindung oder Kreditkarte. Besonders für Nutzer, die auf Datenschutz und schnelle Transaktionen Wert legen, sind sie eine interessante Alternative.

Was bieten CASHlib Casinos?

  • Schnelle und anonyme Einzahlungen ohne Registrierung bei Drittanbietern
  • Breites Spielangebot von Slots bis zu Live-Dealer-Spielen
  • Regelmäßige Aktionen wie Freispiele und Cashback
  • Attraktive Willkommensboni für neue Spieler
  • EU-lizenzierte Anbieter mit hohen Sicherheitsstandards

Ein großer Vorteil von CASHlib ist, dass keine sensiblen Bankdaten im Casino hinterlegt werden müssen. Die Gutscheine sind online oder in vielen Verkaufsstellen erhältlich und können sofort verwendet werden. Dadurch entfällt auch die Notwendigkeit, persönliche Daten bei Einzahlungen preiszugeben – ein echter Pluspunkt für sicherheitsbewusste Spieler.

Viele spielothekgermany.com/de/spielothek/cashlib-casinos/ bieten zudem mobile Kompatibilität, einfache Menüführung und professionellen Spielerschutz. Wer nach einem unkomplizierten Zahlungsweg mit solider Auswahl an Spielen und Bonusangeboten sucht, wird bei diesen Plattformen fündig. Die Kombination aus Bequemlichkeit, Sicherheit und einem attraktiven Bonusangebot macht CASHlib Casinos zu einer beliebten Wahl für deutsche Nutzer.

slot 7