Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: automatic_updates_is_vcs_checkout

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
233           foreach ( $vcs_dirs as $vcs_dir ) {
234                foreach ( $check_dirs as $check_dir ) {
235                     // phpcs:ignore
236                     if ( $checkout = @is_dir( rtrim( $check_dir, '\\/' ) . "/$vcs_dir" ) ) {
237                          break 2;
238                     }
239                }
240           }
241
242           if ( $checkout && ! apply_filters( 'automatic_updates_is_vcs_checkout', true, ABSPATH ) ) {
243                return array(
244                     'description' => sprintf(
245                          // translators: 1: Folder name. 2: Version control directory. 3: Filter name.
246                          __( 'The folder %1$s was detected as being under version control (%2$s), but the %3$s filter is allowing updates.' ),
247                          '<code>' . $check_dir . '</code>',
248                          "<code>$vcs_dir</code>",
249                          '<code>automatic_updates_is_vcs_checkout</code>'
250                     ),
251                     'severity'    => 'info',