contact_form = $contact_form;
}
public function add_panel( $id, $title, $callback ) {
if ( wpcf7_is_name( $id ) ) {
$this->panels[$id] = array(
'title' => $title,
'callback' => $callback,
);
}
}
public function display() {
if ( empty( $this->panels ) ) {
return;
}
echo '
';
foreach ( $this->panels as $id => $panel ) {
echo sprintf( '',
esc_attr( $id ) );
if ( is_callable( $panel['callback'] ) ) {
$this->notice( $id, $panel );
call_user_func( $panel['callback'], $this->contact_form );
}
echo '
';
}
}
public function notice( $id, $panel ) {
echo '';
}
}
function wpcf7_editor_panel_form( $post ) {
$desc_link = wpcf7_link(
__( 'https://contactform7.com/editing-form-template/', 'contact-form-7' ),
__( 'Editing Form Template', 'contact-form-7' ) );
$description = __( "You can edit the form template here. For details, see %s.", 'contact-form-7' );
$description = sprintf( esc_html( $description ), $desc_link );
?>
';
wpcf7_editor_box_mail( $post, array(
'id' => 'wpcf7-mail-2',
'name' => 'mail_2',
'title' => __( 'Mail (2)', 'contact-form-7' ),
'use' => __( 'Use Mail (2)', 'contact-form-7' ),
) );
}
function wpcf7_editor_box_mail( $post, $args = '' ) {
$args = wp_parse_args( $args, array(
'id' => 'wpcf7-mail',
'name' => 'mail',
'title' => __( 'Mail', 'contact-form-7' ),
'use' => null,
) );
$id = esc_attr( $args['id'] );
$mail = wp_parse_args( $post->prop( $args['name'] ), array(
'active' => false,
'recipient' => '',
'sender' => '',
'subject' => '',
'body' => '',
'additional_headers' => '',
'attachments' => '',
'use_html' => false,
'exclude_blank' => false,
) );
?>