<div id="main" class="container"> <div id="content"> <div class="browsing"> <?php $type = mb_get_page_type(); switch ($type) { case 'category': $titlebar_description = __('Browsing Category', 'lcz_megamag'); $titlebar_name = single_cat_title('', false); break; case 'tag': $titlebar_description = __('Browsing Tag', 'lcz_megamag'); $titlebar_name = single_tag_title('', false); break; case 'search': $titlebar_description = __('Search Results For', 'lcz_megamag'); $titlebar_name = get_search_query(); break; case 'author': $titlebar_description = __('Browsing Author', 'lcz_megamag'); $titlebar_name = get_the_author_meta('display_name', $wp_query->post->post_author); break; default: $titlebar_description = __('Browsing', 'lcz_megamag'); $titlebar_name = __('Unknown', 'lcz_megamag'); break; } ?>
?> }); }); }); </script> <!-- DYNAMIC CSS (Style changes from theme options) --> <?php require "css/dynamic.css.php"; ?> <!-- Custom category background images --> <?php if (is_single() || mb_get_page_type() == 'category') { $header_cat = get_the_category(); $cat_ID = $header_cat[0]->cat_ID; if (!empty($megamag_options_appearance['bg_url_cat_' . $cat_ID])) { ?> <style type="text/css"> body { background:<?php echo $megamag_options_appearance['color_body_bg']; ?> url(<?php echo $megamag_options_appearance['bg_url_cat_' . $cat_ID]; ?> ) fixed; } </style> <?php }
function canon_load_to_front() { // get options $canon_options = get_option('canon_options'); $canon_options_frame = get_option('canon_options_frame'); $canon_options_post = get_option('canon_options_post'); $canon_options_appearance = get_option('canon_options_appearance'); $canon_options_advanced = get_option('canon_options_advanced'); // browser detection $user_agent_string = $_SERVER['HTTP_USER_AGENT']; $msie8 = strpos($user_agent_string, 'MSIE 8.') !== false ? true : false; // dev mode options if ($canon_options['dev_mode'] == "checked") { if (isset($_GET['use_boxed_design'])) { $canon_options['use_boxed_design'] = wp_filter_nohtml_kses($_GET['use_boxed_design']); } if (isset($_GET['anim_menus'])) { $canon_options_appearance['anim_menus'] = wp_filter_nohtml_kses($_GET['anim_menus']); } } //wp scripts wp_enqueue_script('jquery', false, array(), false, true); wp_enqueue_script('jquery-ui', false, array(), false, false); wp_enqueue_script('jquery-ui-autocomplete', false, array(), false, true); //external scripts if (is_page()) { wp_enqueue_script('isotope', get_template_directory_uri() . '/js/jquery.isotope.js', array(), false, true); } wp_enqueue_script('flexslider', get_template_directory_uri() . '/js/jquery.flexslider-min.js', array(), false, true); wp_enqueue_script('fitvids', get_template_directory_uri() . '/js/jquery.fitvids.js', array(), false, true); wp_enqueue_script('placeholder', get_template_directory_uri() . '/js/placeholder.js', array(), false, true); wp_enqueue_script('mosaic', get_template_directory_uri() . '/js/mosaic.1.0.1.min.js', array(), false, true); wp_enqueue_script('fancybox_mousewheel', get_template_directory_uri() . '/js/fancybox/lib/jquery.mousewheel-3.0.6.pack.js', array('jquery'), false, true); wp_enqueue_script('fancybox_core', get_template_directory_uri() . '/js/fancybox/source/jquery.fancybox.pack.js', array('jquery'), false, true); wp_enqueue_script('fancybox_buttons', get_template_directory_uri() . '/js/fancybox/source/helpers/jquery.fancybox-buttons.js', array('fancybox_core'), false, true); wp_enqueue_script('fancybox_media', get_template_directory_uri() . '/js/fancybox/source/helpers/jquery.fancybox-media.js', array('fancybox_core'), false, true); wp_enqueue_script('fancybox_thumbs', get_template_directory_uri() . '/js/fancybox/source/helpers/jquery.fancybox-thumbs.js', array('fancybox_core'), false, true); wp_enqueue_script('canon-sidr', get_template_directory_uri() . '/js/jquery.sidr.js', array(), false, true); wp_enqueue_script('canon_cleantabs', get_template_directory_uri() . '/js/cleantabs.jquery.js', array(), false, true); wp_enqueue_script('scrollup', get_template_directory_uri() . '/js/jquery.scrollUp.min.js', array(), false, true); wp_enqueue_script('selectivizr', get_template_directory_uri() . '/js/selectivizr-min.js', array(), false, true); wp_enqueue_script('fittext', get_template_directory_uri() . '/js/fittext.js', array(), false, true); wp_enqueue_script('canon_countdown', get_template_directory_uri() . '/js/jquery.countdown.js', array(), false, true); wp_enqueue_script('owl_carousel', get_template_directory_uri() . '/js/owl-carousel/owl.carousel.min.js', array(), false, true); wp_enqueue_script('canon-mediaelementplayer', get_template_directory_uri() . '/js/media/mediaelement-and-player.min.js', array(), false, true); if ($msie8 === false) { wp_enqueue_script('stellar', get_template_directory_uri() . '/js/jquery.stellar.min.js', array(), false, true); } if ($msie8 === false) { wp_enqueue_script('canon_scrollreveal', get_template_directory_uri() . '/js/scrollReveal.js', array(), false, true); } //canon scripts wp_enqueue_script('canon_global_functions', get_template_directory_uri() . '/js/global_functions.js', array(), false, true); wp_enqueue_script('canon-custom-scripts', get_template_directory_uri() . '/js/custom-scripts.js', array(), false, true); wp_enqueue_script('canon_scripts', get_template_directory_uri() . '/js/scripts.js', array('jquery', 'flexslider'), false, true); //support for threaded comments if (is_singular() && get_option('thread_comments')) { wp_enqueue_script('comment-reply'); } //styles (css) wp_enqueue_style('normalize', get_template_directory_uri() . '/css/normalize.min.css'); wp_enqueue_style('style', get_stylesheet_uri()); wp_enqueue_style('canon-sidr-style', get_template_directory_uri() . '/css/jquery.sidr.light.css'); wp_enqueue_style('isotope_style', get_template_directory_uri() . '/css/isotope.css'); wp_enqueue_style('flexslider_style', get_template_directory_uri() . '/css/flexslider.css'); wp_enqueue_style('font_awesome_style', get_template_directory_uri() . '/css/font-awesome.css'); wp_enqueue_style('countdown_style', get_template_directory_uri() . '/css/jquery.countdown.css'); wp_enqueue_style('owl_carousel_style', get_template_directory_uri() . '/js/owl-carousel/owl.carousel.css'); wp_enqueue_style('owl_carousel_theme_style', get_template_directory_uri() . '/js/owl-carousel/owl.theme.css'); wp_enqueue_style('canon-mediaelementplayer-style', get_template_directory_uri() . '/js/media/mediaelementplayer.min.css'); if (class_exists('Woocommerce')) { wp_enqueue_style('woo_shop_style', get_template_directory_uri() . '/css/woo-shop.css'); } // enqueue theme woocommerce style if (function_exists('bp_is_active')) { wp_enqueue_style('budypress_style', get_template_directory_uri() . '/css/budypress-style.css'); } if (class_exists('bbPress')) { wp_enqueue_style('bbpress_style', get_template_directory_uri() . '/css/bbpress-style.css'); } if (isset($canon_options['use_responsive_design'])) { if ($canon_options['use_responsive_design'] == "checked") { wp_enqueue_style('responsive_style', get_template_directory_uri() . '/css/responsive.css'); } } if (isset($canon_options['use_boxed_design'])) { if ($canon_options['use_boxed_design'] == "checked") { wp_enqueue_style('boxed_style', get_template_directory_uri() . '/css/boxed.css'); } else { wp_enqueue_style('fullwidth_style', get_template_directory_uri() . '/css/full.css'); } } wp_enqueue_style('fancybox_style', get_template_directory_uri() . '/js/fancybox/source/jquery.fancybox.css'); wp_enqueue_style('fancybox_buttons_style', get_template_directory_uri() . '/js/fancybox/source/helpers/jquery.fancybox-buttons.css'); // wp_enqueue_style('fancybox_thumbs_style', get_template_directory_uri(). '/js/fancybox/source/helpers/jquery.fancybox-thumbs.css'); // dynamic_css printout add_action('wp_print_scripts', 'canon_dynamic_css'); //localize sripts wp_localize_script('canon_scripts', 'extData', array('ajaxUrl' => admin_url('admin-ajax.php'), 'pageType' => mb_get_page_type(), 'templateURI' => get_template_directory_uri(), 'canonOptions' => $canon_options, 'canonOptionsFrame' => $canon_options_frame, 'canonOptionsPost' => $canon_options_post, 'canonOptionsAppearance' => $canon_options_appearance, 'canonOptionsAdvanced' => $canon_options_advanced)); }
if (isset($canon_options_appearance['font_nav'][0])) { if ($canon_options_appearance['font_nav'][0] != "canon_default") { echo mb_get_google_webfonts_link($canon_options_appearance['font_nav']); } } ?> <?php if (isset($canon_options_appearance['font_widget_footer'][0])) { if ($canon_options_appearance['font_widget_footer'][0] != "canon_default") { echo mb_get_google_webfonts_link($canon_options_appearance['font_widget_footer']); } } ?> <!-- OPEN GRAPH --> <?php if ($canon_options['hide_theme_og'] != "checked" && $post) { printf('<meta property="og:type" content="article" />'); printf('<meta property="og:url" content="http://%s"/>', $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]); printf('<meta property="og:site_name" content="%s" />', esc_attr(get_bloginfo('name'))); $og_title = mb_get_page_type() == 'single' ? $post->post_title : get_bloginfo('name'); printf('<meta property="og:title" content="%s" />', esc_attr($og_title)); $og_description = !empty($post->post_content) ? mb_make_excerpt($post->post_content, 350, true) : get_bloginfo('description'); printf('<meta property="og:description" content="%s" />', esc_attr($og_description)); if (empty($canon_options_frame['logo_url'])) { $canon_options_frame['logo_url'] = get_template_directory_uri() . "/img/logo@2x.png"; } $og_img_src = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full') ? wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full') : array($canon_options_frame['logo_url']); printf('<meta property="og:image" content="%s" />', esc_url($og_img_src[0])); }