Flexible Posts Widget - Version 2.1

Version Description

  • Added offset parameter to display options.
Download this release

Release Info

Developer dpe415
Plugin Icon wp plugin Flexible Posts Widget
Version 2.1
Comparing to
See all releases

Code changes from version 2.0 to 2.1

Files changed (2) hide show
  1. flexible-posts-widget.php +11 -3
  2. readme.txt +7 -4
flexible-posts-widget.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Flexible Posts Widget
4
  Plugin URI: http://wordpress.org/extend/plugins/flexible-posts-widget/
5
  Author: dpe415
6
  Author URI: http://dpedesign.com
7
- Version: 2.0
8
  Description: An advanced posts display widget with many options: post by taxonomy & term or post type, thumbnails, order & order by, customizable templates
9
  License: GPL2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -104,6 +104,7 @@ class DPE_Flexible_Posts_Widget extends WP_Widget {
104
  ),
105
  'post_status' => array('publish', 'inherit'),
106
  'posts_per_page' => $number,
 
107
  'orderby' => $orderby,
108
  'order' => $order,
109
  );
@@ -112,6 +113,7 @@ class DPE_Flexible_Posts_Widget extends WP_Widget {
112
  'post_status' => array('publish', 'inherit'),
113
  'post_type' => $posttype,
114
  'posts_per_page' => $number,
 
115
  'orderby' => $orderby,
116
  'order' => $order,
117
  );
