1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
use Carbon_Fields\Helper\Helper; |
4
|
|
|
|
5
|
|
|
if ( ! function_exists( 'carbon_field_exists' ) ) { |
6
|
|
|
function carbon_field_exists( $name, $container_type, $container_id = '' ) { |
7
|
|
|
return Helper::get_field( $container_type, $container_id, $name ) !== null; |
8
|
|
|
} |
9
|
|
|
} |
10
|
|
|
|
11
|
|
|
if ( ! function_exists( 'carbon_get_the_post_meta' ) ) { |
12
|
|
|
function carbon_get_the_post_meta( $name, $container_id = '' ) { |
13
|
|
|
return Helper::get_the_post_meta( $name, $container_id ); |
14
|
|
|
} |
15
|
|
|
} |
16
|
|
|
|
17
|
|
|
if ( ! function_exists( 'carbon_get_post_meta' ) ) { |
18
|
|
|
function carbon_get_post_meta( $id, $name, $container_id = '' ) { |
19
|
|
|
return Helper::get_post_meta( $id, $name, $container_id ); |
20
|
|
|
} |
21
|
|
|
} |
22
|
|
|
|
23
|
|
|
if ( ! function_exists( 'carbon_set_post_meta' ) ) { |
24
|
|
|
function carbon_set_post_meta( $id, $name, $value, $container_id = '' ) { |
25
|
|
|
return Helper::set_post_meta( $id, $name, $value, $container_id ); |
26
|
|
|
} |
27
|
|
|
} |
28
|
|
|
|
29
|
|
|
if ( ! function_exists( 'carbon_get_theme_option' ) ) { |
30
|
|
|
function carbon_get_theme_option( $name, $container_id = '' ) { |
31
|
|
|
return Helper::get_theme_option( $name, $container_id ); |
32
|
|
|
} |
33
|
|
|
} |
34
|
|
|
|
35
|
|
|
if ( ! function_exists( 'carbon_set_theme_option' ) ) { |
36
|
|
|
function carbon_set_theme_option( $name, $value, $container_id = '' ) { |
37
|
|
|
return Helper::set_theme_option( $name, $value, $container_id ); |
38
|
|
|
} |
39
|
|
|
} |
40
|
|
|
|
41
|
|
|
if ( ! function_exists( 'carbon_get_term_meta' ) ) { |
42
|
|
|
function carbon_get_term_meta( $id, $name, $container_id = '' ) { |
43
|
|
|
return Helper::get_term_meta( $id, $name, $container_id ); |
44
|
|
|
} |
45
|
|
|
} |
46
|
|
|
|
47
|
|
|
if ( ! function_exists( 'carbon_set_term_meta' ) ) { |
48
|
|
|
function carbon_set_term_meta( $id, $name, $value, $container_id = '' ) { |
49
|
|
|
return Helper::set_term_meta( $id, $name, $value, $container_id ); |
50
|
|
|
} |
51
|
|
|
} |
52
|
|
|
|
53
|
|
|
if ( ! function_exists( 'carbon_get_user_meta' ) ) { |
54
|
|
|
function carbon_get_user_meta( $id, $name, $container_id = '' ) { |
55
|
|
|
return Helper::get_user_meta( $id, $name, $container_id ); |
56
|
|
|
} |
57
|
|
|
} |
58
|
|
|
|
59
|
|
|
if ( ! function_exists( 'carbon_set_user_meta' ) ) { |
60
|
|
|
function carbon_set_user_meta( $id, $name, $value, $container_id = '' ) { |
61
|
|
|
return Helper::set_user_meta( $id, $name, $value, $container_id ); |
62
|
|
|
} |
63
|
|
|
} |
64
|
|
|
|
65
|
|
|
if ( ! function_exists( 'carbon_get_comment_meta' ) ) { |
66
|
|
|
function carbon_get_comment_meta( $id, $name, $container_id = '' ) { |
67
|
|
|
return Helper::get_comment_meta( $id, $name, $container_id ); |
68
|
|
|
} |
69
|
|
|
} |
70
|
|
|
|
71
|
|
|
if ( ! function_exists( 'carbon_set_comment_meta' ) ) { |
72
|
|
|
function carbon_set_comment_meta( $id, $name, $value, $container_id = '' ) { |
73
|
|
|
return Helper::set_comment_meta( $id, $name, $value, $container_id ); |
74
|
|
|
} |
75
|
|
|
} |
76
|
|
|
|
77
|
|
|
if ( ! function_exists( 'carbon_get_nav_menu_item_meta' ) ) { |
78
|
|
|
function carbon_get_nav_menu_item_meta( $id, $name, $container_id = '' ) { |
79
|
|
|
return Helper::get_nav_menu_item_meta( $id, $name, $container_id ); |
80
|
|
|
} |
81
|
|
|
} |
82
|
|
|
|
83
|
|
|
if ( ! function_exists( 'carbon_set_nav_menu_item_meta' ) ) { |
84
|
|
|
function carbon_set_nav_menu_item_meta( $id, $name, $value, $container_id = '' ) { |
85
|
|
|
return Helper::set_nav_menu_item_meta( $id, $name, $value, $container_id ); |
86
|
|
|
} |
87
|
|
|
} |
88
|
|
|
|