示例#1
0
 /**
  * How to display the widget on the screen.
  */
 function widget($args, $instance)
 {
     extract($args);
     if (!isset($instance['fa_slider_widget']) || !$instance['fa_slider_widget']) {
         return;
     }
     /* Variables from the widget settings. */
     $title = apply_filters('widget_title', $instance['title']);
     /* Before widget (defined by themes). */
     echo $before_widget;
     /* Display the widget title if one was input (before and after defined by themes). */
     if ($title) {
         echo $before_title . $title . $after_title;
     }
     /* display the slideshow */
     FA_display_slider($instance['fa_slider_widget']);
     /* After widget (defined by themes). */
     echo $after_widget;
 }
示例#2
0
function FA_lite_shortcode($atts)
{
    extract(shortcode_atts(array('id' => false), $atts));
    return FA_display_slider($id, false);
}
示例#3
0
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php 
_e('FeaturedArticles Lite - Slider preview', 'falite');
?>
</title>
<?php 
wp_head();
?>
</head>
<body>

<?php 
$s = FA_style_size($slider_id);
?>

<div class="backend-preview" style="<?php 
echo $s['x'];
?>
; margin:20px auto;">
	<?php 
FA_display_slider($slider_id);
?>
</div>

<?php 
wp_footer();
?>
</body>
</html>
<?php 
exit;