// Loop over our options and convert any single value $# restrictions
// into an array so we only have to do in_array tests.
foreach ( $options as $optionName => $optionData ) {
- if ( preg_match( '/^\$\d+$/u', $optionName ) ) {
- if ( !is_array( $optionData ) ) {
- $options[$optionName] = [ $optionData ];
- }
+ if ( preg_match( '/^\$\d+$/u', $optionName ) && !is_array( $optionData ) ) {
+ $options[$optionName] = [ $optionData ];
}
}