jetpack_verification_validate

Helper functions that are called from API even when module is inactive should be added here.

Description

jetpack_verification_validate( $verification_services_codes ); 

Parameters (1)

0. $verification_services_codes
The verification services codes.

Usage

  1. if ( !function_exists( 'jetpack_verification_validate' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'jetpack-by-wordpress-com/modules/verification-tools/blog-verification-tools.php'; 
  3.  
  4. // The verification services codes. 
  5. $verification_services_codes = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = jetpack_verification_validate($verification_services_codes); 
  9.  

Defined (1)

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

/modules/verification-tools/blog-verification-tools.php  
  1. function jetpack_verification_validate( $verification_services_codes ) { 
  2. foreach ( $verification_services_codes as $key => &$code ) { 
  3. // Parse html meta tags if present 
  4. if ( stripos( $code, 'meta' ) ) 
  5. $code = jetpack_verification_get_code( $code ); 
  6.  
  7. $code = esc_attr( trim( $code ) ); 
  8.  
  9. // limit length to 100 chars. 
  10. $code = substr( $code, 0, 100 ); 
  11.  
  12. /** 
  13. * Fire after each Verification code was validated. 
  14. * @module verification-tools 
  15. * @since 3.0.0 
  16. * @param string $key Verification service name. 
  17. * @param string $code Verification service code provided in field in the Tools menu. 
  18. */ 
  19. do_action( 'jetpack_site_verification_validate', $key, $code ); 
  20. return $verification_services_codes;