',
) );
// Area 2, located at the top right of the layout. Empty by default.
register_sidebar( array(
'name' => __( 'Seconday Sidebar', 'expediawp' ),
'id' => 'right-primary-widget-area',
'description' => __( 'This sidebar only displays in the three column layout set up.', 'expediawp' ),
'before_widget' => '
',
'after_widget' => '
',
'before_title' => '
',
'after_title' => '
',
) );
}
/** Register sidebars by running expediawp_widgets_init() on the widgets_init hook. */
add_action( 'widgets_init', 'expediawp_widgets_init' );
// Set sepcial widget to display customized data in sidebars.
class List_Content extends WP_Widget {
function List_Content() {
$widget_options = array('description' => 'This widget displays latest content with thumbnails from a selected category.', 'classname' => 'widget-listing');
parent::WP_Widget(false, 'TB Theme Latest Content', $widget_options);
}
function form($instance) {
// outputs the options form on admin
$instance = wp_parse_args((array) $instance, array('title' => __('', 'widget-listing'), 'cat_name' => 'Uncategorized', 'n_posts' => 5));
$title = esc_attr($instance['title']);
$cat_name = esc_attr($instance['cat_name']);
$n_posts = intval($instance['n_posts']);
$categories = &get_categories('type=post&orderby=name&hide_empty=0');
?>
'This widget displays featured content with thumbnails.', 'classname' => 'widget-listing');
parent::WP_Widget(false, 'TB Theme Featured Content', $widget_options);
}
function form($instance) {
// outputs the options form on admin
$instance = wp_parse_args((array) $instance, array('title' => __('', 'widget-listing'), 'cat_name' => 'exp_widget_feature', 'n_posts' => 5));
$title = esc_attr($instance['title']);
$cat_name = esc_attr($instance['cat_name']);
$n_posts = intval($instance['n_posts']);
?>
'Displays multiple map points from Posts where you have inserted locations.', 'classname' => 'widget-google-maps');
parent::WP_Widget(false, 'TB Global Google Map', $widget_options);
}
function form($instance) {
// outputs the options form on admin
$instance = wp_parse_args((array) $instance, array('title' => __('My Map Locations', 'widget-links'),'height' => __('300', 'widget-links'),'loc_limit' => __('20', 'widget-links')) );
$title = esc_attr($instance['title']);
$height = esc_attr($instance['height']);
$loc_limit = intval($instance['loc_limit']);
?>