/** * Applies the CSS classes of a slider. * Pass the main slider class to the function. * Will also implement the color class. * * @param string $class - main slider class */ function the_slider_class($class, $echo = true) { global $fa_slider; // add fa-slider class to all sliders $classes = array('fa-slideshow'); if ($class) { $classes[] = esc_attr($class); } $settings = fa_get_options('settings'); if ($settings['preload_sliders']) { $classes[] = 'slider-loading'; } $color = the_slider_color(false); if ($color && -1 != $color) { $classes[] = esc_attr($color); } // add the layout variation class if available $options = fa_get_slider_options($fa_slider->ID, 'layout'); if (isset($options['class']) && !empty($options['class'])) { $classes[] = esc_attr($options['class']); } // add a no-title class if slider is set not to display the title $title_options = fa_get_slider_options($fa_slider->ID, 'content_title'); if (!$title_options['show']) { $classes[] = 'no-title'; } // add a no-content class if slider is set not to display the text $content_options = fa_get_slider_options($fa_slider->ID, 'content_text'); if (!$content_options['show']) { $classes[] = 'no-content'; } // add a no-secondary-nav if slider is set not to display secondary navigation if (!has_sideways_nav()) { $classes[] = 'no-secondary-navs'; } // add a no-primary-nav if slider is set not to display primary navigation if (!has_bottom_nav()) { $classes[] = 'no-primary-nav'; } $output = implode(' ', $classes); if ($echo) { echo $output; } return $output; }
<?php /** * @package Featured articles Lite - Wordpress plugin * @author CodeFlavors ( codeflavors[at]codeflavors.com ) * @version 2.4 * * For more information on FeaturedArticles template functions, see: http://www.codeflavors.com/documentation/display-slider-file/ */ the_slideshow_title(); ?> <div class="FA_overall_container_classic <?php the_slider_color(); ?> " style="<?php the_slider_width(); ?> " id="<?php echo $FA_slider_id; ?> "> <div class="FA_featured_articles" style="<?php the_slider_height(); ?> "> <?php foreach ($postslist as $post) { ?> <div class="FA_article <?php the_fa_class(); ?>