Total Complexity | 5 |
Total Lines | 62 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | class FacetWP { |
||
10 | |||
11 | /** |
||
12 | * Holds class instance |
||
13 | * |
||
14 | * @var object \lsx_health_plan\classes\FacetWP() |
||
15 | */ |
||
16 | protected static $instance = null; |
||
17 | |||
18 | /** |
||
19 | * Holds the indexer filters for the workouts. |
||
20 | * |
||
21 | * @var object \lsx_health_plan\classes\integrations\FacetWP\Workouts_Indexer() |
||
22 | */ |
||
23 | public $workouts = null; |
||
24 | |||
25 | /** |
||
26 | * Constructor |
||
27 | */ |
||
28 | public function __construct() { |
||
29 | $this->load_classes(); |
||
30 | add_filter( 'facetwp_facet_sources', array( $this, 'register_sources' ) ); |
||
31 | } |
||
32 | |||
33 | /** |
||
34 | * Return an instance of this class. |
||
35 | * |
||
36 | * @since 1.0.0 |
||
37 | * |
||
38 | * @return object \lsx_health_plan\classes\FacetWP() A single instance of this class. |
||
39 | */ |
||
40 | public static function get_instance() { |
||
41 | // If the single instance hasn't been set, set it now. |
||
42 | if ( null === self::$instance ) { |
||
43 | self::$instance = new self(); |
||
44 | } |
||
45 | return self::$instance; |
||
46 | } |
||
47 | |||
48 | /** |
||
49 | * Loads the variable classes and the static classes. |
||
50 | */ |
||
51 | private function load_classes() { |
||
54 | } |
||
55 | |||
56 | /** |
||
57 | * Registers the custom sources. |
||
58 | * |
||
59 | * @param array $sources |
||
60 | * @return array |
||
61 | */ |
||
62 | public function register_sources( $sources ) { |
||
71 | } |
||
72 | } |
||
73 |