Completed
Push — develop ( 483098...51eed3 )
by Paul
02:15
created

ArchiveMeta::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace GeminiLabs\Castor\Helpers;
4
5
use GeminiLabs\Castor\Helpers\SiteMeta;
6
7
/**
8
 * ArchiveMeta::all();
9
 * ArchiveMeta::group();
10
 * ArchiveMeta::group('option','fallback');
11
 * ArchiveMeta::get('group');
12
 * ArchiveMeta::get('group','option','fallback');
13
 *
14
 * @property object all
15
 */
16
class ArchiveMeta extends SiteMeta
17
{
18
	protected $options;
19
20
	public function __construct()
21
	{
22
		$this->options = get_option( apply_filters( 'pollux/archives/id', 'pollux_archives' ), [] );
23
	}
24
25
	/**
26
	 * @param string|null $key
27
	 * @param mixed $fallback
28
	 * @param string $group
29
	 * @return mixed
30
	 */
31
	public function get( $key = '', $fallback = null, $group = '' )
32
	{
33
		return parent::get( $group, $key, $fallback );
34
	}
35
36
	/**
37
	 * @return string
38
	 */
39
	protected function getDefaultGroup()
40
	{
41
		return get_post_type();
42
	}
43
}
44