update_feedback

update_feedback

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7.2

apply_filters('update_feedback') is found 9 times:

  • /wp-admin/includes/class-core-upgrader.php line 137
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    */
    if ( is_wp_error( $download ) && $download->get_error_data( 'softfail-filename' ) ) {
        // Output the failure error as a normal feedback, and not as an error:
        /** This filter is documented in wp-admin/includes/update-core.php */
        apply_filters( 'update_feedback', $download->get_error_message() );
     
        // Report this failure back to WordPress.org for debugging purposes.
        wp_version_check(
            array(
                'signature_failure_code' => $download->get_error_code(),
                'signature_failure_data' => $download->get_error_data(),
  • /wp-admin/includes/class-core-upgrader.php line 201
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    }
     
    if ( $try_rollback ) {
        /** This filter is documented in wp-admin/includes/update-core.php */
        apply_filters( 'update_feedback', $result );
     
        /** This filter is documented in wp-admin/includes/update-core.php */
        apply_filters( 'update_feedback', $this->strings['start_rollback'] );
     
        $rollback_result = $this->upgrade( $current, array_merge( $parsed_args, array( 'do_rollback' => true ) ) );
  • /wp-admin/includes/class-core-upgrader.php line 204
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    /** This filter is documented in wp-admin/includes/update-core.php */
    apply_filters( 'update_feedback', $result );
     
    /** This filter is documented in wp-admin/includes/update-core.php */
    apply_filters( 'update_feedback', $this->strings['start_rollback'] );
     
    $rollback_result = $this->upgrade( $current, array_merge( $parsed_args, array( 'do_rollback' => true ) ) );
     
    $original_result = $result;
    $result          = new WP_Error(
        'rollback_was_required',
  • /wp-admin/includes/update-core.php line 1053
    1049
    1050
    1051
    1052
    1053
    1054
    1055
    1056
    1057
    1058
    1059
    * @since 2.5.0
     *
     * @param string $feedback The core update feedback messages.
     */
    apply_filters( 'update_feedback', __( 'Verifying the unpacked files…' ) );
     
    // Confidence check the unzipped distribution.
    $distro = '';
    $roots  = array( '/wordpress/', '/wordpress-mu/' );
     
    foreach ( $roots as $root ) {
  • /wp-admin/includes/update-core.php line 1195
    1191
    1192
    1193
    1194
    1195
    1196
    1197
    1198
    1199
    1200
    1201
        );
    }
     
    /** This filter is documented in wp-admin/includes/update-core.php */
    apply_filters( 'update_feedback', __( 'Preparing to install the latest version…' ) );
     
    /*
     * Don't copy wp-content, we'll deal with that below.
     * We also copy version.php last so failed updates report their old version.
     */
    $skip              = array( 'wp-content', 'wp-includes/version.php' );
  • /wp-admin/includes/update-core.php line 1279
    1275
    1276
    1277
    1278
    1279
    1280
    1281
    1282
    1283
    1284
    1285
        }
    }
     
    /** This filter is documented in wp-admin/includes/update-core.php */
    apply_filters( 'update_feedback', __( 'Enabling Maintenance mode…' ) );
     
    // Create maintenance file to signal that we are upgrading.
    $maintenance_string = '<?php $upgrading = ' . time() . '; ?>';
    $maintenance_file   = $to . '.maintenance';
    $wp_filesystem->delete( $maintenance_file );
    $wp_filesystem->put_contents( $maintenance_file, $maintenance_string, FS_CHMOD_FILE );
  • /wp-admin/includes/update-core.php line 1288
    1284
    1285
    1286
    1287
    1288
    1289
    1290
    1291
    1292
    1293
    1294
    $wp_filesystem->delete( $maintenance_file );
    $wp_filesystem->put_contents( $maintenance_file, $maintenance_string, FS_CHMOD_FILE );
     
    /** This filter is documented in wp-admin/includes/update-core.php */
    apply_filters( 'update_feedback', __( 'Copying the required files&#8230;' ) );
     
    // Copy new versions of WP files into place.
    $result = copy_dir( $from . $distro, $to, $skip );
     
    if ( is_wp_error( $result ) ) {
        $result = new WP_Error(
  • /wp-admin/includes/update-core.php line 1428
    1424
    1425
    1426
    1427
    1428
    1429
    1430
    1431
    1432
    1433
    1434
        }
    }
     
    /** This filter is documented in wp-admin/includes/update-core.php */
    apply_filters( 'update_feedback', __( 'Disabling Maintenance mode&#8230;' ) );
     
    // Remove maintenance file, we're done with potential site-breaking changes.
    $wp_filesystem->delete( $maintenance_file );
     
    /*
     * 3.5 -> 3.5+ - an empty twentytwelve directory was created upon upgrade to 3.5 for some users,
  • /wp-admin/includes/update-core.php line 1543
    1539
    1540
    1541
    1542
    1543
    1544
    1545
    1546
    1547
    1548
    1549
    _upgrade_core_deactivate_incompatible_plugins();
     
    // Upgrade DB with separate request.
    /** This filter is documented in wp-admin/includes/update-core.php */
    apply_filters( 'update_feedback', __( 'Upgrading database&#8230;' ) );
     
    $db_upgrade_url = admin_url( 'upgrade.php?step=upgrade_db' );
    wp_remote_post( $db_upgrade_url, array( 'timeout' => 60 ) );
     
    // Clear the cache to prevent an update_option() from saving a stale db_version to the cache.
    wp_cache_flush();

See this hook used in plugins: