diff --git a/src/wp-includes/html-api/class-wp-html-tag-processor.php b/src/wp-includes/html-api/class-wp-html-tag-processor.php
index 0000000000..0000000000 100644
|
a
|
b
|
class WP_HTML_Tag_Processor {
|
| 2843 | 2843 | public function get_attribute_names_with_prefix( $prefix ): ?array { |
| 2844 | 2844 | if ( self::STATE_MATCHED_TAG !== $this->parser_state || $this->is_closing_tag ) { |
| 2845 | 2845 | return null; |
| 2846 | 2846 | } |
| | 2847 | |
| | 2848 | /* |
| | 2849 | * Make sure pending class changes are represented as attribute updates |
| | 2850 | * before reading the current attribute names. |
| | 2851 | */ |
| | 2852 | $this->class_name_updates_to_attributes_updates(); |
| | 2853 | |
| 2847 | 2854 | $comparable = strtolower( $prefix ); |
| 2848 | | $matches = array(); |
| | 2855 | $matches = array(); |
| | 2856 | |
| 2849 | 2857 | foreach ( array_keys( $this->attributes ) as $attr_name ) { |
| 2850 | 2858 | if ( str_starts_with( $attr_name, $comparable ) ) { |
| 2851 | | $matches[] = $attr_name; |
| | 2859 | $matches[ $attr_name ] = true; |
| | 2860 | } |
| | 2861 | } |
| | 2862 | |
| | 2863 | foreach ( $this->lexical_updates as $name => $update ) { |
| | 2864 | if ( ! is_string( $name ) ) { |
| | 2865 | continue; |
| | 2866 | } |
| | 2867 | |
| | 2868 | if ( ! str_starts_with( $name, $comparable ) ) { |
| | 2869 | continue; |
| | 2870 | } |
| | 2871 | |
| | 2872 | if ( '' === $update->text ) { |
| | 2873 | unset( $matches[ $name ] ); |
| | 2874 | continue; |
| 2852 | 2875 | } |
| | 2876 | |
| | 2877 | $matches[ $name ] = true; |
| 2853 | 2878 | } |
| 2854 | | return $matches; |
| | 2879 | |
| | 2880 | return array_keys( $matches ); |
| 2855 | 2881 | } |
| 2856 | 2882 | |
| 2857 | 2883 | /** |