Make WordPress Core

Changeset 27047


Ignore:
Timestamp:
01/28/2014 08:01:36 AM (11 years ago)
Author:
DrewAPicture
Message:

Inline documentation for hooks in wp-admin/includes/update-core.php.

Props JoshuaAbenazer, kpdesign.
Fixes #25998.

Location:
trunk/src/wp-admin/includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-upgrader.php

    r26883 r27047  
    14021402
    14031403            if ( $try_rollback ) {
     1404                /** This filter is documented in wp-admin/includes/update-core.php */
    14041405                apply_filters( 'update_feedback', $result );
     1406                /** This filter is documented in wp-admin/includes/update-core.php */
    14051407                apply_filters( 'update_feedback', $this->strings['start_rollback'] );
    14061408
  • trunk/src/wp-admin/includes/update-core.php

    r26846 r27047  
    685685    @set_time_limit( 300 );
    686686
    687     // Sanity check the unzipped distribution
    688     apply_filters( 'update_feedback', __('Verifying the unpacked files…') );
     687    /**
     688     * Filter feedback messages displayed during the core update process.
     689     *
     690     * The filter is first evaluated after the zip file for the latest version
     691     * has been downloaded and unzipped. It is evaluated five more times during
     692     * the process:
     693     *
     694     * 1. Before WordPress begins the core upgrade process.
     695     * 2. Before Maintenance Mode is enabled.
     696     * 3. Before WordPress begins copying over the necessary files.
     697     * 4. Before Maintenance Mode is disabled.
     698     * 5. Before the database is upgraded.
     699     *
     700     * @since 2.5.0
     701     *
     702     * @param string $feedback The core update feedback messages.
     703     */
     704    apply_filters( 'update_feedback', __( 'Verifying the unpacked files…' ) );
     705
     706    // Sanity check the unzipped distribution.
    689707    $distro = '';
    690708    $roots = array( '/wordpress/', '/wordpress-mu/' );
     
    732750        return new WP_Error( 'mysql_not_compatible', sprintf( __('The update cannot be installed because WordPress %1$s requires MySQL version %2$s or higher. You are running version %3$s.'), $wp_version, $required_mysql_version, $mysql_version ) );
    733751
     752    /** This filter is documented in wp-admin/includes/update-core.php */
    734753    apply_filters( 'update_feedback', __( 'Preparing to install the latest version…' ) );
    735754
     
    782801    }
    783802
     803    /** This filter is documented in wp-admin/includes/update-core.php */
    784804    apply_filters( 'update_feedback', __( 'Enabling Maintenance mode…' ) );
    785805    // Create maintenance file to signal that we are upgrading
     
    789809    $wp_filesystem->put_contents($maintenance_file, $maintenance_string, FS_CHMOD_FILE);
    790810
     811    /** This filter is documented in wp-admin/includes/update-core.php */
    791812    apply_filters( 'update_feedback', __( 'Copying the required files…' ) );
    792813    // Copy new versions of WP files into place.
     
    854875    }
    855876
     877    /** This filter is documented in wp-admin/includes/update-core.php */
    856878    apply_filters( 'update_feedback', __( 'Disabling Maintenance mode…' ) );
    857879    // Remove maintenance file, we're done with potential site-breaking changes
     
    925947
    926948    // Upgrade DB with separate request
    927     apply_filters('update_feedback', __('Upgrading database…'));
     949    /** This filter is documented in wp-admin/includes/update-core.php */
     950    apply_filters( 'update_feedback', __( 'Upgrading database…' ) );
    928951    $db_upgrade_url = admin_url('upgrade.php?step=upgrade_db');
    929952    wp_remote_post($db_upgrade_url, array('timeout' => 60));
     
    943966        delete_option('update_core');
    944967
    945     // If we made it this far:
     968    /**
     969     * Fires after WordPress core has been successfully updated.
     970     *
     971     * @since 3.3.0
     972     *
     973     * @param string $wp_version The current WordPress version.
     974     */
    946975    do_action( '_core_updated_successfully', $wp_version );
    947976
Note: See TracChangeset for help on using the changeset viewer.