$matched_shortcode ) { if ( ! in_array( $matched_shortcode, $cask_shortcodes ) ) { continue; } $valid_matches[] = array( 'type' => $matches[2][ $key ], 'attributes' => $matches[0][ $key ], ); } return $valid_matches; } }