| 1 |
<?php |
| 2 |
|
| 3 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
| 4 |
|
| 5 |
// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- WPBakery html_template local variable; this file is a framework-rendered view receiving $atts/$this, and PrefixAllGlobals sees it outside the framework render scope. |
| 6 |
$css = ''; |
| 7 |
|
| 8 |
extract(shortcode_atts(array( |
| 9 |
"css" => "", |
| 10 |
"font_container" => "", |
| 11 |
), $atts)); |
| 12 |
|
| 13 |
global $property; |
| 14 |
|
| 15 |
if ( !isset($property->id) ) { |
| 16 |
return; |
| 17 |
} |
| 18 |
|
| 19 |
if ( $property->address_postcode != '' ) |
| 20 |
{ |
| 21 |
// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound,WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- WPBakery/Visual Composer framework filter constant; the integration requires the framework hook name unchanged. WPBakery html_template local variable; this file is a framework-rendered view receiving $atts/$this, and PrefixAllGlobals sees it outside the framework render scope. |
| 22 |
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class( $css, ' ' ), $this->settings['base'], $atts ); |
| 23 |
|
| 24 |
// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- WPBakery html_template local variable; this file is a framework-rendered view receiving $atts/$this, and PrefixAllGlobals sees it outside the framework render scope. |
| 25 |
$style = ''; |
| 26 |
if ( ! empty( $atts['font_container'] ) && isset($atts['font_container']) ) |
| 27 |
{ |
| 28 |
// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- WPBakery html_template local variable; this file is a framework-rendered view receiving $atts/$this, and PrefixAllGlobals sees it outside the framework render scope. |
| 29 |
$style = ph_extract_font_style_from_salient_font_container( $font_container ); |
| 30 |
} |
| 31 |
|
| 32 |
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- The style fragment is built by ph_extract_font_style_from_salient_font_container() using safecss_filter_attr() and esc_attr(). |
| 33 |
echo '<div class="' . esc_attr( $css_class ) . '" ' . $style . '>'; |
| 34 |
|
| 35 |
echo esc_html($property->address_postcode); |
| 36 |
|
| 37 |
echo '</div>'; |
| 38 |
} |
| 39 |
|