PluginProbe
Property Hive / 2.3.1
Property Hive v2.3.1
2.3.1 2.3.0 2.2.6 2.2.5 2.2.4 2.2.3 2.2.2 1.4.46 1.4.47 1.4.48 1.4.49 1.4.5 1.4.50 1.4.51 1.4.52 1.4.53 1.4.54 1.4.55 1.4.56 1.4.57 1.4.58 1.4.59 1.4.6 1.4.60 1.4.61 All 261 releases
← All changes | includes/avada-widgets/property-address-postcode-shortcode.php +8 -1 2.2.42.3.1 View file →
@@ -1,6 +1,11 @@
1 1 <?php
2 2
3 +if ( ! defined( 'ABSPATH' ) ) {
4 + exit;
5 +}
6 +
7 +
3 8 add_shortcode( 'avada_property_address_postcode', function( $atts ) {
4 9 $atts = shortcode_atts( array(
5 10 'content_align' => 'left',
6 11 'fusion_font_family_address_postcode_font' => '',
@@ -22,8 +27,9 @@
22 27 global $property;
23 28
24 29 if ( empty($property) )
25 30 {
31 + // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- Shared frontend property global used by the Avada shortcode contract; changing $property would break the existing property context passed to these widgets.
26 32 $property = new PH_Property(get_the_ID());
27 33 }
28 34
29 35 if ( $property->address_postcode == '' )
@@ -50,10 +56,11 @@
50 56 }
51 57
52 58 ob_start();
53 59
60 + // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- FusionBuilder::attributes() returns the complete HTML attribute fragment and escapes each attribute name and value.
54 61 echo '<div ' . FusionBuilder::attributes( 'property-address-postcode-shortcode' ) . '>
55 - <div style="' . $style . '">';
62 + <div style="' . esc_attr( safecss_filter_attr( $style ) ) . '">';
56 63
57 64 echo esc_html($property->address_postcode);
58 65
59 66 echo '