',
wpcf7_format_atts( array(
'type' => 'text',
'name' => 'post_title',
'value' => $post->initial() ? '' : $post->title(),
'id' => 'title',
'spellcheck' => 'true',
'autocomplete' => 'off',
'disabled' => ! current_user_can( 'wpcf7_edit_contact_form', $post_id ),
'placeholder' => __( 'Enter title here', 'contact-form-7' ),
'aria-label' => __( 'Enter title here', 'contact-form-7' ),
) )
);
?>
initial() ) {
if ( $shortcode = $post->shortcode() ) {
echo sprintf(
'
',
esc_html( __( "Copy this shortcode and paste it into your post, page, or text widget content:", 'contact-form-7' ) ),
wpcf7_format_atts( array(
'type' => 'text',
'id' => 'wpcf7-shortcode',
'onfocus' => 'this.select();',
'readonly' => true,
'class' => 'large-text code',
'value' => $shortcode,
) )
);
}
if ( $shortcode = $post->shortcode( array( 'use_old_format' => true ) ) ) {
echo sprintf(
'
',
esc_html( __( "You can also use this old-style shortcode:", 'contact-form-7' ) ),
wpcf7_format_atts( array(
'type' => 'text',
'id' => 'wpcf7-shortcode-old',
'onfocus' => 'this.select();',
'readonly' => true,
'class' => 'large-text code',
'value' => $shortcode,
) )
);
}
}
?>
array(
'title' => __( 'Form', 'contact-form-7' ),
'callback' => 'wpcf7_editor_panel_form',
),
'mail-panel' => array(
'title' => __( 'Mail', 'contact-form-7' ),
'callback' => 'wpcf7_editor_panel_mail',
),
'messages-panel' => array(
'title' => __( 'Messages', 'contact-form-7' ),
'callback' => 'wpcf7_editor_panel_messages',
),
);
$additional_settings = $post->prop( 'additional_settings' );
if ( ! is_scalar( $additional_settings ) ) {
$additional_settings = '';
}
$additional_settings = trim( $additional_settings );
$additional_settings = explode( "\n", $additional_settings );
$additional_settings = array_filter( $additional_settings );
$additional_settings = count( $additional_settings );
$panels['additional-settings-panel'] = array(
'title' => $additional_settings
? sprintf(
/* translators: %d: number of additional settings */
__( 'Additional Settings (%d)', 'contact-form-7' ),
$additional_settings )
: __( 'Additional Settings', 'contact-form-7' ),
'callback' => 'wpcf7_editor_panel_additional_settings',
);
}
$panels = apply_filters( 'wpcf7_editor_panels', $panels );
foreach ( $panels as $id => $panel ) {
$editor->add_panel( $id, $panel['title'], $panel['callback'] );
}
$editor->display();
?>
%s',
$save_button
);
}
?>