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/salient-widgets/property-image-html.php +12 -0 2.2.42.3.1 View file →
@@ -13,11 +13,13 @@
13 13 if ( !isset($property->id) ) {
14 14 return;
15 15 }
16 16
17 +// 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.
17 18 $image_number = 1;
18 19 if ( isset($atts['image_number']) && $atts['image_number'] != '' && is_numeric($atts['image_number']) )
19 20 {
21 + // 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.
20 22 $image_number = (int)$atts['image_number'];
21 23 }
22 24
23 25 if ( $output_ratio != '' )
@@ -22,30 +24,38 @@
22 24
23 25 if ( $output_ratio != '' )
24 26 {
25 27 // output div with image as background
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.
26 29 $url = '';
27 30 if ( get_option('propertyhive_images_stored_as', '') == 'urls' )
28 31 {
32 + // 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 33 $photos = $property->_photo_urls;
30 34 if ( isset($photos[$image_number-1]) )
31 35 {
36 + // 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.
32 37 $url = $photos[$image_number-1]['url'];
33 38 }
34 39 }
35 40 else
36 41 {
42 + // 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.
37 43 $gallery_attachment_ids = $property->get_gallery_attachment_ids();
38 44
39 45 if ( isset($gallery_attachment_ids[$image_number-1]) )
40 46 {
47 + // 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.
41 48 $url = wp_get_attachment_image_src( $gallery_attachment_ids[$image_number-1], $atts['image_size'] );
49 + // 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.
42 50 $url = $url[0];
43 51 }
44 52 }
45 53
46 54 // convert ratio to percentage
55 + // 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.
47 56 $numbers = explode(':', $output_ratio);
57 + // 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.
48 58 $percent = ( ( (int)$numbers[1] / (int)$numbers[0] ) * 100 ) . '%';
49 59
50 60 echo '<div style="background:url(' . esc_url($url) . ') no-repeat center center; background-size:cover; padding-bottom:' . esc_attr($percent) . '">';
51 61 }
@@ -53,8 +63,9 @@
53 63 {
54 64 // output <img>
55 65 if ( get_option('propertyhive_images_stored_as', '') == 'urls' )
56 66 {
67 + // 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.
57 68 $photos = $property->_photo_urls;
58 69 if ( isset($photos[$image_number-1]) )
59 70 {
60 71 echo '<img src="' . esc_url($photos[$image_number-1]['url']) . '" alt="">';
@@ -61,8 +72,9 @@
61 72 }
62 73 }
63 74 else
64 75 {
76 + // 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.
65 77 $gallery_attachment_ids = $property->get_gallery_attachment_ids();
66 78
67 79 if ( isset($gallery_attachment_ids[$image_number-1]) )
68 80 {