'dd_page_widget', 'description' => __('This widget outputs single page with thumbnail and page excerpt on any widgetized area.', 'aerial') ); /* Widget control settings. */ $control_ops = array( 'width' => 300, 'height' => 350, 'id_base' => 'dd_page_widget' ); /* Create the widget. */ $this->WP_Widget( 'dd_page_widget', __('DD Page Widget', 'aerial'), $widget_ops, $control_ops ); } /** * Displays page widget on blog. */ function widget($args, $instance) { global $post; extract( $args ); if( !$instance["title"] ) { $page_name = get_page($instance['page_id']); $instance["title"] = $page_name->post_title; } $page_id = $instance['page_id']; // Get array of post info. $page_posts = new WP_Query("page_id=" . $page_id); echo $before_widget; echo $before_title; // Widget title echo '' . $instance["title"] . ''; echo $after_title; while ( $page_posts->have_posts() ) { $page_posts->the_post(); ?> array( 'post_thumbnail' ), 'default_size' => 'full', 'image_class' => $instance["align"], 'width' => $instance["thumb_w"], 'height' => $instance["thumb_h"] ) ); ?>

" name="get_field_name("excerpt_length"); ?>" value="" size="3" />

'dd_posts', 'description' => __('A widget that can display posts from a specific category.', 'aerial') ); /* Widget control settings. */ $control_ops = array( 'width' => 300, 'height' => 350, 'id_base' => 'dd_posts' ); /* Create the widget. */ $this->WP_Widget( 'dd_posts', __('DD Posts', 'aerial'), $widget_ops, $control_ops ); } /** * Displays category posts widget on blog. */ function widget($args, $instance) { global $post; $post_old = $post; // Save the post object. extract( $args ); // If not title, use the name of the category. if( !$instance["title"] ) { $category_info = get_category($instance["cat"]); $instance["title"] = $category_info->name; } ?> ' . $instance["title"] . ''; else echo $instance["title"]; echo $after_title; ?> have_posts() ) { $cat_posts->the_post(); ?>
array( 'post_thumbnail' ), 'default_size' => 'full', 'image_class' => $instance["align"], 'width' => $instance["thumb_w"], 'height' => $instance["thumb_h"] ) ); ?>

more', 'aerial'); ?>

" name="get_field_name("excerpt_length"); ?>" value="" size="3" />

'dd_most_popular', 'description' => __('Display unordered list of most popular posts on your site according to the number of comments.', 'dd_most_popular') ); /* Widget control settings. */ $control_ops = array( 'width' => 300, 'height' => 350, 'id_base' => 'dd_most_popular' ); /* Create the widget. */ $this->WP_Widget( 'dd_most_popular', __('DD Most Popular Posts', 'dd_most_popular'), $widget_ops, $control_ops ); } //Displaying widget function widget( $args, $instance ) { global $post; extract( $args ); // Variables from the widget settings. $title = apply_filters('widget_title', $instance['title'] ); $count = ctype_digit($instance['count'] )? $instance['count'] : 5; // Before widget (defined by themes). echo $before_widget; // Display the widget title if one was input (before and after defined by themes). if ( $title ) echo $before_title . $title . $after_title . '