getMod('sf_impact_header_style'); //Get the header height $sf_impact_header_height = (stristr($sf_impact_header_style, "fix") === FALSE) ? "" :$sf_impact_Theme_Mods->getMod( 'sf_impact_header_height' ); //Make sure that the height is set for fixed height options if (!$sf_impact_header_height && (stristr($sf_impact_header_style, "fix") >= 0)) { //If not, default to the default value $sf_impact_header_style = $sf_impact_Theme_Mods->getDefault('sf_impact_header_style'); } $class = stristr($sf_impact_header_style, 'stretch') === FALSE ? "sfly-img-fit " : "sfly-img-stretch "; $class .= stristr($sf_impact_header_style, 'fixed') === FALSE ? "sfly-img-auto " : "sfly-img-fixed "; return $class; } endif; if (!function_exists('sf_impact_get_home_header_height')): function sf_impact_get_home_header_height($max=false) { global $sf_impact_Theme_Mods; //Get the header style $sf_impact_header_style = $sf_impact_Theme_Mods->getMod('sf_impact_header_style'); //Get the header height $sf_impact_header_height = (stristr($sf_impact_header_style, "fix") === FALSE) ? "" :$sf_impact_Theme_Mods->getMod( 'sf_impact_header_height' ); $style = ""; if ($sf_impact_header_height) { if ($max) $h = "max-height"; else $h = "height"; $style .="$h:$sf_impact_header_height;"; } return $style; } endif; /* * Scripts if the header is a slideshow */ if (!function_exists('sf_impact_slideshow_scripts')): //wp_footer filter function sf_impact_slideshow_scripts() { global $sf_impact_Theme_Mods; $sf_impact_slider_transition = $sf_impact_Theme_Mods->getMod( 'sf_impact_slider_transition' ); $sf_impact_slider_animspeed = $sf_impact_Theme_Mods->getMod( 'sf_impact_slider_animspeed' ); $sf_impact_slider_speed = $sf_impact_Theme_Mods->getMod( 'sf_impact_slider_speed' ); $sf_impact_slider_automate = $sf_impact_Theme_Mods->getMod( 'sf_impact_slider_automate') == TRUE ? 'true' : 'false'; $sf_impact_slider_direction = $sf_impact_Theme_Mods->getMod( 'sf_impact_slider_direction' ); $sf_impact_slider_navigation = $sf_impact_Theme_Mods->getMod( 'sf_impact_slider_navigation') == TRUE ? "true" : "false"; $sf_impact_slider_navdirection = $sf_impact_Theme_Mods->getMod( 'sf_impact_slider_navdirection') == TRUE ? "true" : "false"; $sf_impact_slider_keyboard = $sf_impact_Theme_Mods->getMod( 'sf_impact_slider_keyboard') == TRUE ? "true" : "false"; $sf_impact_slider_mousewheel = $sf_impact_Theme_Mods->getMod( 'sf_impact_slider_mousewheel') == TRUE ? "true" : "false"; $sf_impact_slider_pauseonhover = $sf_impact_Theme_Mods->getMod( 'sf_impact_slider_pauseonhover') == TRUE ? "true" : "false"; ?> getMod('sf_impact_grid_type'); $gridwidth = "99%"; $posts = $sf_impact_Theme_Mods->getMod( 'sf_impact_grid_posts'); $height = $sf_impact_Theme_Mods->getMod( 'sf_impact_grid_image_height' ); $width= $sf_impact_Theme_Mods->getMod( 'sf_impact_grid_image_width'); $cellwidth = $sf_impact_Theme_Mods->getMod( 'sf_impact_grid_cell_width' ); $cellheight = $sf_impact_Theme_Mods->getMod( 'sf_impact_grid_cell_height'); $category = $sf_impact_Theme_Mods->getMod( 'sf_impact_post_category'); $imagesize = $sf_impact_Theme_Mods->getMod( 'sf_impact_image_size_name'); $captionwidth = $width; $arra = array('post_type' => $type, 'posts_per_page' => $posts, 'aligngrid' => 'autocenter', 'imagesize' => $imagesize, 'cellwidth' => $cellwidth, 'cellheight'=>$cellheight, 'captionwidth' => $captionwidth, 'ignore_sticky_posts' => 1); if ($height) $arra['height'] = $height; if ($width) $arra['width'] = $width; $arra = array('post_type' => $type, 'posts_per_page' => $posts, 'aligngrid' => 'autocenter', 'imagesize' => $imagesize, 'cellwidth' => $cellwidth, 'cellheight'=>$cellheight, 'captionwidth' => $captionwidth, 'ignore_sticky_posts' => 1); if ($height) $arra['height'] = $height; if ($width) $arra['width'] = $width; if ($category) $arra['cat'] = $category; if ($gridwidth) $arra['gridwidth'] = "99%"; $arra = apply_filters('sf_impact_get_thumbnail_args', $arra); return ($arra); } endif; /* * Get the URL of the post thumbnail */ //Get thumbnail url if (!function_exists('sf_impact_get_thumbnailurl')): function sf_impact_get_thumbnailurl() { global $sf_impact_Theme_Mods; $type = $sf_impact_Theme_Mods->getMod('sf_impact_grid_type'); $tax = get_object_taxonomies( $type, 'taxonomy' ); if (array_key_exists ('category' , $tax )) { $category = $sf_impact_Theme_Mods->getMod( 'sf_impact_post_category'); $page = $sf_impact_Theme_Mods->getMod('sf_impact_thumbnail_more_page'); if ($category) $url = get_category_link($category); else $url = get_permalink( $page ); } else $url = get_post_type_archive_link( $type ); $url = apply_filters('sf_impact_get_thumbnail_url', $url); return $url; } endif; /* * Display Featured Highlight Boxes */ if (!function_exists('sf_impact_get_highlightboxes')): function sf_impact_get_highlightboxes() { do_action('sf_impact_highlights'); } endif; if (!function_exists('sf_impact_highlightboxes_default')): function sf_impact_highlightboxes_default() { global $sf_impact_Theme_Mods; $sf_impact_highlight_boxes = $sf_impact_Theme_Mods->getMod( 'sf_impact_highlight_boxes'); $boxcount = intval( $sf_impact_highlight_boxes ); if ($boxcount > 0) { $sf_impact_highlight_style = $sf_impact_Theme_Mods->getMod( 'sf_impact_highlight_style' ); for ($x = 0; $x <= 3; ++$x) { ${'sf_impact_highlight_image' . $x} = $sf_impact_Theme_Mods->getMod( 'sf_impact_highlight_image' . $x); ${'sf_impact_highlight_header' . $x} = $sf_impact_Theme_Mods->getMod( 'sf_impact_highlight_header' . $x); ${'sf_impact_highlight_text' . $x} = $sf_impact_Theme_Mods->getMod( 'sf_impact_highlight_text' . $x ); ${'sf_impact_highlight_link' . $x} = $sf_impact_Theme_Mods->getMod( 'sf_impact_highlight_link' . $x ); } ?>