← All changes
|
includes/avada-widgets/property-actions-shortcode.php
+7
-0
2.2.5
→
2.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_actions', function( $atts ) { |
| 4 | 9 | $atts = shortcode_atts( array( |
| 5 | 10 | |
| 6 | 11 | ), $atts ); |
| @@ -15,13 +20,15 @@ | ||
| 15 | 20 | global $property; |
| 16 | 21 | |
| 17 | 22 | if ( empty($property) ) |
| 18 | 23 | { |
| 24 | + // 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. | |
| 19 | 25 | $property = new PH_Property(get_the_ID()); |
| 20 | 26 | } |
| 21 | 27 | |
| 22 | 28 | ob_start(); |
| 23 | 29 | |
| 30 | + // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- FusionBuilder::attributes() returns the complete HTML attribute fragment and escapes each attribute name and value. | |
| 24 | 31 | echo '<div ' . FusionBuilder::attributes( 'property-actions-shortcode' ) . '>'; |
| 25 | 32 | propertyhive_template_single_actions(); |
| 26 | 33 | echo '</div>'; |
| 27 | 34 | |