automatic_updates_is_vcs_checkout filter-hookWP 3.7.0

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

Usage

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(string)
The filesystem context (a path) against which filesystem status should be checked.

Changelog

Since 3.7.0 Introduced.

Where the hook is called

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 178
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 ) ) {

Where the hook is used in WordPress

Usage not found.