Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 3 |
|
0.00% |
0 / 3 |
CRAP | |
0.00% |
0 / 1 |
| Brand | |
0.00% |
0 / 3 |
|
0.00% |
0 / 3 |
12 | |
0.00% |
0 / 1 |
| base | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| sub | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| region | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace NewfoldLabs\WP\Context; |
| 4 | |
| 5 | /** |
| 6 | * This class adds brand helpers to the context with dot notation access. |
| 7 | **/ |
| 8 | class Brand { |
| 9 | |
| 10 | /** |
| 11 | * Helper to get the base brand name |
| 12 | */ |
| 13 | public function base() { |
| 14 | return getContext( 'brand.name' ); |
| 15 | } |
| 16 | |
| 17 | /** |
| 18 | * Helper to get the sub brand name |
| 19 | */ |
| 20 | public function sub() { |
| 21 | return getContext( 'brand.sub' ); |
| 22 | } |
| 23 | |
| 24 | /** |
| 25 | * Helper to get the brand region |
| 26 | */ |
| 27 | public function region() { |
| 28 | return getContext( 'brand.region' ); |
| 29 | } |
| 30 | } |