예제 #1
0
        <?php 
        get_recent_trackbacks();
        ?>
      </ul>
    </li>
    <?php 
    }
    ?>
    <?php 
    if (function_exists('ns_show_top_commentators')) {
        ?>
    <li>
      <h2>Top Commenters</h2>
      <ul>
        <?php 
        ns_show_top_commentators();
        ?>
      </ul>
    </li>
    <?php 
    }
    ?>
    <?php 
    get_links_list();
    ?>
    <?php 
}
?>
  </ul>
</div>
<!-- End left_sidebar -->
예제 #2
0
 function widget_leaderbrd($args)
 {
     // $args is an array of strings that help widgets to conform to
     // the active theme: before_widget, before_title, after_widget,
     // and after_title are the array keys. Default tags: li and h2.
     extract($args);
     // This one string determines whether you want it to appear in the main page or everywhere
     $options = get_option('widget_leaderbrd');
     $showInHome = $options['showInHome'];
     $title = htmlspecialchars(stripcslashes($options['title']), ENT_QUOTES);
     global $wpdb;
     if ($showInHome == 1) {
         if (is_home()) {
             echo $before_widget . $before_title . $title . $after_title;
         }
     } else {
         echo $before_widget . $before_title . $title . $after_title;
     }
     if ($showInHome == 1) {
         if (is_home()) {
             echo ns_show_top_commentators();
         }
     } else {
         echo ns_show_top_commentators();
     }
     if ($showInHome == 1) {
         if (is_home()) {
             echo $after_widget . "<!-- end of widget -->";
         }
     } else {
         echo $after_widget . "<!-- end of widget -->";
     }
 }