| @@ -729,19 +729,13 @@ | ||
| 729 | 729 | if ( $id === $element['id'] ) { |
| 730 | 730 | return $element; |
| 731 | 731 | } |
| 732 | 732 | |
| 733 | - $inner_elements = apply_filters( | |
| 734 | - 'elementor/utils/find_element_recursive/inner_elements', | |
| 735 | - $element['elements'] ?? [], | |
| 736 | - $element | |
| 737 | - ); | |
| 733 | + if ( ! empty( $element['elements'] ) ) { | |
| 734 | + $element = self::find_element_recursive( $element['elements'], $id ); | |
| 738 | 735 | |
| 739 | - if ( ! empty( $inner_elements ) ) { | |
| 740 | - $found = self::find_element_recursive( $inner_elements, $id ); | |
| 741 | - | |
| 742 | - if ( $found ) { | |
| 743 | - return $found; | |
| 736 | + if ( $element ) { | |
| 737 | + return $element; | |
| 744 | 738 | } |
| 745 | 739 | } |
| 746 | 740 | } |
| 747 | 741 | |
| @@ -977,19 +971,6 @@ | ||
| 977 | 971 | } |
| 978 | 972 | |
| 979 | 973 | public static function encode_string( string $decoded_string ): string { |
| 980 | 974 | return base64_encode( $decoded_string ); |
| 981 | - } | |
| 982 | - | |
| 983 | - public static function html_to_plain_text( string $html ): string { | |
| 984 | - if ( empty( $html ) ) { | |
| 985 | - return ''; | |
| 986 | - } | |
| 987 | - | |
| 988 | - $text = preg_replace( '#<br\s*/?\s*>#i', ' ', $html ); | |
| 989 | - $text = preg_replace( '#</?[a-z][^>]*>#i', ' ', $text ); | |
| 990 | - $text = html_entity_decode( $text, ENT_QUOTES, 'UTF-8' ); | |
| 991 | - $text = str_replace( "\xE2\x80\x8B", '', $text ); | |
| 992 | - | |
| 993 | - return trim( preg_replace( '/\s+/', ' ', $text ) ); | |
| 994 | 975 | } |
| 995 | 976 | } |