balmet.com

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

csf-functions.php (1717B)


      1 <?php
      2 
      3 /**
      4  *
      5  * Get option
      6  *
      7  * @since 1.0.0
      8  * @version 1.0.0
      9  *
     10  */
     11 if ( ! function_exists( 'cs_get_option' ) ) {
     12 	function cs_get_option( $option = '', $default = null ) {
     13 		$options = get_option( 'appside_theme_options' ); // Attention: Set your unique id of the framework
     14 		return ( isset( $options[$option] ) ) ? $options[$option] : $default;
     15 	}
     16 }
     17 
     18 /**
     19  *
     20  * Get get switcher option
     21  *  for theme options
     22  * @since 1.0.0
     23  * @version 1.0.0
     24  *
     25  */
     26 
     27 if ( ! function_exists( 'cs_get_switcher_option' )) {
     28 
     29 	function cs_get_switcher_option( $option = '', $default = null ) {
     30 		$options = get_option( 'appside_theme_options' ); // Attention: Set your unique id of the framework
     31 		$return_val =  ( isset( $options[$option] ) ) ? $options[$option] : $default;
     32 		$return_val =  (is_null($return_val) || '1' == $return_val ) ? true : false;;
     33 		return $return_val;
     34 	}
     35 }
     36 if ( ! function_exists( 'cs_switcher_option' )) {
     37 
     38 	function cs_switcher_option( $option = '', $default = null ) {
     39 		$options = get_option( 'appside_theme_options' ); // Attention: Set your unique id of the framework
     40 		$return_val =  ( isset( $options[$option] ) ) ? $options[$option] : $default;
     41 		$return_val =  ( '1' == $return_val ) ? true : false;;
     42 		return $return_val;
     43 	}
     44 }
     45 
     46 /**
     47  *
     48  * Get customize option
     49  *
     50  * @since 1.0.0
     51  * @version 1.0.0
     52  *
     53  */
     54 
     55 if ( ! function_exists( 'cs_get_customize_option' ) && class_exists( 'CSF' )) {
     56 
     57 	function cs_get_customize_option( $option = '', $default = null ) {
     58 		$options = get_option( 'appside_customize_options' ); // Attention: Set your unique id of the framework
     59 		return ( isset( $options[$option] ) ) ? $options[$option] : $default;
     60 	}
     61 }