Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
7 | public function get( $metaKey, array $args = [] ) |
||
8 | { |
||
9 | if( empty( $metaKey ))return; |
||
10 | |||
11 | $args = $this->normalize( $args ); |
||
12 | $metaKey = $this->buildMetaKey( $metaKey, $args['prefix'] ); |
||
13 | $metaValue = get_post_meta( $args['ID'], $metaKey, $args['single'] ); |
||
14 | |||
15 | return empty( $metaValue ) |
||
16 | ? $args['fallback'] |
||
17 | : $metaValue; |
||
18 | } |
||
19 | |||
38 |