wordpress/wp-content/themes/basic/themify/themify-utils.php
/**
 * Returns a value referenced by $var checking in theme settings or post meta data.
 * @param $var
 * @return mixed
 */
Returns a value referenced by $var checking in theme settings or post meta data.
@param $var
@return mixed
Returns a value referenced by $var checking in theme settings or post meta data . @param $var @return mixed
function themify_get( $var, $default = null, $data_only = false ) {
	$data = themify_get_data();
	if ( isset( $data[ $var ] ) && $data[ $var ] !== '' ) {
		return $data[ $var ];
	} 
	elseif ( $data_only !== true ) {
		global $post;
		if ( themify_is_shop() && ! in_the_loop() ) {
			$id = themify_shop_pageId();
		} 
		elseif ( is_object( $post ) ) {
			$id = $post->ID;
		}
		else{
			$id = false;
		}
		$val = $id !== false ? get_post_meta( $id, $var, true ) : '';
		if ( $val !== '' ) {
			return $val;
		}
	}
	return $default;
}
function themify_get ( $ var , $ default = null , $ data_only = false ) { $ data = themify_get_data ( ) ; if ( isset ( $ data [ $ var ] ) && $ data [ $ var ] !== '' ) { return $ data [ $ var ] ; } elseif ( $ data_only !== true ) { global $ post ; if ( themify_is_shop ( ) && ! in_the_loop ( ) ) { $ id = themify_shop_pageId ( ) ; } elseif ( is_object ( $ post ) ) { $ id = $ post -> ID ; } else { $ id = false ; } $ val = $ id !== false ? get_post_meta ( $ id , $ var , true ) : '' ; if ( $ val !== '' ) { return $ val ; } } return $ default ; }
Returns a value referenced by $var checking in theme settings or post meta data.
Returns a value referenced by $var checking in theme settings or post meta data .