# propertyhive/2.3.1/includes/class-ph-third-party-contacts.php

Property Hive, version 2.3.1. 65 lines.

- Page: https://pluginprobe.com/plugins/propertyhive/2.3.1/code/includes/class-ph-third-party-contacts.php
- Raw: https://pluginprobe.com/plugins/propertyhive/2.3.1/raw/includes/class-ph-third-party-contacts.php
- Modified: 2026-09-16T09:29:48+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/propertyhive/2.3.1/code/includes/class-ph-third-party-contacts.php#L10-L20`.

```php
<?php

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}

/**
 * PropertyHive third party contacts
 *
 * The PropertyHive third party contacts class stores data regarding third party contacts.
 *
 * @class       PH_Third_Party_Contacts
 * @version     1.0.0
 * @package     PropertyHive/Classes
 * @category    Class
 * @author      PropertyHive
 */
// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound -- Legacy public global class PH_Third_Party_Contacts; preserving the existing PH_* class name is required for plugin and extension compatibility.
class PH_Third_Party_Contacts {

	private $categories;

	public function __construct() {
		$this->categories = apply_filters( 'propertyhive_third_party_contact_categories', array(
			'1' => __( 'Accountant', 'propertyhive' ),
			'2' => __( 'Architect', 'propertyhive' ),
			'3' => __( 'Board Contractor', 'propertyhive' ),
			'4' => __( 'Builder', 'propertyhive' ),
			'5' => __( 'Cleaner', 'propertyhive' ),
			'6' => __( 'Decorator', 'propertyhive' ),
			'7' => __( 'Electrician', 'propertyhive' ),
			'8' => __( 'Gas Engineer', 'propertyhive' ),
			'9' => __( 'Plumbers', 'propertyhive' ),
			'10' => __( 'Removals', 'propertyhive' ),
			'11' => __( 'Roofer', 'propertyhive' ),
			'12' => __( 'Solicitor', 'propertyhive' ),
			'13' => __( 'Surveyor', 'propertyhive' ),
			'14' => __( 'Other', 'propertyhive' ),
		) );
	}

	/**
	 * Auto-load in-accessible properties on demand.
	 * @param  mixed $key
	 * @return mixed
	 */
	public function __get( $key ) {
		if ( 'categories' == $key ) {
			return $this->get_categories();
		}
	}

	public function get_categories() {
		return $this->categories;
	}

	public function get_category( $category_id ) {
		if ( isset( $this->categories[$category_id] ) )
		{
			return $this->categories[$category_id];
		}
		return false;
	}

}
```
