PluginProbe
Property Hive / trunk
Property Hive vtrunk
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 1.4.63 All 259 releases
propertyhive / includes / class-ph-avada.php

class-ph-avada.php in Property Hive trunk, at includes/class-ph-avada.php

79 lines 2.0 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' ) ) {
4 exit; // Exit if accessed directly
5 }
6
7 class PH_Avada {
8
9 private $widgets = array(
10 'Property Actions',
11 'Property Address Name Number',
12 'Property Address Street',
13 'Property Address Line 2',
14 'Property Address Town City',
15 'Property Address County',
16 'Property Address Postcode',
17 'Property Address Full',
18 'Property Availability',
19 'Property Bathrooms',
20 'Property Bedrooms',
21 'Property Brochures Link',
22 'Property Council Tax Band',
23 'Property Deposit',
24 'Property Embedded Virtual Tours',
25 'Property Enquiry Form',
26 'Property Enquiry Form Link',
27 'Property EPCs',
28 'Property Features',
29 'Property Floorplans',
30 'Property Full Description',
31 'Property Image',
32 'Property Images',
33 'Property Let Available Date',
34 'Property Map',
35 'Property Meta',
36 'Property Price',
37 'Property Reception Rooms',
38 'Property Reference Number',
39 'Property Street View',
40 'Property Summary Description',
41 'Property Tenure',
42 'Property Type',
43 );
44
45 public function __construct()
46 {
47 add_action('fusion_builder_before_init', array( $this, 'register_widgets' ) );
48
49 $widgets = apply_filters( 'propertyhive_avada_widgets', $this->widgets );
50
51 foreach ( $widgets as $widget )
52 {
53 $widget_dir = 'avada-widgets';
54 $widget_dir = apply_filters( 'propertyhive_avada_widget_directory', dirname(__FILE__) . "/" . $widget_dir, $widget );
55 if ( file_exists( $widget_dir . "/" . sanitize_title($widget) . "-shortcode.php" ) )
56 {
57 require_once( $widget_dir . "/" . sanitize_title($widget) . "-shortcode.php" );
58 }
59 }
60 }
61
62 public function register_widgets()
63 {
64 $widgets = apply_filters( 'propertyhive_avada_widgets', $this->widgets );
65
66 foreach ( $widgets as $widget )
67 {
68 $widget_dir = 'avada-widgets';
69 $widget_dir = apply_filters( 'propertyhive_avada_widget_directory', dirname(__FILE__) . "/" . $widget_dir, $widget );
70 if ( file_exists( $widget_dir . "/" . sanitize_title($widget) . ".php" ) )
71 {
72 require_once( $widget_dir . "/" . sanitize_title($widget) . ".php" );
73 }
74 }
75
76 }
77 }
78
79 new PH_Avada();