コード例 #1
0
 function widget($args, $instance)
 {
     extract($args);
     /* Our variables from the widget settings --------------------------------------- */
     $title = apply_filters('widget_title', $instance['title']);
     $flickrID = $instance['flickrID'];
     $postcount = $instance['postcount'];
     $type = $instance['type'];
     $display = $instance['display'];
     /* Build our output ------------------------------------------------------------- */
     echo $before_widget;
     if ($title) {
         echo $before_title . $title . $after_title;
     }
     if (class_exists('bj_template')) {
         bj_template::flickr_badge($flickrID, $postcount, $display, $type);
     }
     echo $after_widget;
 }
コード例 #2
0
 /**
  * Now to display the widget on the screen.
  */
 function widget($args, $instance)
 {
     extract($args);
     /* Our variables from the widget settings. */
     $title = apply_filters('widget_title', $instance['title']);
     //$show_user = $instance['user'];
     //$show_sex = isset( $instance['show_sex'] ) ? $instance['show_sex'] : false;
     /* Before widget (defined by themes). */
     echo $before_widget;
     echo "<div class=\"bj-contact-widget\" >";
     /* Display the widget title if one was input (before and after defined by themes). */
     if ($title) {
         echo $before_title . $title . $after_title;
     }
     if (is_single() or is_page()) {
         bj_template::contact_author();
     } else {
         bj_template::contact_org();
     }
     /* After widget (defined by themes). */
     echo "</div>";
     echo $after_widget;
 }
コード例 #3
0
 public function fixie($atts, $content = null)
 {
     extract(shortcode_atts(array('element' => ''), $atts));
     $fixie = bj_template::fixie($element);
     return $fixie;
 }