| Server IP : 188.114.97.2 / Your IP : 104.23.243.201 Web Server : Apache/2.4.59 (Debian) System : Linux EDL-STRETCH 4.19.0-27-amd64 #1 SMP Debian 4.19.316-1 (2024-06-25) x86_64 User : edlftp ( 1002) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/nicolasj/www/ecolecommunalededion.be/wp-content/plugins/contact-form-7/modules/ |
Upload File : |
<?php
add_action( 'wpcf7_init', 'wpcf7_add_form_tag_reflection', 10, 0 );
function wpcf7_add_form_tag_reflection() {
wpcf7_add_form_tag( 'reflection',
'wpcf7_reflection_form_tag_handler',
array(
'name-attr' => true,
'display-block' => true,
'not-for-mail' => true,
)
);
}
function wpcf7_reflection_form_tag_handler( $tag ) {
if ( empty( $tag->name ) ) {
return '';
}
$content = '';
$values = (array) wpcf7_get_hangover( $tag->name );
if ( $values and ! wpcf7_get_validation_error( $tag->name ) ) {
$values = array_map(
function ( $val ) use ( $tag ) {
return sprintf(
'<output name="%1$s">%2$s</output>',
esc_attr( $tag->name ),
esc_html( $val )
);
},
$values
);
$content = implode( '', $values );
}
$html = sprintf(
'<fieldset %1$s>%2$s</fieldset>',
wpcf7_format_atts( array(
'data-reflection-of' => $tag->name,
'class' => $tag->get_class_option(
wpcf7_form_controls_class( $tag->type )
),
'id' => $tag->get_id_option(),
) ),
$content
);
return $html;
}