* @param bool $update Whether to update.
* @param object $item The update offer.
*/
- $update = apply_filters( 'auto_update_' . $type, $update, $item );
+ $update = apply_filters( "auto_update_{$type}", $update, $item );
if ( ! $update ) {
if ( 'core' == $type )
*
* @since 3.7.0
* @access public
- *
- * @global wpdb $wpdb
- * @global string $wp_version
*/
public function run() {
- global $wpdb, $wp_version;
-
if ( $this->is_disabled() )
return;
// Send debugging email to all development installs.
if ( ! empty( $this->update_results ) ) {
- $development_version = false !== strpos( $wp_version, '-' );
+ $development_version = false !== strpos( get_bloginfo( 'version' ), '-' );
/**
* Filters whether to send a debugging email for each automatic background update.
* @since Unknown
* @access protected
*
- * @global string $wp_version
- *
* @param object $update_result The result of the core update. Includes the update offer and result.
*/
protected function after_core_update( $update_result ) {
- global $wp_version;
+ $wp_version = get_bloginfo( 'version' );
$core_update = $update_result->item;
$result = $update_result->result;
* @since 3.7.0
* @access protected
*
- * @global string $wp_version
- *
* @param string $type The type of email to send. Can be one of 'success', 'fail', 'manual', 'critical'.
* @param object $core_update The update offer that was attempted.
* @param mixed $result Optional. The result for the core update. Can be WP_Error.
if ( 'critical' == $type && is_wp_error( $result ) ) {
$body .= "\n***\n\n";
- $body .= sprintf( __( 'Your site was running version %s.' ), $GLOBALS['wp_version'] );
+ $body .= sprintf( __( 'Your site was running version %s.' ), get_bloginfo( 'version' ) );
$body .= ' ' . __( 'We have some data that describes the error your site encountered.' );
$body .= ' ' . __( 'Your hosting company, support forum volunteers, or a friendly developer may be able to use this information to help you:' );