})(window,document,'//static.hotjar.com/c/hotjar-','.js?sv='); </script> </head> <?php $class = $style = ''; if ($body_style == 'boxed' || axiom_get_custom_option('load_bg_image') == 'always') { $customizer = axiom_get_theme_option('show_theme_customizer') == 'yes'; if ($customizer && ($img = (int) axiom_get_value_gpc('bg_image', 0)) > 0) { $class = 'bg_image_' . $img; } else { if ($customizer && ($img = (int) axiom_get_value_gpc('bg_pattern', 0)) > 0) { $class = 'bg_pattern_' . $img; } else { if ($customizer && ($img = axiom_get_value_gpc('bg_color', '')) != '') { $style = 'background-color: ' . $img . ';'; } else { if (($img = axiom_get_custom_option('bg_custom_image')) != '') { $style = 'background: url(' . esc_url($img) . ') ' . str_replace('_', ' ', axiom_get_custom_option('bg_custom_image_position')) . ' no-repeat fixed;'; } else { if (($img = axiom_get_custom_option('bg_custom_pattern')) != '') { $style = 'background: url(' . esc_url($img) . ') 0 0 repeat fixed;'; } else { if (($img = axiom_get_custom_option('bg_image')) > 0) { $class = 'bg_image_' . $img; } else { if (($img = axiom_get_custom_option('bg_pattern')) > 0) { $class = 'bg_pattern_' . $img; } }
function axiom_get_custom_option($name, $defa = null, $post_id = 0, $post_type = 'post', $tax_id = 0, $tax_type = 'category') { if (isset($_GET[$name])) { $rez = $_GET[$name]; } else { global $AXIOM_GLOBALS; $hash_name = $name . '_' . $tax_id . '_' . $post_id; if (!empty($AXIOM_GLOBALS['theme_options_loaded']) && isset($AXIOM_GLOBALS['custom_options'][$hash_name])) { $rez = $AXIOM_GLOBALS['custom_options'][$hash_name]; } else { if ($tax_id > 0) { $rez = axiom_taxonomy_get_inherited_property($tax_type, $tax_id, $name); if ($rez == '') { $rez = axiom_get_theme_option($name, $defa); } } else { if ($post_id > 0) { $rez = axiom_get_theme_option($name, $defa); $custom_options = get_post_meta($post_id, 'post_custom_options', true); if (isset($custom_options[$name]) && !axiom_is_inherit_option($custom_options[$name])) { $rez = $custom_options[$name]; } else { $terms = array(); $tax = axiom_get_taxonomy_categories_by_post_type($post_type); $tax_obj = get_taxonomy($tax); $tax_query = !empty($tax_obj->query_var) ? $tax_obj->query_var : $tax; if ($tax == 'category' && is_category() || $tax == 'post_tag' && is_tag() || is_tax($tax)) { // Current page is taxonomy's archive (Categories and Tags need specific check) $terms = array(get_queried_object()); } else { $taxes = axiom_get_terms_by_post_id(array('post_id' => $post_id, 'taxonomy' => $tax)); if (!empty($taxes[$tax]->terms)) { $terms = $taxes[$tax]->terms; } } $tmp = ''; if (!empty($terms)) { for ($cc = 0; $cc < count($terms) && (empty($tmp) || axiom_is_inherit_option($tmp)); $cc++) { $tmp = axiom_taxonomy_get_inherited_property($terms[$cc]->taxonomy, $terms[$cc]->term_id, $name); } } if ($tmp != '') { $rez = $tmp; } } } else { $rez = axiom_get_theme_option($name, $defa); if (axiom_get_theme_option('show_theme_customizer') == 'yes' && axiom_get_theme_option('remember_visitors_settings') == 'yes' && function_exists('axiom_get_value_gpc')) { $tmp = axiom_get_value_gpc($name, $rez); if (!axiom_is_inherit_option($tmp)) { $rez = $tmp; } } if (isset($AXIOM_GLOBALS['template_options'][$name]) && !axiom_is_inherit_option($AXIOM_GLOBALS['template_options'][$name])) { $rez = is_array($AXIOM_GLOBALS['template_options'][$name]) ? $AXIOM_GLOBALS['template_options'][$name][0] : $AXIOM_GLOBALS['template_options'][$name]; } if (isset($AXIOM_GLOBALS['taxonomy_options'][$name]) && !axiom_is_inherit_option($AXIOM_GLOBALS['taxonomy_options'][$name])) { $rez = $AXIOM_GLOBALS['taxonomy_options'][$name]; } if (isset($AXIOM_GLOBALS['post_options'][$name]) && !axiom_is_inherit_option($AXIOM_GLOBALS['post_options'][$name])) { $rez = is_array($AXIOM_GLOBALS['post_options'][$name]) ? $AXIOM_GLOBALS['post_options'][$name][0] : $AXIOM_GLOBALS['post_options'][$name]; } } } $rez = apply_filters('axiom_filter_get_custom_option', $rez, $name); if (!empty($AXIOM_GLOBALS['theme_options_loaded'])) { $AXIOM_GLOBALS['custom_options'][$hash_name] = $rez; } } } return $rez; }
function axiom_core_prepare_globals() { if (!is_admin()) { // AJAX Queries settings global $AXIOM_GLOBALS; $AXIOM_GLOBALS['ajax_nonce'] = wp_create_nonce('ajax_nonce'); $AXIOM_GLOBALS['ajax_url'] = admin_url('admin-ajax.php'); // Logo text and slogan $AXIOM_GLOBALS['logo_text'] = apply_filters('axiom_filter_prepare_logo_text', axiom_get_custom_option('logo_text')); $slogan = axiom_get_custom_option('logo_slogan'); if (!$slogan) { $slogan = get_bloginfo('description'); } $AXIOM_GLOBALS['logo_slogan'] = $slogan; // Logo image and icons from skin $logo_side = axiom_get_logo_icon('logo_side'); $logo_fixed = axiom_get_logo_icon('logo_fixed'); $logo_footer = axiom_get_logo_icon('logo_footer'); $AXIOM_GLOBALS['logo_icon'] = axiom_get_logo_icon('logo_icon'); $AXIOM_GLOBALS['logo_dark'] = axiom_get_logo_icon('logo_dark'); $AXIOM_GLOBALS['logo_light'] = axiom_get_logo_icon('logo_light'); $AXIOM_GLOBALS['logo_side'] = $logo_side ? $logo_side : $AXIOM_GLOBALS['logo_dark']; $AXIOM_GLOBALS['logo_fixed'] = $logo_fixed ? $logo_fixed : $AXIOM_GLOBALS['logo_dark']; $AXIOM_GLOBALS['logo_footer'] = $logo_footer ? $logo_footer : $AXIOM_GLOBALS['logo_dark']; $shop_mode = ''; if (axiom_get_custom_option('show_mode_buttons') == 'yes') { $shop_mode = axiom_get_value_gpc('axiom_shop_mode'); } if (empty($shop_mode)) { $shop_mode = axiom_get_custom_option('shop_mode', ''); } if (empty($shop_mode) || !is_archive()) { $shop_mode = 'thumbs'; } $AXIOM_GLOBALS['shop_mode'] = $shop_mode; } }
?> </ul> </li> <?php } } if (axiom_get_custom_option('show_bookmarks') == 'yes') { // Load core messages axiom_enqueue_messages(); ?> <li class="menu_user_bookmarks"><a href="#" class="bookmarks_show icon-star-1" title="<?php _e('Show bookmarks', 'axiom'); ?> "></a> <?php $list = axiom_get_value_gpc('axiom_bookmarks', ''); if (!empty($list)) { $list = json_decode($list, true); } ?> <ul class="bookmarks_list"> <li><a href="#" class="bookmarks_add icon-star-empty" title="<?php _e('Add the current page into bookmarks', 'axiom'); ?> "><?php _e('Add bookmark', 'axiom'); ?> </a></li> <?php if (!empty($list)) { foreach ($list as $bm) {