wpcf7_notice_bulk_validate_config

The Contact Form 7 wpcf7 notice bulk validate config function.

Description

wpcf7_notice_bulk_validate_config(); 

Usage

  1. if ( !function_exists( 'wpcf7_notice_bulk_validate_config' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'contact-form-7/admin/admin.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = wpcf7_notice_bulk_validate_config(); 
  7.  

Defined (1)

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

/admin/admin.php  
  1. function wpcf7_notice_bulk_validate_config() { 
  2. || ! current_user_can( 'wpcf7_edit_contact_forms' ) ) { 
  3. return; 
  4.  
  5. if ( isset( $_GET['page'] ) && wpcf7 == $_GET['page'] 
  6. && isset( $_GET['action'] ) && 'validate' == $_GET['action'] ) { 
  7. return; 
  8.  
  9. if ( WPCF7::get_option( 'bulk_validate' ) ) { // already done. 
  10. return; 
  11.  
  12. $link = add_query_arg( 
  13. array( 'action' => 'validate' ),  
  14. menu_page_url( wpcf7, false ) ); 
  15.  
  16. $link = sprintf( '<a href="%s">%s</a>', $link, esc_html( __( 'Validate Contact Form 7 Configuration', 'contact-form-7' ) ) ); 
  17.  
  18. $message = __( "Misconfiguration leads to mail delivery failure or other troubles. Validate your contact forms now.", 'contact-form-7' ); 
  19.  
  20. echo sprintf( '<div class="notice notice-warning"><p>%s » %s</p></div>',  
  21. esc_html( $message ), $link );