@@ -147,6 +149,7 @@ class DPE_Flexible_Posts_Widget extends WP_Widget {
147
  $instance['taxonomy'] = $new_instance['taxonomy'];
148
  $instance['term'] = strip_tags( $new_instance['term'] );
149
  $instance['number'] = strip_tags( $new_instance['number'] );
 
150
  $instance['orderby'] = $new_instance['orderby'];
151
  $instance['order'] = $new_instance['order'];
152
  $instance['thumbsize'] = $new_instance['thumbsize'];
@@ -178,6 +181,7 @@ class DPE_Flexible_Posts_Widget extends WP_Widget {
178
  'taxonomy' => 'category',
179
  'term' => '',
180
  'number' => '3',
 
181
  'orderby' => 'date',
182
  'order' => 'DESC',
183
  'thumbnail' => false,
@@ -203,7 +207,7 @@ class DPE_Flexible_Posts_Widget extends WP_Widget {
203
  <div id="<?php echo $this->get_field_id('tnt-box'); ?>" class="getembies tnt" <?php echo $getemby == 'tnt' ? '' : 'style="display:none;"'?>>
204
  <p>
205
  <label for="<?php echo $this->get_field_id('taxonomy'); ?>"><?php _e('Select a taxonomy:'); ?></label>
206
- <select class="widefat dpe-fp-taxonomy" name="<?php echo $this->get_field_name('taxonomy'); ?>" id="<?php echo $this->get_field_id('taxonomy'); ?>">
207
  <?php
208
  foreach ($taxonomies as $option) {
209
  echo '<option value="' . $option->name . '"', $taxonomy == $option->name ? ' selected="selected"' : '', '>', $option->label, '</option>';
@@ -254,7 +258,11 @@ class DPE_Flexible_Posts_Widget extends WP_Widget {
254
  <label for="<?php echo $this->get_field_id('number'); ?>"><?php _e('Number of posts to show:'); ?></label>
255
  <input id="<?php echo $this->get_field_id('number'); ?>" name="<?php echo $this->get_field_name('number'); ?>" type="text" value="<?php echo $number; ?>" style="width:40px; margin-left:.2em; text-align:right;" />
256
  </p>
257
- <p>
 
 
 
 
258
  <label for="<?php echo $this->get_field_id('orderby'); ?>"><?php _e('Order post by:'); ?></label>
259
  <select class="widefat" name="<?php echo $this->get_field_name('orderby'); ?>" id="<?php echo $this->get_field_id('orderby'); ?>">
260
  <?php
4
  Plugin URI: http://wordpress.org/extend/plugins/flexible-posts-widget/
5
  Author: dpe415
6
  Author URI: http://dpedesign.com
7
+ Version: 2.1
8
  Description: An advanced posts display widget with many options: post by taxonomy & term or post type, thumbnails, order & order by, customizable templates
9
  License: GPL2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
104
  ),
105
  'post_status' => array('publish', 'inherit'),
106
  'posts_per_page' => $number,
107
+ 'offset' => $offset,
108
  'orderby' => $orderby,
109
  'order' => $order,
110
  );
113
  'post_status' => array('publish', 'inherit'),
114
  'post_type' => $posttype,
115
  'posts_per_page' => $number,
116
+ 'offset' => $offset,
117
  'orderby' => $orderby,
118
  'order' => $order,
119
  );
149
  $instance['taxonomy'] = $new_instance['taxonomy'];
150
  $instance['term'] = strip_tags( $new_instance['term'] );
151
  $instance['number'] = strip_tags( $new_instance['number'] );
152
+ $instance['offset'] = strip_tags( $new_instance['offset'] );
153
  $instance['orderby'] = $new_instance['orderby'];
154
  $instance['order'] = $new_instance['order'];
155
  $instance['thumbsize'] = $new_instance['thumbsize'];
181
  'taxonomy' => 'category',
182
  'term' => '',
183
  'number' => '3',
184
+ 'offset' => '0',
185
  'orderby' => 'date',
186
  'order' => 'DESC',
187
  'thumbnail' => false,
207
  <div id="<?php echo $this->get_field_id('tnt-box'); ?>" class="getembies tnt" <?php echo $getemby == 'tnt' ? '' : 'style="display:none;"'?>>
208
  <p>
209
  <label for="<?php echo $this->get_field_id('taxonomy'); ?>"><?php _e('Select a taxonomy:'); ?></label>
210
+ <select style="background-color:#fff;" class="widefat dpe-fp-taxonomy" name="<?php echo $this->get_field_name('taxonomy'); ?>" id="<?php echo $this->get_field_id('taxonomy'); ?>">
211
  <?php
212
  foreach ($taxonomies as $option) {
213
  echo '<option value="' . $option->name . '"', $taxonomy == $option->name ? ' selected="selected"' : '', '>', $option->label, '</option>';
258
  <label for="<?php echo $this->get_field_id('number'); ?>"><?php _e('Number of posts to show:'); ?></label>
259
  <input id="<?php echo $this->get_field_id('number'); ?>" name="<?php echo $this->get_field_name('number'); ?>" type="text" value="<?php echo $number; ?>" style="width:40px; margin-left:.2em; text-align:right;" />
260
  </p>
261
+ <p>
262
+ <label for="<?php echo $this->get_field_id('offset'); ?>"><?php _e('Number of posts to skip:'); ?></label>
263
+ <input id="<?php echo $this->get_field_id('offset'); ?>" name="<?php echo $this->get_field_name('offset'); ?>" type="text" value="<?php echo $offset; ?>" style="width:40px; margin-left:.2em; text-align:right;" />
264
+ </p>
265
+ <p>
266
  <label for="<?php echo $this->get_field_id('orderby'); ?>"><?php _e('Order post by:'); ?></label>
267
  <select class="widefat" name="<?php echo $this->get_field_name('orderby'); ?>" id="<?php echo $this->get_field_id('orderby'); ?>">
268
  <?php
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: dpe415
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=DJKSKHJWYAWDU
4
  Tags: widget, widgets, posts, recent posts, thumbnails, custom post types, custom taxonomies
5
  Requires at least: 3.2
6
- Tested up to: 3.3.2
7
- Stable tag: 2.0
8
  License: GPL2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -74,14 +74,17 @@ Edit the new file in your theme to your desired HTML layout. Please do not edit
74
 
75
  = Future updates & features list =
76
 
77
- * Create shortcode functionality
78
  * Dynamically populate the "Template Filename" field based on the templates available.
79
  * Adjust widget output template for Media-type posts.
80
- * Add default styles for the widget display & an option to load or not load them (?)
81
 
82
 
83
  == Changelog ==
84
 
 
 
 
85
  = 2.0 =
86
  * *Upgrade notice:* When upgrading from v1.x.x to v2.x, remember to double-check the settings for any existing widgets.
87
  * Dynamically populate available terms based on selected taxonomy.
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=DJKSKHJWYAWDU
4
  Tags: widget, widgets, posts, recent posts, thumbnails, custom post types, custom taxonomies
5
  Requires at least: 3.2
6
+ Tested up to: 3.4
7
+ Stable tag: 2.1
8
  License: GPL2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
74
 
75
  = Future updates & features list =
76
 
77
+ * Allow for multiple post type or term selections.
78
  * Dynamically populate the "Template Filename" field based on the templates available.
79
  * Adjust widget output template for Media-type posts.
80
+ * Add default styles for the widget display & an option to load or not load them. (?)
81
 
82
 
83
  == Changelog ==
84
 
85
+ = 2.1 =
86
+ * Added offset parameter to display options.
87
+
88
  = 2.0 =
89
  * *Upgrade notice:* When upgrading from v1.x.x to v2.x, remember to double-check the settings for any existing widgets.
90
  * Dynamically populate available terms based on selected taxonomy.