Completed
Push — development ( 557e78...5d0b39 )
by
unknown
02:50
created

functions.php ➔ carbon_hex_to_rgba()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
use Carbon_Fields\Helper\Helper;
4
use Carbon_Fields\Helper\Color;
5
6
if ( ! function_exists( 'carbon_field_exists' ) ) {
7
	function carbon_field_exists( $name, $container_type, $container_id = '' ) {
8
		return Helper::get_field( $container_type, $container_id, $name ) !== null;
9
	}
10
}
11
12
if ( ! function_exists( 'carbon_get' ) ) {
13
	function carbon_get( $object_id, $name, $container_type, $container_id = '' ) {
14
		return Helper::get_value( $object_id, $container_type, $container_id, $name );
15
	}
16
}
17
18
if ( ! function_exists( 'carbon_set' ) ) {
19
	function carbon_set( $object_id, $name, $value, $container_type, $container_id = '' ) {
20
		return Helper::set_value( $object_id, $container_type, $container_id, $name, $value );
21
	}
22
}
23
24
if ( ! function_exists( 'carbon_get_the_post_meta' ) ) {
25
	function carbon_get_the_post_meta( $name, $container_id = '' ) {
26
		return Helper::get_the_post_meta( $name, $container_id );
27
	}
28
}
29
30
if ( ! function_exists( 'carbon_get_post_meta' ) ) {
31
	function carbon_get_post_meta( $id, $name, $container_id = '' ) {
32
		return Helper::get_post_meta( $id, $name, $container_id );
33
	}
34
}
35
36
if ( ! function_exists( 'carbon_set_post_meta' ) ) {
37
	function carbon_set_post_meta( $id, $name, $value, $container_id = '' ) {
38
		return Helper::set_post_meta( $id, $name, $value, $container_id );
39
	}
40
}
41
42
if ( ! function_exists( 'carbon_get_theme_option' ) ) {
43
	function carbon_get_theme_option( $name, $container_id = '' ) {
44
		return Helper::get_theme_option( $name, $container_id );
45
	}
46
}
47
48
if ( ! function_exists( 'carbon_set_theme_option' ) ) {
49
	function carbon_set_theme_option( $name, $value, $container_id = '' ) {
50
		return Helper::set_theme_option( $name, $value, $container_id );
51
	}
52
}
53
54
if ( ! function_exists( 'carbon_get_term_meta' ) ) {
55
	function carbon_get_term_meta( $id, $name, $container_id = '' ) {
56
		return Helper::get_term_meta( $id, $name, $container_id );
57
	}
58
}
59
60
if ( ! function_exists( 'carbon_set_term_meta' ) ) {
61
	function carbon_set_term_meta( $id, $name, $value, $container_id = '' ) {
62
		return Helper::set_term_meta( $id, $name, $value, $container_id );
63
	}
64
}
65
66
if ( ! function_exists( 'carbon_get_user_meta' ) ) {
67
	function carbon_get_user_meta( $id, $name, $container_id = '' ) {
68
		return Helper::get_user_meta( $id, $name, $container_id );
69
	}
70
}
71
72
if ( ! function_exists( 'carbon_set_user_meta' ) ) {
73
	function carbon_set_user_meta( $id, $name, $value, $container_id = '' ) {
74
		return Helper::set_user_meta( $id, $name, $value, $container_id );
75
	}
76
}
77
78
if ( ! function_exists( 'carbon_get_comment_meta' ) ) {
79
	function carbon_get_comment_meta( $id, $name, $container_id = '' ) {
80
		return Helper::get_comment_meta( $id, $name, $container_id );
81
	}
82
}
83
84
if ( ! function_exists( 'carbon_set_comment_meta' ) ) {
85
	function carbon_set_comment_meta( $id, $name, $value, $container_id = '' ) {
86
		return Helper::set_comment_meta( $id, $name, $value, $container_id );
87
	}
88
}
89
90
if ( ! function_exists( 'carbon_get_nav_menu_item_meta' ) ) {
91
	function carbon_get_nav_menu_item_meta( $id, $name, $container_id = '' ) {
92
		return Helper::get_nav_menu_item_meta( $id, $name, $container_id );
93
	}
94
}
95
96
if ( ! function_exists( 'carbon_set_nav_menu_item_meta' ) ) {
97
	function carbon_set_nav_menu_item_meta( $id, $name, $value, $container_id = '' ) {
98
		return Helper::set_nav_menu_item_meta( $id, $name, $value, $container_id );
99
	}
100
}
101
102
if ( ! function_exists( 'carbon_hex_to_rgba' ) ) {
103
	function carbon_hex_to_rgba( $hex ) {
104
		return Color::hex_to_rgba( $hex );
105
	}
106
}
107