wpcf7_editor_panel_messages

The Contact Form 7 wpcf7 editor panel messages function.

Description

wpcf7_editor_panel_messages( $post ); 

Parameters (1)

0. $post
The post.

Usage

  1. if ( !function_exists( 'wpcf7_editor_panel_messages' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'contact-form-7/admin/includes/editor.php'; 
  3.  
  4. // The post. 
  5. $post = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wpcf7_editor_panel_messages($post); 
  9.  

Defined (1)

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

/admin/includes/editor.php  
  1. function wpcf7_editor_panel_messages( $post ) { 
  2. $messages = wpcf7_messages(); 
  3.  
  4. if ( isset( $messages['captcha_not_match'] ) 
  5. unset( $messages['captcha_not_match'] ); 
  6.  
  7. ?> 
  8. <h2><?php echo esc_html( __( 'Messages', 'contact-form-7' ) ); ?></h2> 
  9. <fieldset> 
  10. <legend><?php echo esc_html( __( 'Edit messages used in the following situations.', 'contact-form-7' ) ); ?></legend> 
  11. <?php 
  12.  
  13. foreach ( $messages as $key => $arr ) { 
  14. $field_id = sprintf( 'wpcf7-message-%s', strtr( $key, '_', '-' ) ); 
  15. $field_name = sprintf( 'wpcf7-messages[%s]', $key ); 
  16.  
  17. ?> 
  18. <p class="description"> 
  19. <label for="<?php echo $field_id; ?>"><?php echo esc_html( $arr['description'] ); ?><br /> 
  20. <input type="text" id="<?php echo $field_id; ?>" name="<?php echo $field_name; ?>" class="large-text" size="70" value="<?php echo esc_attr( $post->message( $key, false ) ); ?>" data-config-field="<?php echo sprintf( 'messages.%s', esc_attr( $key ) ); ?>" /> 
  21. </label> 
  22. </p> 
  23. <?php 
  24. ?> 
  25. </fieldset> 
  26. <?php