automatic_updates_is_vcs_checkout

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

Description

apply_filters( 'automatic_updates_is_vcs_checkout', (bool) $checkout, (string) $context ); 

Parameters (2)

0. $checkout (bool)
Whether a VCS checkout was discovered at $context or ABSPATH, or anywhere higher.
1. $context (string)
The filesystem context (a path) against which filesystem status should be checked.

Usage

To run the hook, copy the example below.
  1. $checkout = apply_filters( 'automatic_updates_is_vcs_checkout', $checkout, $context ); 
  2.  
  3. if ( !empty( $checkout ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the automatic_updates_is_vcs_checkout callback 
  2. function filter_automatic_updates_is_vcs_checkout( $checkout, $context ) { 
  3. // make filter magic happen here... 
  4. return $checkout
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'automatic_updates_is_vcs_checkout', 'filter_automatic_updates_is_vcs_checkout', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'automatic_updates_is_vcs_checkout', 'filter_automatic_updates_is_vcs_checkout', 10, 2 ); 

Defined (1)

The filter is defined in the following location(s).

/wp-admin/includes/class-wp-automatic-updater.php  
  1. return apply_filters( 'automatic_updates_is_vcs_checkout', $checkout, $context );