do_mu_upgrade хук-фильтрWP 3.0.0

Filters whether to attempt to perform the multisite DB upgrade routine.

In single site, the user would be redirected to wp-admin/upgrade.php. In multisite, the DB upgrade routine is automatically fired, but only when this filter returns true.

If the network is 50 sites or less, it will run every time. Otherwise, it will throttle itself to reduce load.


add_filter( 'do_mu_upgrade', 'wp_kama_do_mu_upgrade_filter' );

 * Function for `do_mu_upgrade` filter-hook.
 * @param bool $do_mu_upgrade Whether to perform the Multisite upgrade routine.
 * @return bool
function wp_kama_do_mu_upgrade_filter( $do_mu_upgrade ){

	// filter...
	return $do_mu_upgrade;
Whether to perform the Multisite upgrade routine.
По умолчанию: true

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

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

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

В файле: /wp-admin/admin.php
wp-admin/admin.php 73
if ( apply_filters( 'do_mu_upgrade', true ) ) {

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

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