Files
BW/tbs/wp-content/plugins/wp-healthcheck/includes/class-wp-healthcheck-upgrade.php
sean 343b4a3f3f
Some checks failed
deploy-testing / deploy (push) Has been cancelled
Initial testing snapshot
2026-11-19 18:32:17 -05:00

32 lines
679 B
PHP

<?php
/**
* The WP_Healthcheck_Upgrade class
*
* @package wp-healthcheck
* @since 1.1
*/
class WP_Healthcheck_Upgrade {
/**
* Option to store the current plugin version.
*
* @since 1.1
* @var string
*/
const PLUGIN_VERSION_OPTION = 'wphc_version';
/**
* Clean up the transients if plugin is updated.
*
* @since 1.1
*/
public static function maybe_upgrade_db() {
$version = get_option( self::PLUGIN_VERSION_OPTION );
if ( WPHC_VERSION != $version ) {
WP_Healthcheck::_cleanup_options( true );
update_option( self::PLUGIN_VERSION_OPTION, WPHC_VERSION );
}
}
}