@@ 18-20 (lines=3) @@ | ||
15 | ||
16 | // convert list of modules in comma-delimited format into an array |
|
17 | // of "$modulename => true" |
|
18 | if ( isset( $args['modules'] ) && ! empty( $args['modules'] ) ) { |
|
19 | $modules = array_map( '__return_true', array_flip( array_map( 'trim', explode( ',', $args['modules'] ) ) ) ); |
|
20 | } |
|
21 | ||
22 | foreach ( array( 'posts', 'comments', 'users' ) as $module_name ) { |
|
23 | if ( 'users' === $module_name && isset( $args[ $module_name ] ) && 'initial' === $args[ $module_name ] ) { |
@@ 2215-2217 (lines=3) @@ | ||
2212 | $attributes['required'] = false; |
|
2213 | ||
2214 | // parse out comma-separated options list (for selects, radios, and checkbox-multiples) |
|
2215 | if ( !empty( $attributes['options'] ) && is_string( $attributes['options'] ) ) { |
|
2216 | $attributes['options'] = array_map( 'trim', explode( ',', $attributes['options'] ) ); |
|
2217 | } |
|
2218 | ||
2219 | if ( $form ) { |
|
2220 | // make a unique field ID based on the label, with an incrementing number if needed to avoid clashes |