update_feedback хук-фильтрWP 2.5.0

Filters feedback messages displayed during the core update process.

The filter is first evaluated after the zip file for the latest version has been downloaded and unzipped. It is evaluated five more times during the process:

  1. Before WordPress begins the core upgrade process.
  2. Before Maintenance Mode is enabled.
  3. Before WordPress begins copying over the necessary files.
  4. Before Maintenance Mode is disabled.
  5. Before the database is upgraded.

Использование

add_filter( 'update_feedback', 'wp_kama_update_feedback_filter' );

/**
 * Function for `update_feedback` filter-hook.
 * 
 * @param string $feedback The core update feedback messages.
 *
 * @return string
 */
function wp_kama_update_feedback_filter( $feedback ){

	// filter...
	return $feedback;
}
$feedback(строка)
The core update feedback messages.

Список изменений

С версии 2.5.0 Введена.

Где вызывается хук

update_core()
update_feedback
Core_Upgrader::upgrade()
update_feedback
wp-admin/includes/update-core.php 986
apply_filters( 'update_feedback', __( 'Verifying the unpacked files…' ) );
wp-admin/includes/update-core.php 1123
apply_filters( 'update_feedback', __( 'Preparing to install the latest version…' ) );
wp-admin/includes/update-core.php 1200
apply_filters( 'update_feedback', __( 'Enabling Maintenance mode…' ) );
wp-admin/includes/update-core.php 1209
apply_filters( 'update_feedback', __( 'Copying the required files…' ) );
wp-admin/includes/update-core.php 1336
apply_filters( 'update_feedback', __( 'Disabling Maintenance mode…' ) );
wp-admin/includes/update-core.php 1446
apply_filters( 'update_feedback', __( 'Upgrading database…' ) );
wp-admin/includes/class-core-upgrader.php 131
apply_filters( 'update_feedback', $download->get_error_message() );
wp-admin/includes/class-core-upgrader.php 195
apply_filters( 'update_feedback', $result );
wp-admin/includes/class-core-upgrader.php 198
apply_filters( 'update_feedback', $this->strings['start_rollback'] );

Где используется хук в WordPress

wp-admin/includes/class-wp-automatic-updater.php 313
add_filter( 'update_feedback', array( $skin, 'feedback' ) );
wp-admin/includes/deprecated.php 1161
add_filter('update_feedback', $feedback);
wp-admin/includes/deprecated.php 1184
add_filter('update_feedback', $feedback);
wp-admin/includes/deprecated.php 1206
add_filter('update_feedback', $feedback);
wp-admin/update-core.php 881
add_filter( 'update_feedback', 'show_message' );