|
Server IP : 10.131.40.8 / Your IP : 216.73.216.15 Web Server : Apache System : Linux webd008.cluster131.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64 User : ludmqhh ( 137773) PHP Version : 8.4.10 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home/ludmqhh/www/guillaume/wp-content/plugins/akismet/../contact-form-7/modules/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
/**
** Retrieve list data from the Listo plugin.
** Listo http://wordpress.org/plugins/listo/
**/
add_filter( 'wpcf7_form_tag_data_option', 'wpcf7_listo', 10, 3 );
function wpcf7_listo( $data, $options, $args ) {
if ( ! function_exists( 'listo' ) ) {
return $data;
}
$args = wp_parse_args( $args, array() );
$contact_form = wpcf7_get_current_contact_form();
$args['locale'] = $contact_form->locale();
foreach ( (array) $options as $option ) {
$option = explode( '.', $option );
$type = $option[0];
if ( isset( $option[1] ) ) {
$args['group'] = $option[1];
} else {
unset( $args['group'] );
}
if ( $list = listo( $type, $args ) ) {
$data = array_merge( (array) $data, $list );
}
}
return $data;
}
