'aspen_widget_text', 'description' => aspen_t_('Text Widget with Two Columns - with HTML and shortcode support. Also adds shortcodes to standard Text widget.' /*a*/ )); $control_ops = array('width' => 400, 'height' => 350); $this->WP_Widget('aspen_text', aspen_t_('Aspen Text 2' /*a*/ ), $widget_ops, $control_ops); } function widget( $args, $instance ) { extract($args); $title = apply_filters( 'widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base); $text = apply_filters( 'aspen_text', $instance['text'], $instance ); $text2 = apply_filters( 'aspen_text', $instance['text2'], $instance ); echo $before_widget; if ( !empty( $title ) ) { echo $before_title . $title . $after_title; } ?>
'', 'text' => '', 'text2' => '', 'filter' => 0) ); $title = strip_tags($instance['title']); $text = format_to_edit($instance['text']); $text2 = format_to_edit($instance['text2']); ?>
/>
'aspen_widget_pptext', 'description' => 'Display text on a Per Page basis.' ); $this->WP_Widget('aspen_pptext', aspen_t_('Aspen Per Page Text' /*a*/ ), $widget_ops); } function widget( $args, $instance ) { extract($args); $title = aspen_get_per_page_value('wvr_pp_title'); $text = aspen_get_per_page_value('wvr_pp_text'); if (empty($title) && empty($text)) return; echo $before_widget; if ( !empty( $title ) ) { echo $before_title . $title . $after_title; } echo do_shortcode($text); echo $after_widget; } function update( $new_instance, $old_instance ) { $instance = $old_instance; $instance['title'] = strip_tags($new_instance['title']); return $instance; } function form( $instance ) { ?>This widget will work like a text widget, but the title and content are defined by custom fields set on a Per Page basis. For any page, define the Custom Field wvr_pp_title if you want a title, and define Custom Field wvr_pp_text as the content. Content can include arbitrary text, HTML, and shortcodes. The widget will display only if the custom fields are defined when that page is displayed. (This widget won't display on the default blog or other archive-like pages.)
'aspen_widget_login', 'description' => __( "Log in/out, admin", 'aspen' ) );
$this->WP_Widget('aspen_login', aspen_t_('Aspen Login' /*a*/ ), $widget_ops);
}
function widget( $args, $instance ) {
extract($args);
$title = apply_filters('widget_title', empty($instance['title']) ? __('Login', 'aspen' ) : $instance['title'], $instance, $this->id_base);
echo $before_widget;
if ( $title )
echo $before_title . $title . $after_title;
global $current_user;
get_currentuserinfo();
if (isset($current_user->display_name))
echo '' . __('Welcome','aspen') . ' ' . $current_user->display_name . ".
\n";
?>