} } $app_modules[] = array( 'name' => 'theme_header', 'params' => array( 'id' => 'mk-header', 'height' => $mk_options['header_height'], 'stickyHeight' => $mk_options['header_scroll_height'], 'stickyOffset' => $sticky_header_offset, 'hasToolbar' => $toolbar_toggle ) ); $mk_shortcode_order = 0; } add_action('wp_head', 'mk_app_modules_header', 1); } /** * output header meta tags */ if (!function_exists('mk_head_meta_tags')) { function mk_head_meta_tags() { echo "\n"; echo ' ' . "\n"; echo ' ' . "\n"; echo ' ' . "\n"; echo ' ' . "\n"; echo ' ' . "\n"; } add_action('wp_head', 'mk_head_meta_tags', 1); } /** * output Facebook Open Graph meta */ if (!function_exists('mk_open_graph_meta')) { function mk_open_graph_meta() { if (!is_single()) return false; global $post; $post_type = get_post_meta($post->ID, '_single_post_type', true); $post_thumb_id = get_post_thumbnail_id(); if($post_type == 'portfolio' && empty($post_thumb_id)) { $slideshow_posts = get_post_meta($post->ID, '_gallery_images', true); $slideshow_posts = explode(',', $slideshow_posts); $image_src_array = wp_get_attachment_image_src($slideshow_posts[0], 'full'); } else { $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id() , 'full'); } $output = ' ' . "\n"; if(!Mk_Image_Resize::is_default_thumb($image_src_array[0]) && !empty($image_src_array[0])) { $output.= ' ' . "\n"; } $output.= ' ' . "\n"; $output.= ' ' . "\n"; $output.= ' ' . "\n"; $output.= ' ' . "\n"; echo $output; } add_action('wp_head', 'mk_open_graph_meta'); } /** * outputs custom fav icons and apple touch icons into head tag */ if (!function_exists('mk_apple_touch_icons')) { function mk_apple_touch_icons() { global $mk_options; echo "\n"; if ($mk_options['custom_favicon']): echo ' ' . "\n"; else: echo ' ' . "\n"; endif; if ($mk_options['iphone_icon']): echo ' ' . "\n"; endif; if ($mk_options['iphone_icon_retina']): echo ' ' . "\n"; endif; if ($mk_options['ipad_icon']): echo ' ' . "\n"; endif; if ($mk_options['ipad_icon_retina']): echo ' ' . "\n"; endif; } add_action('wp_head', 'mk_apple_touch_icons', 2); } /** * outputs custom fav icons and apple touch icons into head tag */ if (!function_exists('mk_dynamic_js_vars')) { function mk_dynamic_js_vars() { global $mk_options; $post_id = global_get_post_id(); $wp_p_id = $post_id ? $post_id : ''; echo ' ' . "\n"; } add_action('wp_head', 'mk_dynamic_js_vars', 3); } /** * Adds preloaders overlay div when its option is enabled * @return HTML * */ if (!function_exists('mk_preloader_body_overlay')) { function mk_preloader_body_overlay() { global $mk_options; $preloader_check = ''; $post_id = global_get_post_id(); $singular_preloader = ($post_id) ? get_post_meta($post_id, 'page_preloader', true) : ''; if ($singular_preloader == 'true') { $preloader_check = 'enabled'; } else { if ($mk_options['preloader'] == 'true') { $preloader_check = 'enabled'; } } if ($preloader_check == 'enabled') { echo '
'; $loaderStyle = isset($mk_options['preloader_animation']) ? $mk_options['preloader_animation'] : 'ball_pulse'; if (!empty($mk_options['preloader_logo'])) { echo ''; } echo '
'; if($loaderStyle == "ball_pulse"){ echo '
'; }else if($loaderStyle == "ball_clip_rotate_pulse") { echo '
'; }else if($loaderStyle == "square_spin") { echo '
'; }else if($loaderStyle == "cube_transition") { echo '
'; }else if($loaderStyle == "ball_scale") { echo '
'; }else if($loaderStyle == "line_scale") { echo '
'; }else if($loaderStyle == "ball_scale_multiple") { echo '
'; }else if($loaderStyle == "ball_pulse_sync") { echo '
'; }else if($loaderStyle == "transparent_circle") { echo '
'; }else if($loaderStyle == "ball_spin_fade_loader") { echo '
'; } echo "
"; echo "
"; } } add_action('theme_after_body_tag_start', 'mk_preloader_body_overlay'); } /** * Populates classes to be added to body tag * @return HTML * */ if (!function_exists('mk_get_body_class')) { function mk_get_body_class($post_id) { global $mk_options; $body_class = array(); $header_style = !empty($mk_options['theme_header_style']) ? $mk_options['theme_header_style'] : 1; if ($post_id) { $enable = get_post_meta($post_id, '_enable_local_backgrounds', true); if ($enable == 'true') { $header_style_meta = get_post_meta($post_id, 'theme_header_style', true); $header_style = (isset($header_style_meta) && !empty($header_style_meta)) ? $header_style_meta : $header_style; } } if (($mk_options['background_selector_orientation'] == 'boxed_layout') && !($post_id && get_post_meta($post_id, '_enable_local_backgrounds', true) == 'true' && get_post_meta($post_id, 'background_selector_orientation', true) == 'full_width_layout')) { $body_class[] = 'mk-boxed-enabled'; } else if ($post_id && get_post_meta($post_id, '_enable_local_backgrounds', true) == 'true' && get_post_meta($post_id, 'background_selector_orientation', true) == 'boxed_layout') { $body_class[] = 'mk-boxed-enabled'; } if ($header_style == 4) { $vertical_header_logo_align = (isset($mk_options['vertical_header_logo_align']) && !empty($mk_options['vertical_header_logo_align'])) ? $mk_options['vertical_header_logo_align'] : 'center'; $header_align = !empty($mk_options['theme_header_align']) ? $mk_options['theme_header_align'] : 'left'; if ($post_id) { $enable = get_post_meta($post_id, '_enable_local_backgrounds', true); if ($enable == 'true') { $header_align_meta = get_post_meta($post_id, 'theme_header_align', true); $header_align = (isset($header_align_meta) && !empty($header_align_meta)) ? $header_align_meta : $header_align; } } $body_class[] = 'vertical-header-enabled vertical-header-' . $header_align . ' logo-align-' . $vertical_header_logo_align; } $body_class[] = 'loading'; return $body_class; } } /* Checks if header is transparent */ if (!function_exists('is_header_transparent')) { function is_header_transparent($output = false) { $post_id = global_get_post_id(); if ($post_id) { $enable = get_post_meta($post_id, '_enable_local_backgrounds', true); if ($enable == 'true') { $meta = get_post_meta($post_id, '_transparent_header', true); $check = (isset($meta) && !empty($meta)) ? $meta : 'false'; if($check == 'true') { if(empty($output)) { return true; } else { return $output; } } } } return false; } } /* Checks header style */ if (!function_exists('get_header_style')) { function get_header_style() { global $mk_options; $style = !empty($mk_options['theme_header_style']) ? $mk_options['theme_header_style'] : 1; $post_id = global_get_post_id(); if ($post_id) { $enable = get_post_meta($post_id, '_enable_local_backgrounds', true); if ($enable == 'true') { $meta = get_post_meta($post_id, 'theme_header_style', true); $style = (isset($meta) && !empty($meta)) ? $meta : $style; } } return $style; } } /* Check if header is enabled in meta options. */ if (!function_exists('is_header_show')) { function is_header_show($is_shortcode = false) { if($is_shortcode) return true; $post_id = global_get_post_id(); $show_header = ''; if ($post_id) { $show_header = get_post_meta($post_id, '_template', true); } else { // If is not singlular return false; return true; } if (!in_array($show_header, array('no-header', 'no-header-title', 'no-header-title-footer', 'no-header-footer'))) { return true; } } } /* Check if header and page title is enabled in meta options. */ if (!function_exists('is_header_and_title_show')) { function is_header_and_title_show($is_shortcode = false) { if($is_shortcode) return true; $post_id = global_get_post_id(); $show_header = ''; if ($post_id) { $show_header = get_post_meta($post_id, '_template', true); } else { // If is not singlular return false; return true; } if (!in_array($show_header, array('no-header-title', 'no-header-title-footer'))) { return true; } } } /* Check if header and page title is enabled in meta options. */ if (!function_exists('is_page_title_show')) { function is_page_title_show($is_shortcode = false) { if($is_shortcode) return true; $post_id = global_get_post_id(); $show_header = ''; if ($post_id) { $show_header = get_post_meta($post_id, '_template', true); } else { // If is not singlular return false; return true; } if (!in_array($show_header, array('no-title', 'no-footer-title', 'no-header-title', 'no-header-title-footer'))) { return true; } } } /* Check if header toolbar is enabled in theme options or meta options. */ if (!function_exists('is_header_toolbar_show')) { function is_header_toolbar_show($is_shortcode = false) { if($is_shortcode) return false; global $mk_options; $post_id = global_get_post_id(); $toolbar = !empty($mk_options['theme_toolbar_toggle']) ? $mk_options['theme_toolbar_toggle'] : 'false'; if ($post_id) { $in_post = get_post_meta($post_id, '_enable_local_backgrounds', true); if ($in_post == 'true') { $meta = get_post_meta($post_id, 'theme_toolbar_toggle', true); $toolbar = (isset($meta) && !empty($meta)) ? $meta : $toolbar; } } return $toolbar; } } /* Check if header is enabled in meta options. */ if (!function_exists('get_header_json_data')) { function get_header_json_data($is_shortcode = false, $header_style) { $skin = ''; global $mk_options; $sticky_style = !empty($mk_options['header_sticky_style']) ? $mk_options['header_sticky_style'] : 'false'; $sticky_style = $is_shortcode ? 'none' : $sticky_style; $sticky_offset = isset($mk_options['sticky_header_offset']) ? $mk_options['sticky_header_offset'] : $mk_options['header_height']; $header_style = (isset($header_style) && !empty($header_style) ) ? $header_style : get_header_style(); $post_id = global_get_post_id(); if ($post_id) { $enable = get_post_meta($post_id, '_enable_local_backgrounds', true); if ($enable == 'true') { $skin = get_post_meta($post_id, '_transparent_header_skin', true); $skin = (isset($skin) && !empty($skin)) ? $skin : 'light'; $meta_sticky_offset = get_post_meta($post_id, '_sticky_header_offset', true); $sticky_offset = (!empty($meta_sticky_offset)) ? $meta_sticky_offset : $sticky_offset; } } $data = array( 'height' => $mk_options['header_height'], 'sticky-height' => $mk_options['header_scroll_height'], 'responsive-height' => $mk_options['res_header_height'], 'transparent-skin' => $skin, 'header-style' => $header_style, 'sticky-style' => $sticky_style, 'sticky-offset' => $sticky_offset ); // TODO : Bart should remove below code and use data-settings data attribute. // Bart note: this is good practice to keep things clean but rewriting it now doesn't bring any other improvement so leave it for later return "data-height='".$mk_options['header_height']."' data-sticky-height='".$mk_options['header_scroll_height']."' data-responsive-height='".$mk_options['res_header_height']."' data-transparent-skin='".$skin."' data-header-style='".$header_style."' data-sticky-style='".$sticky_style."' data-sticky-offset='".$sticky_offset."'"; } } /* Get Header class */ if (!function_exists('mk_get_header_class')) { function mk_get_header_class($atts = array()) { extract($atts); global $mk_options; $header_layout = ($mk_options['header_grid'] == 'true') ? 'boxed-header' : 'full-header'; $header_align = !empty($mk_options['theme_header_align']) ? $mk_options['theme_header_align'] : 'left'; $toolbar_toggle = !empty($mk_options['theme_toolbar_toggle']) ? $mk_options['theme_toolbar_toggle'] : 'true'; $sticky_style = !empty($mk_options['header_sticky_style']) ? $mk_options['header_sticky_style'] : 'false'; $sticky_style_class = ($sticky_style == 'lazy') ? 'sticky-style-fixed' : 'sticky-style-' . $sticky_style; $responsive_burger_align = !empty($mk_options['responsive_burger_align']) ? ('mobile-align-' . $mk_options['responsive_burger_align']) : 'mobile-align-right'; $sticky_style_class = $is_shortcode ? false : $sticky_style_class; $post_id = global_get_post_id(); if ($post_id) { $enable = get_post_meta($post_id, '_enable_local_backgrounds', true); if ($enable == 'true') { $header_align_meta = get_post_meta($post_id, 'theme_header_align', true); $header_align = (isset($header_align_meta) && !empty($header_align_meta)) ? $header_align_meta : $header_align; $toolbar_toggle_meta = get_post_meta($post_id, 'theme_toolbar_toggle', true); $toolbar_toggle = (isset($toolbar_toggle_meta) && !empty($toolbar_toggle_meta)) ? $toolbar_toggle_meta : $toolbar_toggle; $skin_meta = get_post_meta($post_id, '_transparent_header_skin', true); $skin = (isset($skin_meta) && !empty($skin_meta)) ? $skin_meta : 'light'; $remove_bg_meta = get_post_meta($post_id, '_trans_header_remove_bg', true); $remove_bg = (isset($remove_bg_meta) && !empty($remove_bg_meta)) ? $remove_bg_meta : 'true'; } } $header_align = (isset($sh_header_align) && !empty($sh_header_align)) ? $sh_header_align : $header_align; $header_style = (isset($sh_header_style) && !empty($sh_header_style)) ? $sh_header_style : get_header_style(); $toolbar_toggle = ($header_style == 'false') ? 'false' : $toolbar_toggle; $hover_styles = isset($sh_hover_styles) ? $sh_hover_styles : $mk_options['main_nav_hover']; $is_transparent = (isset($sh_is_transparent)) ? ($sh_is_transparent == 'false' ? false : is_header_transparent()) : is_header_transparent(); $id = !empty($sh_id) ? 'id="mk-header-'.$sh_id.'" ' : ''; $logo_in_middle = ($header_style == 1) ? ($mk_options['logo_in_middle'] == 'true' ? 'js-logo-middle logo-in-middle' : '') : ''; $class[] = 'mk-header'; $class[] = 'header-style-'.$header_style; $class[] = 'header-align-'.$header_align; $class[] = $logo_in_middle; $class[] = 'toolbar-'.$toolbar_toggle; $class[] = 'menu-hover-'.$hover_styles; $class[] = $sticky_style_class; $class[] = mk_get_bg_cover_class($mk_options['banner_size']); $class[] = $header_layout; $class[] = $responsive_burger_align; $class[] = isset($el_class) ? $el_class : ''; if ($is_transparent) { $class[] = 'transparent-header'; $class[] = $skin.'-skin'; $class[] = 'bg-'.$remove_bg; } return $id . 'class="'.implode(' ', $class).'"'; } } /* Adds debugging information to front-end */ if (!function_exists('mk_theme_debugging_info')) { function mk_theme_debugging_info() { $theme_data = wp_get_theme(); echo ' ' . "\n"; } add_action('wp_head', 'mk_theme_debugging_info', 999); } Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /customers/d/4/7/snapshot-factory.de/httpd.www/wp-content/themes/jupiter/framework/helpers/wp_head.php:610) in /customers/d/4/7/snapshot-factory.de/httpd.www/wp-content/plugins/premium-seo-pack/aa-framework/framework.class.php on line 333 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /customers/d/4/7/snapshot-factory.de/httpd.www/wp-content/themes/jupiter/framework/helpers/wp_head.php:610) in /customers/d/4/7/snapshot-factory.de/httpd.www/wp-content/plugins/premium-seo-pack/aa-framework/framework.class.php on line 333 er using non-safe fonts can affect page load and performance.", "mk_framework") ) , array( "type" => "hidden_input", "param_name" => "font_type", "value" => "", "description" => __("", "mk_framework") ) , array( "type" => "toggle", "heading" => __("Custom Font Size?", "mk_framework") , "param_name" => "font_size_combat", "value" => 'false', "description" => __("If you need to set a different size enable this option and set it from below option.", "mk_framework") ) , array( "type" => "range", "heading" => __("Text Size", "mk_framework") , "param_name" => "text_size", "value" => "12", "min" => "12", "max" => "50", "step" => "1", "unit" => 'px', "description" => __("You can set blockquote text size from the below option.", "mk_framework"), "dependency" => array( 'element' => "font_size_combat", 'value' => array( 'true', ) ) ) , $add_css_animations, array( "type" => "textfield", "heading" => __("Extra class name", "mk_framework") , "param_name" => "el_class", "value" => "", "description" => __("If you wish to style particular content element differently, then use this field to add a class name and then refer to it in Custom CSS Shortcode or Masterkey Custom CSS option.", "mk_framework") ) ) ) );"desc" => __("You can use solid color in tab slider background.", "mk_framework") , "id" => "_bg_color", "default" => "", "type" => "color" ) , array( "name" => __("Image Align", "mk_framework") , "desc" => __("Location of tab image.", "mk_framework") , "id" => "_image_align", "default" => 'left', "options" => array( "left" => __("Left", 'mk_framework') , "right" => __('Right', 'mk_framework') ) , "type" => "select" ) , array( "name" => __("Short Description", "mk_framework") , "subtitle" => __('', "mk_framework") , "id" => "_desc", "default" => '', "type" => "textarea" ) , array( "name" => __("Button Text", "mk_framework") , "desc" => __("This text will be used as tab button text.", "mk_framework") , "id" => "_button_text", "default" => "", "type" => "text" ) , array( "name" => __("Button Url", "mk_framework") , "desc" => __("Please enter full URL of this url(include http://).", "mk_framework") , "id" => "_button_url", "default" => "", "type" => "text" ) , array( "name" => __("Enable Share Button?", "mk_framework") , "desc" => __("If you enable this option you can add share button.", "mk_framework") , "id" => "_share_button", "default" => "false", "type" => "toggle" ) , ); new mkMetaboxesGenerator($config, $options); Warning: Cannot modify header information - headers already sent by (output started at /customers/d/4/7/snapshot-factory.de/httpd.www/wp-content/themes/jupiter/framework/helpers/wp_head.php:610) in /customers/d/4/7/snapshot-factory.de/httpd.www/wp-includes/pluggable.php on line 1167