wp_opcache_invalidate_file filter-hook . WP 5.5.0
Filters whether to invalidate a file from the opcode cache.
Usage
add_filter( 'wp_opcache_invalidate_file', 'filter_function_name_6859', 10, 2 ); function filter_function_name_6859( $will_invalidate, $filepath ){ // filter... return $will_invalidate; }
- $will_invalidate(true/false)
- Whether WordPress will invalidate $filepath.
Default: true - $filepath(string)
- The path to the PHP file to invalidate.
Changelog
Since 5.5.0 | Introduced. |
Where the hook is called
wp_opcache_invalidate_file
wp-admin/includes/file.php 2371
if ( apply_filters( 'wp_opcache_invalidate_file', true, $filepath ) ) {