ID; if( alhenalite_is_woocommerce_active('is_shop') ) { $content_ID = get_option('woocommerce_shop_page_id'); } $val = get_post_meta( $content_ID , $id, TRUE); if(isset($val)) { return $val; } else { return ''; } } } /*-----------------------------------------------------------------------------------*/ /* Woocommerce is active */ /*-----------------------------------------------------------------------------------*/ if ( ! function_exists( 'alhenalite_is_woocommerce_active' ) ) { function alhenalite_is_woocommerce_active( $type = "" ) { global $woocommerce; if ( isset( $woocommerce ) ) { if ( !$type || call_user_func($type) ) { return true; } } } } /*-----------------------------------------------------------------------------------*/ /* GET ARCHIVE TITLE */ /*-----------------------------------------------------------------------------------*/ if (!function_exists('alhenalite_get_archive_title')) { function alhenalite_get_archive_title() { if ( is_category() ) { $title = sprintf( esc_html__( 'Category: %s', 'alhena-lite' ), single_cat_title( '', false ) ); } elseif ( is_tag() ) { $title = sprintf( esc_html__( 'Tag: %s', 'alhena-lite' ), single_tag_title( '', false ) ); } elseif ( is_author() ) { $title = sprintf( esc_html__( 'Author: %s', 'alhena-lite' ), '' . get_the_author() . '' ); } elseif ( is_year() ) { $title = sprintf( esc_html__( 'Year: %s', 'alhena-lite' ), get_the_date( esc_html_x( 'Y', 'yearly archives date format', 'alhena-lite' ) ) ); } elseif ( is_month() ) { $title = sprintf( esc_html__( 'Month: %s', 'alhena-lite' ), get_the_date( esc_html_x( 'F Y', 'monthly archives date format', 'alhena-lite' ) ) ); } elseif ( is_day() ) { $title = sprintf( esc_html__( 'Day: %s', 'alhena-lite' ), get_the_date( esc_html_x( 'F j, Y', 'daily archives date format', 'alhena-lite' ) ) ); } elseif ( is_tax( 'post_format' ) ) { if ( is_tax( 'post_format', 'post-format-aside' ) ) { $title = esc_html_x( 'Asides', 'post format archive title', 'alhena-lite' ); } elseif ( is_tax( 'post_format', 'post-format-gallery' ) ) { $title = esc_html_x( 'Galleries', 'post format archive title', 'alhena-lite' ); } elseif ( is_tax( 'post_format', 'post-format-image' ) ) { $title = esc_html_x( 'Images', 'post format archive title', 'alhena-lite' ); } elseif ( is_tax( 'post_format', 'post-format-video' ) ) { $title = esc_html_x( 'Videos', 'post format archive title', 'alhena-lite' ); } elseif ( is_tax( 'post_format', 'post-format-quote' ) ) { $title = esc_html_x( 'Quotes', 'post format archive title', 'alhena-lite' ); } elseif ( is_tax( 'post_format', 'post-format-link' ) ) { $title = esc_html_x( 'Links', 'post format archive title', 'alhena-lite' ); } elseif ( is_tax( 'post_format', 'post-format-status' ) ) { $title = esc_html_x( 'Statuses', 'post format archive title', 'alhena-lite' ); } elseif ( is_tax( 'post_format', 'post-format-audio' ) ) { $title = esc_html_x( 'Audio', 'post format archive title', 'alhena-lite' ); } elseif ( is_tax( 'post_format', 'post-format-chat' ) ) { $title = esc_html_x( 'Chats', 'post format archive title', 'alhena-lite' ); } } elseif ( is_post_type_archive() ) { $title = sprintf( esc_html__( 'Archives: %s', 'alhena-lite' ), post_type_archive_title( '', false ) ); } elseif ( is_tax() ) { $tax = get_taxonomy( get_queried_object()->taxonomy ); $title = sprintf( esc_html__( '%1$s: %2$s', 'alhena-lite' ), $tax->labels->singular_name, single_term_title( '', false ) ); } if ( isset($title) ) : return $title; else: return false; endif; } } /*-----------------------------------------------------------------------------------*/ /* IS SINGLE */ /*-----------------------------------------------------------------------------------*/ if (!function_exists('alhenalite_is_single')) { function alhenalite_is_single() { if ( is_single() || is_page() ) : return true; endif; } } /*-----------------------------------------------------------------------------------*/ /* POST ICON */ /*-----------------------------------------------------------------------------------*/ if (!function_exists('alhenalite_posticon')) { function alhenalite_posticon() { $icons = array ( "video" => "fa fa-film" , "gallery" => "fa fa-camera" , "audio" => "fa fa-music" , "chat" => "fa fa-users", "status" => "fa fa-keyboard-o", "image" => "fa fa-file-image-o", "quote" => "fa fa-quote-left", "link" => "fa fa-external-link", "aside" => "fa fa-file-text-o", ); if (get_post_format()) { $icon = ''.ucfirst(strtolower(get_post_format())).''; } else { $icon = ''.esc_html__( "Article","alhena-lite").''; } return $icon; } } /*-----------------------------------------------------------------------------------*/ /* Default menu */ /*-----------------------------------------------------------------------------------*/ if (!function_exists('alhenalite_add_menuclass')) { function alhenalite_add_menuclass( $ulclass ) { return preg_replace( '/