PluginProbe
Property Hive / 2.2.6
Property Hive v2.2.6
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 / class-ph-third-party-contacts.php

class-ph-third-party-contacts.php in Property Hive 2.2.6, at includes/class-ph-third-party-contacts.php

64 lines 1.6 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 /**
8 * PropertyHive third party contacts
9 *
10 * The PropertyHive third party contacts class stores data regarding third party contacts.
11 *
12 * @class PH_Third_Party_Contacts
13 * @version 1.0.0
14 * @package PropertyHive/Classes
15 * @category Class
16 * @author PropertyHive
17 */
18 class PH_Third_Party_Contacts {
19
20 private $categories;
21
22 public function __construct() {
23 $this->categories = apply_filters( 'propertyhive_third_party_contact_categories', array(
24 '1' => __( 'Accountant', 'propertyhive' ),
25 '2' => __( 'Architect', 'propertyhive' ),
26 '3' => __( 'Board Contractor', 'propertyhive' ),
27 '4' => __( 'Builder', 'propertyhive' ),
28 '5' => __( 'Cleaner', 'propertyhive' ),
29 '6' => __( 'Decorator', 'propertyhive' ),
30 '7' => __( 'Electrician', 'propertyhive' ),
31 '8' => __( 'Gas Engineer', 'propertyhive' ),
32 '9' => __( 'Plumbers', 'propertyhive' ),
33 '10' => __( 'Removals', 'propertyhive' ),
34 '11' => __( 'Roofer', 'propertyhive' ),
35 '12' => __( 'Solicitor', 'propertyhive' ),
36 '13' => __( 'Surveyor', 'propertyhive' ),
37 '14' => __( 'Other', 'propertyhive' ),
38 ) );
39 }
40
41 /**
42 * Auto-load in-accessible properties on demand.
43 * @param mixed $key
44 * @return mixed
45 */
46 public function __get( $key ) {
47 if ( 'categories' == $key ) {
48 return $this->get_categories();
49 }
50 }
51
52 public function get_categories() {
53 return $this->categories;
54 }
55
56 public function get_category( $category_id ) {
57 if ( isset( $this->categories[$category_id] ) )
58 {
59 return $this->categories[$category_id];
60 }
61 return false;
62 }
63
64 }