PluginProbe
Property Hive / 2.2.4
Property Hive v2.2.4
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
propertyhive / includes / salient-widgets / property-actions-html.php

property-actions-html.php in Property Hive 2.2.4, at includes/salient-widgets/property-actions-html.php

42 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
5 $css = '';
6
7 extract(shortcode_atts(array(
8 "display" => "",
9 "button_background_color" => "#000",
10 "button_text_color" => "#FFF",
11 "css" => "",
12 "font_container" => "",
13 ), $atts));
14
15 global $property;
16
17 if ( !isset($property->id) ) {
18 return;
19 }
20
21 $css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class( $css, ' ' ), $this->settings['base'], $atts );
22
23 $style = '';
24 if ( ! empty( $atts['font_container'] ) && isset($atts['font_container']) )
25 {
26 $style = ph_extract_font_style_from_salient_font_container( $font_container );
27 }
28
29 echo '<div class="' . esc_attr( $css_class ) . '" ' . $style . '>';
30
31 if ( isset($atts['display']) && $atts['display'] == 'buttons' )
32 {
33 echo '<style type="text/css">';
34 echo '.property_actions ul { list-style-type:none; margin:0; padding:0; }';
35 echo '.property_actions ul li { display:inline-block; margin-right:5px; }';
36 echo '.property_actions ul li a { display:block; padding:7px 17px; text-decoration:none; background:' . esc_attr($atts['button_background_color']) . '; color:' . esc_attr($atts['button_text_color']) . ' }';
37 echo '</style>';
38 }
39
40 propertyhive_template_single_actions();
41
42 echo '</div>';