2009-11-13 16:00:25 +00:00
< ? php
/*
Widget Name : comictitle
Widget URI : http :// comicpress . org /
Description : Display a Title of the Comic that can be used in any area around the comic .
Author : Philip M . Hofer ( Frumph )
Version : 1.01
2009-11-14 15:12:36 +00:00
Author URI : http :// frumph . net /
2009-11-13 16:00:25 +00:00
*/
class widget_comicpress_comictitle extends WP_Widget {
function widget_comicpress_comictitle () {
$widget_ops = array ( 'classname' => 'widget_comicpress_comictitle' , 'description' => __ ( 'Displays the title of the comic. (used in comic sidebars)' , 'comicpress' ) );
2009-12-20 16:22:10 +00:00
$this -> WP_Widget ( 'comicpress_comictitle' , __ ( 'ComicPress Comic Title' , 'comicpress' ), $widget_ops );
2009-11-13 16:00:25 +00:00
}
function widget ( $args , $instance ) {
global $post ;
extract ( $args , EXTR_SKIP );
echo $before_widget ; ?>
< a href = " <?php the_permalink(); ?> " >< ? php the_title (); ?> </a>
< ? php echo $after_widget ;
}
function update ( $new_instance , $old_instance ) {
$instance = $old_instance ;
return $instance ;
}
function form ( $instance ) {
}
}
register_widget ( 'widget_comicpress_comictitle' );
function widget_comicpress_comictitle_init () {
new widget_comicpress_comictitle ();
}
add_action ( 'widgets_init' , 'widget_comicpress_comictitle_init' );
?>