PluginProbe
Property Hive / 2.2.3
Property Hive v2.2.3
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 1.4.62 All 260 releases
propertyhive / includes / divi-widgets / property-office-name.php

property-office-name.php in Property Hive 2.2.3, at includes/divi-widgets/property-office-name.php

38 lines 822 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if (!defined('ABSPATH')) {
3 exit;
4 }
5
6 class Divi_Property_Office_Name_Widget extends ET_Builder_Module
7 {
8 public $slug = 'et_pb_property_office_name_widget';
9 public $vb_support = 'partial';
10 public $icon = '';
11
12 public function init() {
13 $this->name = esc_html__( 'Property Office Name', 'propertyhive' );
14 $this->icon = '&';
15 }
16
17 public function get_fields()
18 {
19 $fields = array();
20
21 return $fields;
22 }
23
24 public function render( $attrs, $content, $render_slug )
25 {
26 $post_id = get_the_ID();
27
28 $property = new PH_Property($post_id);
29
30 if ( !isset($property->id) ) {
31 return;
32 }
33
34 $return = esc_html($property->office_name);
35
36 return $this->_render_module_wrapper( $return, $render_slug );
37 }
38 }