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
if ( !function_exists( 'wpcf7_editor_panel_messages' ) ) { require_once ABSPATH . PLUGINDIR . 'contact-form-7/admin/includes/editor.php'; } // The post. $post = null; // NOTICE! Understand what this does before running. $result = wpcf7_editor_panel_messages($post);
Defined (1)
The function is defined in the following location(s).
- /admin/includes/editor.php
- function wpcf7_editor_panel_messages( $post ) {
- $messages = wpcf7_messages();
- if ( isset( $messages['captcha_not_match'] )
- && ! wpcf7_use_really_simple_captcha() ) {
- unset( $messages['captcha_not_match'] );
- }
- ?>
- <h2><?php echo esc_html( __( 'Messages', 'contact-form-7' ) ); ?></h2>
- <fieldset>
- <legend><?php echo esc_html( __( 'Edit messages used in the following situations.', 'contact-form-7' ) ); ?></legend>
- <?php
- foreach ( $messages as $key => $arr ) {
- $field_id = sprintf( 'wpcf7-message-%s', strtr( $key, '_', '-' ) );
- $field_name = sprintf( 'wpcf7-messages[%s]', $key );
- ?>
- <p class="description">
- <label for="<?php echo $field_id; ?>"><?php echo esc_html( $arr['description'] ); ?><br />
- <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 ) ); ?>" />
- </label>
- </p>
- <?php
- }
- ?>
- </fieldset>
- <?php