| @@ -29,9 +29,8 @@ | ||
| 29 | 29 | 'a', |
| 30 | 30 | 'article', |
| 31 | 31 | 'aside', |
| 32 | 32 | 'button', |
| 33 | - 'form', | |
| 34 | 33 | 'div', |
| 35 | 34 | 'footer', |
| 36 | 35 | 'h1', |
| 37 | 36 | 'h2', |
| @@ -637,23 +636,8 @@ | ||
| 637 | 636 | public static function has_pro() { |
| 638 | 637 | return defined( 'ELEMENTOR_PRO_VERSION' ); |
| 639 | 638 | } |
| 640 | 639 | |
| 641 | - public static function is_pro_installed_and_not_active(): bool { | |
| 642 | - if ( ! function_exists( 'get_plugins' ) ) { | |
| 643 | - require_once ABSPATH . 'wp-admin/includes/plugin.php'; | |
| 644 | - } | |
| 645 | - | |
| 646 | - $file_path = self::get_elementor_pro_file_path(); | |
| 647 | - $installed_plugins = get_plugins(); | |
| 648 | - | |
| 649 | - return isset( $installed_plugins[ $file_path ] ); | |
| 650 | - } | |
| 651 | - | |
| 652 | - private static function get_elementor_pro_file_path(): string { | |
| 653 | - return 'elementor-pro/elementor-pro.php'; | |
| 654 | - } | |
| 655 | - | |
| 656 | 640 | /** |
| 657 | 641 | * Convert HTMLEntities to UTF-8 characters |
| 658 | 642 | * |
| 659 | 643 | * @param string $html_string |
| @@ -729,19 +713,13 @@ | ||
| 729 | 713 | if ( $id === $element['id'] ) { |
| 730 | 714 | return $element; |
| 731 | 715 | } |
| 732 | 716 | |
| 733 | - $inner_elements = apply_filters( | |
| 734 | - 'elementor/utils/find_element_recursive/inner_elements', | |
| 735 | - $element['elements'] ?? [], | |
| 736 | - $element | |
| 737 | - ); | |
| 717 | + if ( ! empty( $element['elements'] ) ) { | |
| 718 | + $element = self::find_element_recursive( $element['elements'], $id ); | |
| 738 | 719 | |
| 739 | - if ( ! empty( $inner_elements ) ) { | |
| 740 | - $found = self::find_element_recursive( $inner_elements, $id ); | |
| 741 | - | |
| 742 | - if ( $found ) { | |
| 743 | - return $found; | |
| 720 | + if ( $element ) { | |
| 721 | + return $element; | |
| 744 | 722 | } |
| 745 | 723 | } |
| 746 | 724 | } |
| 747 | 725 | |
| @@ -977,19 +955,6 @@ | ||
| 977 | 955 | } |
| 978 | 956 | |
| 979 | 957 | public static function encode_string( string $decoded_string ): string { |
| 980 | 958 | 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 | 959 | } |
| 995 | 960 | } |