Completed
Push — develop ( 1c5b19...bb291e )
by Aristeides
04:17 queued 01:50
created

deprecated.php ➔ Kirki()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * This file contains all the deprecated functions.
4
 * We could easily delete all these but they are kept for backwards-compatibility purposes.
5
 *
6
 * @package     Kirki
7
 * @category    Core
8
 * @author      Aristeides Stathopoulos
9
 * @copyright   Copyright (c) 2017, Aristeides Stathopoulos
10
 * @license     http://opensource.org/licenses/https://opensource.org/licenses/MIT
11
 * @since       1.0
12
 */
13
14
// @codingStandardsIgnoreFile
15
16
// Exit if accessed directly.
17
if ( ! defined( 'ABSPATH' ) ) {
18
	exit;
19
}
20
21
if ( ! function_exists( 'kirki_get_option' ) ) {
22
	/**
23
	 * Get the value of a field.
24
	 * This is a deprecated function that we used when there was no API.
25
	 * Please use the Kirki::get_option() method instead.
26
	 * Documentation is available for the new method on https://github.com/aristath/kirki/wiki/Getting-the-values
27
	 *
28
	 * @return mixed
29
	 */
30
	function kirki_get_option( $option = '' ) {
31
		_deprecated_function( __FUNCTION__, '1.0.0', sprintf( esc_attr__( '%1$s or %2$s', 'kirki' ), 'get_theme_mod', 'get_option' ) );
32
		return Kirki::get_option( '', $option );
33
	}
34
}
35
36
if ( ! function_exists( 'kirki_sanitize_hex' ) ) {
37
	function kirki_sanitize_hex( $color ) {
38
		_deprecated_function( __FUNCTION__, '1.0.0', 'ariColor::newColor( $color )->toCSS( \'hex\' )' );
39
		return Kirki_Color::sanitize_hex( $color );
40
	}
41
}
42
43
if ( ! function_exists( 'kirki_get_rgb' ) ) {
44
	function kirki_get_rgb( $hex, $implode = false ) {
45
		_deprecated_function( __FUNCTION__, '1.0.0', 'ariColor::newColor( $color )->toCSS( \'rgb\' )' );
46
		return Kirki_Color::get_rgb( $hex, $implode );
47
	}
48
}
49
50
if ( ! function_exists( 'kirki_get_rgba' ) ) {
51
	function kirki_get_rgba( $hex = '#fff', $opacity = 100 ) {
52
		_deprecated_function( __FUNCTION__, '1.0.0', 'ariColor::newColor( $color )->toCSS( \'rgba\' )' );
53
		return Kirki_Color::get_rgba( $hex, $opacity );
54
	}
55
}
56
57
if ( ! function_exists( 'kirki_get_brightness' ) ) {
58
	function kirki_get_brightness( $hex ) {
59
		_deprecated_function( __FUNCTION__, '1.0.0', 'ariColor::newColor( $color )->lightness' );
60
		return Kirki_Color::get_brightness( $hex );
61
	}
62
}
63
64
if ( ! function_exists( 'Kirki' ) ) {
65
	function Kirki() {
66
		return kirki();
67
	}
68
}
69