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 ( get_the_archive_title() && ( get_the_archive_title() <> 'Archives' ) ) : return get_the_archive_title(); endif; } } /*-----------------------------------------------------------------------------------*/ /* IS SINGLE */ /*-----------------------------------------------------------------------------------*/ if (!function_exists('alhenalite_is_single')) { function alhenalite_is_single() { if ( is_single() || is_page() ) : return true; endif; } } /*-----------------------------------------------------------------------------------*/ /* REQUIRE */ /*-----------------------------------------------------------------------------------*/ if (!function_exists('alhenalite_require')) { function alhenalite_require($folder) { if (isset($folder)) : $dir = get_template_directory() . $folder ; $files = scandir($dir); foreach ($files as $key => $value) { if ( !in_array($value,array(".DS_Store",".","..") ) && !strstr( $value, '._' ) ) { if ( !is_dir( $dir . $value) ) { require_once $dir . $value; } } } endif; } } /*-----------------------------------------------------------------------------------*/ /* SCRIPTS */ /*-----------------------------------------------------------------------------------*/ if (!function_exists('alhenalite_enqueue_script')) { function alhenalite_enqueue_script($folder) { if ( isset($folder) ) : $dir = get_template_directory() . $folder ; $files = scandir($dir); foreach ($files as $key => $value) { if ( !in_array($value,array(".DS_Store",".","..") ) && !strstr( $value, '._' ) ) { if ( !is_dir( $dir . $value ) && strstr ( $value, 'js' )) { wp_enqueue_script( str_replace('.js','',$value), get_template_directory_uri() . $folder . "/" . $value , array('jquery'), FALSE, TRUE ); } } } endif; } } /*-----------------------------------------------------------------------------------*/ /* STYLES */ /*-----------------------------------------------------------------------------------*/ if (!function_exists('alhenalite_enqueue_style')) { function alhenalite_enqueue_style($folder) { if (isset($folder)) : $dir = get_template_directory() . $folder ; $files = scandir($dir); foreach ($files as $key => $value) { if ( !in_array($value,array(".DS_Store",".","..") ) && !strstr( $value, '._' ) ) { if ( !is_dir( $dir . $value ) && strstr ( $value, 'css' )) { wp_enqueue_style( str_replace('.css','',$value), get_template_directory_uri() . $folder . "/" . $value ); } } } endif; } } /*-----------------------------------------------------------------------------------*/ /* TAG TITLE */ /*-----------------------------------------------------------------------------------*/ if ( ! function_exists( '_wp_render_title_tag' ) ) { function alhenalite_title( $title, $sep ) { global $paged, $page; if ( is_feed() ) return $title; $title .= get_bloginfo( 'name' ); $site_description = get_bloginfo( 'description', 'display' ); if ( $site_description && ( is_home() || is_front_page() ) ) $title = "$title $sep $site_description"; if ( $paged >= 2 || $page >= 2 ) $title = "$title $sep " . sprintf( __( 'Page %s', "alhena-lite" ), max( $paged, $page ) ); return $title; } add_filter( 'wp_title', 'alhenalite_title', 10, 2 ); function alhenalite_addtitle() { ?> <?php wp_title( '|', true, 'right' ); ?> "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 = ''.__( "Article","alhena-lite").''; } return $icon; } } /*-----------------------------------------------------------------------------------*/ /* Default menu */ /*-----------------------------------------------------------------------------------*/ if (!function_exists('alhenalite_add_menuclass')) { function alhenalite_add_menuclass( $ulclass ) { return preg_replace( '/