Completed
Pull Request — master (#1454)
by Aristeides
04:57 queued 02:17
created

Kirki_Colourlovers::get_palettes()   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
 * 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', esc_attr__( 'kirki_get_option detected. Please use get_theme_mod() or get_option() instead.', 'kirki' ) );
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', esc_attr__( 'kirki_sanitize_hex detected. Please use the ariColor class instead. More info on http://aristath.github.io/ariColor/', 'kirki' ) );
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', esc_attr__( 'kirki_get_rgb detected. Please use the ariColor class instead. More info on http://aristath.github.io/ariColor/', 'kirki' ) );
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', esc_attr__( 'kirki_get_rgba detected. Please use the ariColor class instead. More info on http://aristath.github.io/ariColor/', 'kirki' ) );
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', esc_attr__( 'kirki_get_brightness detected. Please use the ariColor class instead. More info on http://aristath.github.io/ariColor/', 'kirki' ) );
60
		return Kirki_Color::get_brightness( $hex );
61
	}
62
}
63