ru-se.com

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

deprecated.php (1853B)


      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) 2016, Aristeides Stathopoulos
     10  * @license     http://opensource.org/licenses/https://opensource.org/licenses/MIT
     11  * @since       1.0
     12  */
     13 
     14 // Exit if accessed directly.
     15 if ( ! defined( 'ABSPATH' ) ) {
     16 	exit;
     17 }
     18 
     19 if ( ! function_exists( 'kirki_get_option' ) ) {
     20 	/**
     21 	 * Get the value of a field.
     22 	 * This is a deprecated function that we in use when there was no API.
     23 	 * Please use the Kirki::get_option() method instead.
     24 	 * Documentation is available for the new method on https://github.com/aristath/kirki/wiki/Getting-the-values
     25 	 *
     26 	 * @return mixed
     27 	 */
     28 	function kirki_get_option( $option = '' ) {
     29 		return Kirki::get_option( '', $option );
     30 	}
     31 }
     32 
     33 if ( ! function_exists( 'kirki_sanitize_hex' ) ) {
     34 	function kirki_sanitize_hex( $color ) {
     35 		return Kirki_Color::sanitize_hex( $color );
     36 	}
     37 }
     38 
     39 if ( ! function_exists( 'kirki_get_rgb' ) ) {
     40 	function kirki_get_rgb( $hex, $implode = false ) {
     41 		return Kirki_Color::get_rgb( $hex, $implode );
     42 	}
     43 }
     44 
     45 if ( ! function_exists( 'kirki_get_rgba' ) ) {
     46 	function kirki_get_rgba( $hex = '#fff', $opacity = 100 ) {
     47 		return Kirki_Color::get_rgba( $hex, $opacity );
     48 	}
     49 }
     50 
     51 if ( ! function_exists( 'kirki_get_brightness' ) ) {
     52 	function kirki_get_brightness( $hex ) {
     53 		return Kirki_Color::get_brightness( $hex );
     54 	}
     55 }
     56 
     57 /**
     58  * Class was deprecated in 2.2.7
     59  *
     60  * @see https://github.com/aristath/kirki/commit/101805fd689fa8828920b789347f13efc378b4a7
     61  */
     62 if ( ! class_exists( 'Kirki_Colourlovers' ) ) {
     63 	/**
     64 	 * Deprecated.
     65 	 */
     66 	class Kirki_Colourlovers {
     67 		public static function get_palettes( $palettes_nr = 5 ) {
     68 			return array();
     69 		}
     70 	}
     71 }