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