wpcf7_version_grep

The Contact Form 7 wpcf7 version grep function.

Description

wpcf7_version_grep( $version, array $input ); 

Parameters (2)

0. $version
The version.
1. $input
The input.

Usage

  1. if ( !function_exists( 'wpcf7_version_grep' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'contact-form-7/includes/functions.php'; 
  3.  
  4. // The version. 
  5. $version = null; 
  6.  
  7. // The input. 
  8. $input = array $input; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = wpcf7_version_grep($version, $input); 
  12.  

Defined (1)

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

/includes/functions.php  
  1. function wpcf7_version_grep( $version, array $input ) { 
  2. $pattern = '/^' . preg_quote( (string) $version, '/' ) . '(?:\.|$)/'; 
  3.  
  4. return preg_grep( $pattern, $input );