Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Register Custom Template Widgets
- class Post_Author_Widget extends WP_Widget {
- function Post_Author_Widget() {
- $widget_ops = array('classname' => 'postAuthor', 'description' => 'Displays the post author bio and gravatar.' );
- $this->WP_Widget('post_author', 'Post Author', $widget_ops);
- }
- function widget($args, $instance) {
- extract($args, EXTR_SKIP);
- echo $before_widget;
- echo get_author_bio();
- echo $after_widget;
- }
- function update($new_instance, $old_instance) {
- function update($new_instance, $old_instance) {
- $instance = $old_instance;
- return $instance;
- }
- }
- }
- register_widget('Post_Author_Widget');
- class Blog_Author_List_Widget extends WP_Widget {
- function Blog_Author_List_Widget() {
- $widget_ops = array('classname' => 'authorList', 'description' => 'Lists blog contributors with gravatars and bio.' );
- $this->WP_Widget('author_list', 'The Bloggers', $widget_ops);
- }
- function widget($args, $instance) {
- extract($args, EXTR_SKIP);
- echo $before_widget;
- $title = '<span>The</span> Bloggers';
- echo $before_title . $title . $after_title;
- echo get_author_list();
- echo $after_widget;
- }
- function update($new_instance, $old_instance) {
- function update($new_instance, $old_instance) {
- $instance = $old_instance;
- return $instance;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement