Skip to content

Commit

Permalink
Merge pull request #1220 from takayukister/dev/5.7
Browse files Browse the repository at this point in the history
Update listo.php
  • Loading branch information
takayukister authored Apr 23, 2023
2 parents f70ac15 + 63dfca5 commit de9f227
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion modules/listo.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ function wpcf7_listo( $data, $options, $args ) {
foreach ( (array) $options as $option ) {
$option = explode( '.', $option );
$type = $option[0];
$args['group'] = isset( $option[1] ) ? $option[1] : null;

if ( isset( $option[1] ) ) {
$args['group'] = $option[1];
} else {
unset( $args['group'] );
}

if ( $list = listo( $type, $args ) ) {
$data = array_merge( (array) $data, $list );
Expand Down

0 comments on commit de9f227

Please sign in to comment.