automatic_updates_is_vcs_checkout хук-фильтрWP 3.7.0

Filters whether the automatic updater should consider a filesystem location to be potentially managed by a version control system.

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

add_filter( 'automatic_updates_is_vcs_checkout', 'wp_kama_automatic_updates_is_vcs_checkout_filter', 10, 2 );

/**
 * Function for `automatic_updates_is_vcs_checkout` filter-hook.
 * 
 * @param bool   $checkout Whether a VCS checkout was discovered at `$context` or ABSPATH, or anywhere higher.
 * @param string $context  The filesystem context (a path) against which filesystem status should be checked.
 *
 * @return bool
 */
function wp_kama_automatic_updates_is_vcs_checkout_filter( $checkout, $context ){

	// filter...
	return $checkout;
}
$checkout(true|false)
Whether a VCS checkout was discovered at $context or ABSPATH, or anywhere higher.
$context(строка)
The filesystem context (a path) against which filesystem status should be checked.

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

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

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

WP_Automatic_Updater::is_vcs_checkout()
automatic_updates_is_vcs_checkout
WP_Site_Health_Auto_Updates::test_vcs_abspath()
automatic_updates_is_vcs_checkout
wp-admin/includes/class-wp-automatic-updater.php 123
return apply_filters( 'automatic_updates_is_vcs_checkout', $checkout, $context );
wp-admin/includes/class-wp-site-health-auto-updates.php 239
if ( $checkout && ! apply_filters( 'automatic_updates_is_vcs_checkout', true, ABSPATH ) ) {

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

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