| @@ -171,12 +171,8 @@ | ||
| 171 | 171 | |
| 172 | 172 | // Hack to avoid enqueue post CSS while it's a `the_excerpt` call. |
| 173 | 173 | add_filter( 'get_the_excerpt', [ $this, 'start_excerpt_flag' ], 1 ); |
| 174 | 174 | add_filter( 'get_the_excerpt', [ $this, 'end_excerpt_flag' ], 20 ); |
| 175 | - | |
| 176 | - if ( version_compare( get_bloginfo( 'version' ), '6.9', '>=' ) ) { | |
| 177 | - add_filter( 'wp_should_output_buffer_template_for_enhancement', '__return_false', 1 ); | |
| 178 | - } | |
| 179 | 175 | } |
| 180 | 176 | |
| 181 | 177 | /** |
| 182 | 178 | * Get module name. |
| @@ -245,15 +241,15 @@ | ||
| 245 | 241 | |
| 246 | 242 | /** |
| 247 | 243 | * @since 2.0.12 |
| 248 | 244 | * @access public |
| 249 | - * @param string|array $class_name | |
| 245 | + * @param string|array $class | |
| 250 | 246 | */ |
| 251 | - public function add_body_class( $class_name ) { | |
| 252 | - if ( is_array( $class_name ) ) { | |
| 253 | - $this->body_classes = array_merge( $this->body_classes, $class_name ); | |
| 247 | + public function add_body_class( $class ) { | |
| 248 | + if ( is_array( $class ) ) { | |
| 249 | + $this->body_classes = array_merge( $this->body_classes, $class ); | |
| 254 | 250 | } else { |
| 255 | - $this->body_classes[] = $class_name; | |
| 251 | + $this->body_classes[] = $class; | |
| 256 | 252 | } |
| 257 | 253 | } |
| 258 | 254 | |
| 259 | 255 | /** |
| @@ -454,10 +450,8 @@ | ||
| 454 | 450 | ELEMENTOR_VERSION, |
| 455 | 451 | true |
| 456 | 452 | ); |
| 457 | 453 | |
| 458 | - $this->register_frontend_handlers(); | |
| 459 | - | |
| 460 | 454 | /** |
| 461 | 455 | * After frontend register scripts. |
| 462 | 456 | * |
| 463 | 457 | * Fires after Elementor frontend scripts are registered. |
| @@ -555,9 +549,9 @@ | ||
| 555 | 549 | ); |
| 556 | 550 | |
| 557 | 551 | wp_register_style( |
| 558 | 552 | 'elementor-frontend', |
| 559 | - $this->get_frontend_file_url( "frontend{$min_suffix}.css", $has_custom_breakpoints ), | |
| 553 | + $this->get_frontend_file_url( "frontend{$direction_suffix}{$min_suffix}.css", $has_custom_breakpoints ), | |
| 560 | 554 | [], |
| 561 | 555 | $has_custom_breakpoints ? null : ELEMENTOR_VERSION |
| 562 | 556 | ); |
| 563 | 557 | |
| @@ -591,23 +585,8 @@ | ||
| 591 | 585 | do_action( 'elementor/frontend/after_register_styles' ); |
| 592 | 586 | } |
| 593 | 587 | |
| 594 | 588 | /** |
| 595 | - * Register frontend handlers. | |
| 596 | - * | |
| 597 | - * Registers all the frontend handlers for widgets and elements. | |
| 598 | - * | |
| 599 | - * Fired by `wp_enqueue_scripts` action. | |
| 600 | - * | |
| 601 | - * @since 3.25.0 | |
| 602 | - * @access public | |
| 603 | - */ | |
| 604 | - public function register_frontend_handlers() { | |
| 605 | - Plugin::$instance->widgets_manager->register_frontend_handlers(); | |
| 606 | - Plugin::$instance->elements_manager->register_frontend_handlers(); | |
| 607 | - } | |
| 608 | - | |
| 609 | - /** | |
| 610 | 589 | * Enqueue scripts. |
| 611 | 590 | * |
| 612 | 591 | * Enqueue all the frontend scripts. |
| 613 | 592 | * |
| @@ -686,22 +665,14 @@ | ||
| 686 | 665 | if ( ! Plugin::$instance->preview->is_preview_mode() ) { |
| 687 | 666 | $post_id = get_the_ID(); |
| 688 | 667 | // Check $post_id for virtual pages. check is singular because the $post_id is set to the first post on archive pages. |
| 689 | 668 | if ( $post_id && is_singular() ) { |
| 690 | - do_action( 'elementor/post/render', $post_id ); | |
| 691 | 669 | $this->handle_page_assets( $post_id ); |
| 692 | 670 | |
| 693 | 671 | $css_file = Post_CSS::create( get_the_ID() ); |
| 694 | 672 | $css_file->enqueue(); |
| 695 | 673 | } |
| 696 | - } else { | |
| 697 | - $post_id = Plugin::$instance->preview->get_post_id(); | |
| 698 | - if ( $post_id ) { | |
| 699 | - do_action( 'elementor/post/render', $post_id ); | |
| 700 | - } | |
| 701 | 674 | } |
| 702 | - | |
| 703 | - do_action( 'elementor/frontend/after_enqueue_post_styles' ); | |
| 704 | 675 | } |
| 705 | 676 | } |
| 706 | 677 | |
| 707 | 678 | private function handle_page_assets( $post_id ): void { |
| @@ -900,20 +871,8 @@ | ||
| 900 | 871 | * @since 1.9.4 |
| 901 | 872 | * @access public |
| 902 | 873 | */ |
| 903 | 874 | public function print_fonts_links() { |
| 904 | - /** | |
| 905 | - * Register font styles. | |
| 906 | - * | |
| 907 | - * Fires before fonts are processed, allowing add-ons to register | |
| 908 | - * proper stylesheets for their custom font types via the WordPress API. | |
| 909 | - * | |
| 910 | - * @since 3.29.0 | |
| 911 | - * | |
| 912 | - * @param string[] $fonts_to_enqueue List of font families to be enqueued. | |
| 913 | - */ | |
| 914 | - do_action( 'elementor/fonts/register_styles', $this->fonts_to_enqueue ); | |
| 915 | - | |
| 916 | 875 | $google_fonts = $this->get_list_of_google_fonts_by_type(); |
| 917 | 876 | |
| 918 | 877 | $this->enqueue_google_fonts( $google_fonts ); |
| 919 | 878 | $this->enqueue_icon_fonts(); |
| @@ -1044,19 +1003,18 @@ | ||
| 1044 | 1003 | if ( ! $print_google_fonts ) { |
| 1045 | 1004 | return; |
| 1046 | 1005 | } |
| 1047 | 1006 | |
| 1048 | - $force_enqueue_from_cdn = Plugin::$instance->preview->is_preview_mode(); | |
| 1049 | - | |
| 1007 | + // Print used fonts | |
| 1050 | 1008 | if ( ! empty( $google_fonts['google'] ) ) { |
| 1051 | 1009 | foreach ( $google_fonts['google'] as $current_font ) { |
| 1052 | - Google_Font::enqueue( $current_font, Google_Font::TYPE_DEFAULT, $force_enqueue_from_cdn ); | |
| 1010 | + Google_Font::enqueue( $current_font ); | |
| 1053 | 1011 | } |
| 1054 | 1012 | } |
| 1055 | 1013 | |
| 1056 | 1014 | if ( ! empty( $google_fonts['early'] ) ) { |
| 1057 | 1015 | foreach ( $google_fonts['early'] as $current_font ) { |
| 1058 | - Google_Font::enqueue( $current_font, Google_Font::TYPE_EARLYACCESS, $force_enqueue_from_cdn ); | |
| 1016 | + Google_Font::enqueue( $current_font, Google_Font::TYPE_EARLYACCESS ); | |
| 1059 | 1017 | } |
| 1060 | 1018 | } |
| 1061 | 1019 | } |
| 1062 | 1020 | |
| @@ -1147,21 +1105,8 @@ | ||
| 1147 | 1105 | |
| 1148 | 1106 | $data = $document->get_elements_data(); |
| 1149 | 1107 | |
| 1150 | 1108 | /** |
| 1151 | - * Filters document elements data after loading. | |
| 1152 | - * | |
| 1153 | - * Allows modification of elements data when loading (not saving). | |
| 1154 | - * Useful for migrations, transformations, or data enrichment. | |
| 1155 | - * | |
| 1156 | - * @since 4.0.0 | |
| 1157 | - * | |
| 1158 | - * @param array $data The elements data array. | |
| 1159 | - * @param \Elementor\Core\Base\Document $document The document instance. | |
| 1160 | - */ | |
| 1161 | - $data = apply_filters( 'elementor/document/load/data', $data, $document ); | |
| 1162 | - | |
| 1163 | - /** | |
| 1164 | 1109 | * Frontend builder content data. |
| 1165 | 1110 | * |
| 1166 | 1111 | * Filters the builder content in the frontend. |
| 1167 | 1112 | * |
| @@ -1460,9 +1405,8 @@ | ||
| 1460 | 1405 | 'uploadUrl' => wp_upload_dir()['baseurl'], |
| 1461 | 1406 | ], |
| 1462 | 1407 | 'nonces' => [ |
| 1463 | 1408 | 'floatingButtonsClickTracking' => wp_create_nonce( Module::CLICK_TRACKING_NONCE ), |
| 1464 | - 'atomicFormsSendForm' => wp_create_nonce( 'elementor_pro_atomic_forms_send_form' ), | |
| 1465 | 1409 | ], |
| 1466 | 1410 | 'swiperClass' => 'swiper', |
| 1467 | 1411 | ]; |
| 1468 | 1412 | |