Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
2 / 2
CRAP
n/a
0 / 0
NewfoldLabs\WP\Context\getContext
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
NewfoldLabs\WP\Context\setContext
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3namespace NewfoldLabs\WP\Context;
4
5use NewfoldLabs\WP\Context\Context;
6
7/**
8 * Helper Get Context Method
9 *
10 * @param String $name - the name of the context to get
11 * @param String $default - the default value if not defined
12 * @return Array $context - value of the named context
13 */
14function getContext( $name, $default = null ) {
15    return Context::get( $name, $default );
16}
17
18/**
19 * Helper Set Context Method
20 *
21 * @param String $name - the name of the context to set
22 * @param String $value - the value to set
23 */
24function setContext( $name, $value ) {
25    Context::set( $name, $value );
26}