Submit
Path:
~
/
home
/
bfxleof
/
www
/
wp-content
/
plugins
/
wordpress-seo
/
src
/
deprecated
/
src
/
presenters
/
File Content:
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 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 $option_names The options that need to be stored. */ 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 $option_names The option names to retrieve. * * @return array */ protected function get_options_data( array $option_names ) { $wpdb = $this->get_wpdb(); $sql = $wpdb->prepare( ' SELECT option_value, option_name FROM ' . $wpdb->options . ' WHERE option_name IN ( ' . implode( ',', array_fill( 0, count( $option_names ), '%s' ) ) . ' ) ', $option_names ); $results = $wpdb->get_results( $sql, 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 $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; } }
Edit
Rename
Chmod
Delete
FILE
FOLDER
Name
Size
Permission
Action
admin
---
0755
open-graph
---
0755
-20260705100515.DS_Store
10234 bytes
0644
.DS_Store
10234 bytes
0644
20200616130143_ReplacePermalinkHashIndex.php
2293 bytes
0644
AjaxController.php
2162 bytes
0644
BundleWriter.php
5687 bytes
0644
DownloadConfController.php
945 bytes
0644
JsonSerializable.php
577 bytes
0644
LimitStream.php
4209 bytes
0644
article-author-presenter-20260704122119.php
1116 bytes
0644
article-modified-time-presenter.php
609 bytes
0644
class-capability-manager-factory.php
763 bytes
0644
class-metabox-formatter.php
12602 bytes
0644
class-opengraph-oembed.php
1126 bytes
0644
class-option-tabs-formatter.php
2321 bytes
0644
class-sitemaps-admin-20260703023908.php
3665 bytes
0644
class-sitemaps-admin.php
3665 bytes
0644
class-taxonomy-columns-20260705015531.php
7324 bytes
0644
class-taxonomy-columns.php
7324 bytes
0644
class-upgrade-history.php
2939 bytes
0644
class-wpseo-statistics-20260703220502.php
1443 bytes
0644
class-yoast-plugin-conflict.php
10390 bytes
0644
class.pack.database.php
30838 bytes
0644
dashboard-1650-rtl.css
1634 bytes
0644
define.php
4567 bytes
0644
description-presenter-20260623011438.php
1026 bytes
0644
duplicator-20260704004435.php
1781 bytes
0644
duplicator-main.php
26907 bytes
0644
elFinderVolumeLocalFileSystem.class-20260623050500.php
48544 bytes
0644
elFinderVolumeLocalFileSystem.class.php
48544 bytes
0644
exceptions.php
708 bytes
0644
flexible-widget.php
11167 bytes
0644
get-request-conditional.php
466 bytes
0644
image-presenter.php
2093 bytes
0644
inc.data.php
5121 bytes
0644
index.php
157663 bytes
0644
loco.xml
657 bytes
0644
manager-20260707222958.php
14659 bytes
0644
manager.php
14659 bytes
0644
meta-fields-presenter.php
1600 bytes
0644
module.php
1297 bytes
0644
quick-edit-handler-1650.js
1848 bytes
0644
recovery.php
1146 bytes
0644
request-methods-header.php
1127 bytes
0644
uninstall.php
4401 bytes
0644
values-helper-20260623145612.php
2652 bytes
0644
values-helper.php
2652 bytes
0644
wordpress-seo-es_ES-20260705034138.json
25583 bytes
0644
wordpress-seo-es_ES.json
25583 bytes
0644
wordpress-seojs-ar.json
25925 bytes
0644
wordpress-seojs-bs_BA.json
13790 bytes
0644
wordpress-seojs-es_ES.json
20568 bytes
0644
wordpress-seojs-fi.json
19387 bytes
0644
wordpress-seojs-it_IT-20260703222213.json
20244 bytes
0644
wordpress-seojs-it_IT.json
20244 bytes
0644
wordpress-seojs-ja.json
21424 bytes
0644
wp-query-wrapper-20260623114514.php
834 bytes
0644
wp-query-wrapper.php
834 bytes
0644
N4ST4R_ID | Naxtarrr