← All changes
|
includes/elementor-widgets/property-tabbed-details.php
+15
-5
2.2.6
→
2.4.0
View file →
| @@ -312,8 +312,9 @@ | ||
| 312 | 312 | global $property; |
| 313 | 313 | |
| 314 | 314 | if ( is_null($property) && isset($post->ID) && get_post_type($post->ID) == 'property' ) |
| 315 | 315 | { |
| 316 | + // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- Shared frontend property global used by the Elementor widget contract; the widget intentionally consumes the current property context. | |
| 316 | 317 | $property = new PH_Property($post->ID); |
| 317 | 318 | } |
| 318 | 319 | |
| 319 | 320 | if ( is_null($property) ) |
| @@ -467,8 +468,9 @@ | ||
| 467 | 468 | global $property, $post; |
| 468 | 469 | |
| 469 | 470 | if ( is_null($property) && isset($post->ID) && get_post_type($post->ID) == 'property' ) |
| 470 | 471 | { |
| 472 | + // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- Shared frontend property global used by the Elementor widget contract; the widget intentionally consumes the current property context. | |
| 471 | 473 | $property = new PH_Property($post->ID); |
| 472 | 474 | } |
| 473 | 475 | |
| 474 | 476 | $tabs = $this->get_settings( 'property_tabs' ); |
| @@ -512,9 +514,11 @@ | ||
| 512 | 514 | 'aria-controls' => 'elementor-tab-content-' . $id_int . $tab_count, |
| 513 | 515 | 'onclick' => $onclick |
| 514 | 516 | ] ); |
| 515 | 517 | ?> |
| 516 | - <div <?php echo $this->get_render_attribute_string( $tab_title_setting_key ); ?>><?php echo $item['tab_title']; ?></div> | |
| 518 | + <div <?php | |
| 519 | + // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Elementor get_render_attribute_string uses Utils::render_html_attributes, which escapes attribute values; attribute names above are fixed literals. | |
| 520 | + echo $this->get_render_attribute_string( $tab_title_setting_key ); ?>><?php echo esc_html( $item['tab_title'] ); ?></div> | |
| 517 | 521 | <?php |
| 518 | 522 | } |
| 519 | 523 | } |
| 520 | 524 | ?> |
| @@ -564,10 +568,14 @@ | ||
| 564 | 568 | ] ); |
| 565 | 569 | |
| 566 | 570 | $this->add_inline_editing_attributes( $tab_content_setting_key, 'advanced' ); |
| 567 | 571 | ?> |
| 568 | - <div <?php echo $this->get_render_attribute_string( $tab_title_mobile_setting_key ); ?>><?php echo esc_html($item['tab_title']); ?></div> | |
| 569 | - <div <?php echo $this->get_render_attribute_string( $tab_content_setting_key ); ?>><?php | |
| 572 | + <div <?php | |
| 573 | + // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Elementor get_render_attribute_string uses Utils::render_html_attributes, which escapes attribute values; attribute names above are fixed literals. | |
| 574 | + echo $this->get_render_attribute_string( $tab_title_mobile_setting_key ); ?>><?php echo esc_html($item['tab_title']); ?></div> | |
| 575 | + <div <?php | |
| 576 | + // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Elementor get_render_attribute_string uses Utils::render_html_attributes, which escapes attribute values; attribute names above are fixed literals. | |
| 577 | + echo $this->get_render_attribute_string( $tab_content_setting_key ); ?>><?php | |
| 570 | 578 | foreach ( $item['tab_display'] as $display ) |
| 571 | 579 | { |
| 572 | 580 | switch ( $display ) |
| 573 | 581 | { |
| @@ -834,9 +842,10 @@ | ||
| 834 | 842 | { |
| 835 | 843 | $fb_sdk_printed = true; |
| 836 | 844 | echo '<div id="fb-root"></div>'; |
| 837 | 845 | // Use the standard SDK include; id prevents double-loading |
| 838 | - echo '<script async defer crossorigin="anonymous" id="facebook-jssdk" src="https://connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v20.0"></script>'; | |
| 846 | + // phpcs:ignore PluginCheck.CodeAnalysis.EnqueuedResourceOffloading.OffloadedContent, WordPress.WP.EnqueuedResourceParameters.MissingVersion -- Provider maintains this API endpoint without a plugin version. Required Facebook SDK for the property's configured Reel embed. | |
| 847 | + wp_enqueue_script( 'propertyhive-facebook-embed', 'https://connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v20.0', array(), null, true ); | |
| 839 | 848 | } |
| 840 | 849 | |
| 841 | 850 | // Output the Reel embed container; the SDK converts it into a player |
| 842 | 851 | echo '<div class="fb-video" data-href="' . esc_url( $virtual_tour['url'] ) . '" data-allowfullscreen="true" data-width="auto" style="max-width:100%;"></div>'; |
| @@ -871,8 +880,9 @@ | ||
| 871 | 880 | { |
| 872 | 881 | if ( ! empty( $item['tab_content'] ) ) |
| 873 | 882 | { |
| 874 | 883 | echo '<div class="tabbed-custom-content">'; |
| 884 | + // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Elementor parses this rich-text control, including authorized shortcodes and embeds. | |
| 875 | 885 | echo $this->parse_text_editor( $item['tab_content'] ); |
| 876 | 886 | echo '</div>'; |
| 877 | 887 | } |
| 878 | 888 | break; |
| @@ -916,5 +926,5 @@ | ||
| 916 | 926 | <?php |
| 917 | 927 | |
| 918 | 928 | } |
| 919 | 929 | |
| 920 | -} | |
| 930 | +} | |