This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Compares a stored version of the WordPress version to | |
* the current version. | |
* | |
* If the current version has changed, update the stored | |
* version and run custom code that notifies cPanel that | |
* an update has occurred. | |
*/ | |
function cPanel_wp_version_check() { | |
$old_version = get_option( 'cPanel_wp_version' ); | |
if ( $GLOBALS['wp_version'] !== $old_version ) { | |
$new_version = $GLOBALS['wp_version']; | |
update_option( 'cPanel_wp_version', $new_version ); | |
// DO THINGS HERE TO NOTIFY CPANEL OF SOFTWARE UPGRADE. | |
} | |
} | |
add_action( 'init', 'cPanel_wp_version_check' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment