Flexible Posts Widget - Version 3.3

Version Description

  • Refactored the PHP Class to encapsulate the plugin.
  • Added the ability to sort posts by "Post ID Order". Useful when getting posts using the ID tab (post__in). (Props: @cinus89)
  • Added Russian translation. (Props: @mizhgun)
  • Tested To bump for WordPress 3.9 support.
Download this release

Release Info

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

Code changes from version 3.2.2 to 3.3

flexible-posts-widget.php CHANGED
@@ -1,108 +1,159 @@
1
  <?php
2
- /*
3
- Plugin Name: Flexible Posts Widget
4
- Plugin URI: http://wordpress.org/extend/plugins/flexible-posts-widget/
5
- Version: 3.2.2
6
- Author: dpe415
7
- Author URI: http://dpedesign.com
8
- Text Domain: flexible-posts-widget
9
- Description: An advanced posts display widget with many options: get posts by post type and taxonomy & term or by post ID; sorting & ordering; feature images; custom templates and more.
10
- License: GPL2 or later
11
- License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
- */
13
-
14
- /* Copyright 2013 David Paul Ellenwood (email : david@dpedesign.com)
15
-
16
- This program is free software; you can redistribute it and/or modify
17
- it under the terms of the GNU General Public License, version 2, as
18
- published by the Free Software Foundation.
19
-
20
- This program is distributed in the hope that it will be useful,
21
- but WITHOUT ANY WARRANTY; without even the implied warranty of
22
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
- GNU General Public License for more details.
24
-
25
- You should have received a copy of the GNU General Public License
26
- along with this program; if not, write to the Free Software
27
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28
- */
29
-
30
- // Block direct requests
31
- if( ! defined( 'ABSPATH' ) )
32
- die( '-1' );
33
-
34
- // Define our version number
35
- if( ! defined( 'DPE_FP_Version' ) )
36
- define( 'DPE_FP_Version', '3.2' );
37
-
38
  /**
39
- * Plugin Initialization
40
- * Used for internationalization only at this point
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
  */
42
- function dpe_flexible_posts_widget_init() {
43
- load_plugin_textdomain( 'flexible-posts-widget', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
44
- }
45
- add_action('plugins_loaded', 'dpe_flexible_posts_widget_init');
46
-
47
 
48
  /**
49
- * Initialize the widget on widgets_init
 
 
 
 
 
 
 
 
 
 
 
 
 
50
  */
51
- function dpe_load_flexible_posts_widget() {
52
- register_widget( 'DPE_Flexible_Posts_Widget' );
 
 
 
53
  }
54
- add_action('widgets_init', 'dpe_load_flexible_posts_widget' );
55
 
56
 
57
  /**
58
  * Flexible Posts Widget Class
59
  */
60
  class DPE_Flexible_Posts_Widget extends WP_Widget {
61
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62
  /**
63
- * Register widget with WordPress.
 
64
  */
65
  public function __construct() {
 
 
 
 
66
 
67
- global $pagenow;
68
-
 
 
69
  parent::__construct(
70
- 'dpe_fp_widget', // Base ID
71
- 'Flexible Posts Widget', // Name
72
- array( 'description' => __( 'Display posts as widget items', 'flexible-posts-widget' ) ) // Args
 
 
 
73
  );
 
 
 
 
74
 
75
- $this->directory = plugins_url( '/', __FILE__ );
76
-
77
- $this->register_hooks(); // Register actions & filters
78
- $this->register_sns( $this->directory ); // Register styles & scripts
79
-
80
- // Enqueue admin scripts
81
- if ( defined( 'WP_ADMIN' ) && WP_ADMIN ) {
82
- if ( 'widgets.php' == $pagenow ) {
83
- wp_enqueue_script( 'flexible-posts-widget' );
84
- wp_enqueue_style( 'flexible-posts-widget' );
85
- wp_localize_script( 'flexible-posts-widget', 'objectL10n', array(
86
- 'gettingTerms' => __( 'Getting terms...', 'flexible-posts-widget' ),
87
- 'selectTerms' => __( 'Select terms:', 'flexible-posts-widget' ),
88
- 'noTermsFound' => __( 'No terms found.', 'flexible-posts-widget' ),
89
- ) );
90
- }
91
- }
92
 
93
  }
94
 
 
 
 
 
 
 
 
 
 
 
95
 
96
- /**
97
- * Front-end display of widget.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
98
  *
99
  * @see WP_Widget::widget()
100
  *
101
- * @param array $args Widget arguments.
102
- * @param array $instance Saved values from database.
103
  */
104
- function widget( $args, $instance ) {
105
- extract( $args );
 
106
  extract( $instance );
107
 
108
  $title = apply_filters( 'widget_title', empty( $title ) ? '' : $title );
@@ -110,7 +161,6 @@ class DPE_Flexible_Posts_Widget extends WP_Widget {
110
  if ( empty( $template ) )
111
  $template = 'widget.php';
112
 
113
-
114
  // Setup the query arguments array
115
  $args = array();
116
 
@@ -174,7 +224,7 @@ class DPE_Flexible_Posts_Widget extends WP_Widget {
174
  *
175
  * @return array Updated safe values to be saved.
176
  */
177
- function update( $new_instance, $old_instance ) {
178
 
179
  // Get our defaults to test against
180
  $this->posttypes = get_post_types( array( 'public' => true ), 'objects' );
@@ -189,6 +239,7 @@ class DPE_Flexible_Posts_Widget extends WP_Widget {
189
  'name' => __( 'Post Slug', 'flexible-posts-widget' ),
190
  'comment_count' => __( 'Comment Count', 'flexible-posts-widget' ),
191
  'rand' => __( 'Random', 'flexible-posts-widget' ),
 
192
  );
193
  $this->orders = array(
194
  'ASC' => __( 'Ascending', 'flexible-posts-widget' ),
@@ -264,9 +315,9 @@ class DPE_Flexible_Posts_Widget extends WP_Widget {
264
  *
265
  * @param array $instance Previously saved values from database.
266
  */
267
- function form( $instance ) {
268
-
269
- $this->posttypes = get_post_types( array( 'public' => true ), 'objects' );
270
  $this->taxonomies = get_taxonomies( array( 'public' => true ), 'objects' );
271
  $this->thumbsizes = get_intermediate_image_sizes();
272
  $this->orderbys = array(
@@ -278,6 +329,7 @@ class DPE_Flexible_Posts_Widget extends WP_Widget {
278
  'name' => __( 'Post Slug', 'flexible-posts-widget' ),
279
  'comment_count' => __( 'Comment Count', 'flexible-posts-widget' ),
280
  'rand' => __( 'Random', 'flexible-posts-widget' ),
 
281
  );
282
  $this->orders = array(
283
  'ASC' => __( 'Ascending', 'flexible-posts-widget' ),
@@ -304,8 +356,8 @@ class DPE_Flexible_Posts_Widget extends WP_Widget {
304
  extract( $instance );
305
 
306
  include( $this->getTemplateHierarchy( 'admin' ) );
307
-
308
- }
309
 
310
  /**
311
  * Loads theme files in appropriate hierarchy: 1) child theme,
@@ -334,24 +386,64 @@ class DPE_Flexible_Posts_Widget extends WP_Widget {
334
  return apply_filters( 'dpe_fpw_template_' . $template, $file );
335
 
336
  }
337
-
 
 
 
 
338
  /**
339
- * Register styles & scripts
340
  */
341
- public function register_sns( $dir ) {
342
- wp_register_script( 'flexible-posts-widget', $dir . 'js/admin.js', array('jquery', 'jquery-ui-tabs' ), DPE_FP_Version, true );
343
- wp_register_style( 'flexible-posts-widget', $dir . 'css/admin.css', array(), DPE_FP_Version );
344
- }
345
-
 
346
  /**
347
- * Setup our get terms/AJAX callback
348
  */
349
- public function register_hooks() {
350
- add_action( 'wp_ajax_dpe_fp_get_terms', array( &$this, 'terms_checklist' ) );
351
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
352
 
353
  /**
354
- * return a list of terms for the chosen taxonomy used via AJAX
355
  */
356
  public function terms_checklist( $term ) {
357
 
@@ -388,7 +480,7 @@ class DPE_Flexible_Posts_Widget extends WP_Widget {
388
  }
389
 
390
  /**
391
- *
392
  */
393
  public function posttype_checklist( $posttype ) {
394
 
@@ -407,3 +499,9 @@ class DPE_Flexible_Posts_Widget extends WP_Widget {
407
 
408
 
409
  } // class DPE_Flexible_Posts_Widget
 
 
 
 
 
 
1
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  /**
3
+ * Flexible Posts Widget
4
+ *
5
+ * Display posts as widget items.
6
+ *
7
+ * @package DPE_Flexible_Posts_Widget
8
+ * @author David Paul Ellenwood <david@dpedesign.com>
9
+ * @license GPL-2.0+
10
+ * @link http://wordpress.org/extend/plugins/flexible-posts-widget
11
+ * @copyright 2013 David Paul Ellenwood
12
+ *
13
+ * @flexible-posts-widget
14
+ * Plugin Name: Flexible Posts Widget
15
+ * Plugin URI: http://wordpress.org/extend/plugins/flexible-posts-widget
16
+ * Description: An advanced posts display widget with many options: get posts by post type and taxonomy & term or by post ID; sorting & ordering; feature images; custom templates and more.
17
+ * Version: 3.3
18
+ * Author: dpe415
19
+ * Author URI: http://dpedesign.com
20
+ * Text Domain: flexible-posts-widget
21
+ * License: GPL-2.0+
22
+ * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
23
+ * Domain Path: /languages
24
+ * GitHub Plugin URI: https://github.com/dpellenwood/flexible-posts-widget
25
  */
 
 
 
 
 
26
 
27
  /**
28
+ * Copyright 2013 David Paul Ellenwood (email : david@dpedesign.com)
29
+ *
30
+ * This program is free software; you can redistribute it and/or modify
31
+ * it under the terms of the GNU General Public License, version 2, as
32
+ * published by the Free Software Foundation.
33
+ *
34
+ * This program is distributed in the hope that it will be useful,
35
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
36
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
37
+ * GNU General Public License for more details.
38
+ *
39
+ * You should have received a copy of the GNU General Public License
40
+ * along with this program; if not, write to the Free Software
41
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
42
  */
43
+
44
+
45
+ // Block direct requests
46
+ if ( ! defined( 'WPINC' ) ) {
47
+ die;
48
  }
 
49
 
50
 
51
  /**
52
  * Flexible Posts Widget Class
53
  */
54
  class DPE_Flexible_Posts_Widget extends WP_Widget {
55
+
56
+ /**
57
+ * Unique identifier for your widget.
58
+ *
59
+ *
60
+ * The variable name is used as a unique identifier for the widget
61
+ *
62
+ * @since 1.0.0
63
+ *
64
+ * @var string
65
+ */
66
+ protected $widget_slug = 'dpe_fp_widget';
67
+
68
+ /**
69
+ * Unique identifier for your widget.
70
+ *
71
+ *
72
+ * The variable name is used as the text domain when internationalizing strings
73
+ * of text. Its value should match the Text Domain file header in the main
74
+ * widget file.
75
+ *
76
+ * @since 1.0.0
77
+ *
78
+ * @var string
79
+ */
80
+ protected $widget_text_domain = 'flexible-posts-widget';
81
+
82
+
83
+ /*--------------------------------------------------*/
84
+ /* Constructor
85
+ /*--------------------------------------------------*/
86
+
87
  /**
88
+ * Specifies the classname and description, instantiates the widget,
89
+ * loads localization files, and includes necessary stylesheets and JavaScript.
90
  */
91
  public function __construct() {
92
+
93
+ // Define our version number
94
+ if( ! defined( 'DPE_FP_Version' ) )
95
+ define( 'DPE_FP_Version', '3.3' );
96
 
97
+ // load plugin text domain
98
+ add_action( 'init', array( $this, 'widget_textdomain' ) );
99
+
100
+ // The widget contrstructor
101
  parent::__construct(
102
+ $this->get_widget_slug(),
103
+ __( 'Flexible Posts Widget', $this->get_widget_text_domain() ),
104
+ array(
105
+ //'classname' => $this->get_widget_slug(),
106
+ 'description' => __( 'Display posts as widget items.', $this->get_widget_text_domain() ),
107
+ )
108
  );
109
+
110
+ // Register admin styles and scripts
111
+ add_action( 'admin_enqueue_scripts', array( $this, 'register_admin_styles' ) );
112
+ add_action( 'admin_enqueue_scripts', array( $this, 'register_admin_scripts' ) );
113
 
114
+ // Setup our get terms/AJAX callback
115
+ add_action( 'wp_ajax_dpe_fp_get_terms', array( &$this, 'terms_checklist' ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
116
 
117
  }
118
 
119
+ /**
120
+ * Return the widget slug.
121
+ *
122
+ * @since 1.0.0
123
+ *
124
+ * @return Plugin slug variable.
125
+ */
126
+ public function get_widget_slug() {
127
+ return $this->widget_slug;
128
+ }
129
 
130
+ /**
131
+ * Return the widget text domain.
132
+ *
133
+ * @since 1.0.0
134
+ *
135
+ * @return Plugin text domain variable.
136
+ */
137
+ public function get_widget_text_domain() {
138
+ return $this->widget_text_domain;
139
+ }
140
+
141
+
142
+ /*--------------------------------------------------*/
143
+ /* Widget API Functions
144
+ /*--------------------------------------------------*/
145
+
146
+ /**
147
+ * Outputs the content of the widget.
148
  *
149
  * @see WP_Widget::widget()
150
  *
151
+ * @param array args The array of form elements
152
+ * @param array instance The current instance of the widget
153
  */
154
+ public function widget( $args, $instance ) {
155
+
156
+ extract( $args );
157
  extract( $instance );
158
 
159
  $title = apply_filters( 'widget_title', empty( $title ) ? '' : $title );
161
  if ( empty( $template ) )
162
  $template = 'widget.php';
163
 
 
164
  // Setup the query arguments array
165
  $args = array();
166
 
224
  *
225
  * @return array Updated safe values to be saved.
226
  */
227
+ public function update( $new_instance, $old_instance ) {
228
 
229
  // Get our defaults to test against
230
  $this->posttypes = get_post_types( array( 'public' => true ), 'objects' );
239
  'name' => __( 'Post Slug', 'flexible-posts-widget' ),
240
  'comment_count' => __( 'Comment Count', 'flexible-posts-widget' ),
241
  'rand' => __( 'Random', 'flexible-posts-widget' ),
242
+ 'post__in' => __( 'Post ID Order', 'flexible-posts-widget' ),
243
  );
244
  $this->orders = array(
245
  'ASC' => __( 'Ascending', 'flexible-posts-widget' ),
315
  *
316
  * @param array $instance Previously saved values from database.
317
  */
318
+ public function form( $instance ) {
319
+
320
+ $this->posttypes = get_post_types( array( 'public' => true ), 'objects' );
321
  $this->taxonomies = get_taxonomies( array( 'public' => true ), 'objects' );
322
  $this->thumbsizes = get_intermediate_image_sizes();
323
  $this->orderbys = array(
329
  'name' => __( 'Post Slug', 'flexible-posts-widget' ),
330
  'comment_count' => __( 'Comment Count', 'flexible-posts-widget' ),
331
  'rand' => __( 'Random', 'flexible-posts-widget' ),
332
+ 'post__in' => __( 'Post ID Order', 'flexible-posts-widget' ),
333
  );
334
  $this->orders = array(
335
  'ASC' => __( 'Ascending', 'flexible-posts-widget' ),
356
  extract( $instance );
357
 
358
  include( $this->getTemplateHierarchy( 'admin' ) );
359
+
360
+ }
361
 
362
  /**
363
  * Loads theme files in appropriate hierarchy: 1) child theme,
386
  return apply_filters( 'dpe_fpw_template_' . $template, $file );
387
 
388
  }
389
+
390
+ /*--------------------------------------------------*/
391
+ /* Public Functions
392
+ /*--------------------------------------------------*/
393
+
394
  /**
395
+ * Loads the Widget's text domain for localization and translation.
396
  */
397
+ public function widget_textdomain() {
398
+
399
+ load_plugin_textdomain( $this->get_widget_slug(), false, plugin_dir_path( __FILE__ ) . 'languages/' );
400
+
401
+ } // end widget_textdomain
402
+
403
  /**
404
+ * Registers and enqueues admin-specific styles.
405
  */
406
+ public function register_admin_styles() {
407
+
408
+ wp_enqueue_style(
409
+ $this->get_widget_slug() . '-admin',
410
+ plugins_url( 'css/admin.css', __FILE__ ),
411
+ array(),
412
+ DPE_FP_Version
413
+ );
414
+
415
+ } // end register_admin_styles
416
+
417
+ /**
418
+ * Registers and enqueues admin-specific JavaScript.
419
+ */
420
+ public function register_admin_scripts() {
421
+
422
+ $source = 'js/admin.min.js';
423
+
424
+ if( SCRIPT_DEBUG ) {
425
+ $source = 'js/admin.js';
426
+ }
427
+
428
+ wp_enqueue_script(
429
+ $this->get_widget_slug() . '-admin',
430
+ plugins_url( $source, __FILE__ ),
431
+ array( 'jquery', 'jquery-ui-tabs' ),
432
+ DPE_FP_Version,
433
+ true
434
+ );
435
+
436
+ wp_localize_script( $this->get_widget_slug() . '-admin', 'fpwL10n', array(
437
+ 'gettingTerms' => __( 'Getting terms...', 'flexible-posts-widget' ),
438
+ 'selectTerms' => __( 'Select terms:', 'flexible-posts-widget' ),
439
+ 'noTermsFound' => __( 'No terms found.', 'flexible-posts-widget' ),
440
+ ) );
441
+
442
+ } // end register_admin_scripts
443
+
444
 
445
  /**
446
+ * Return a list of terms for the chosen taxonomy used via AJAX
447
  */
448
  public function terms_checklist( $term ) {
449
 
480
  }
481
 
482
  /**
483
+ * Return a list of post types via AJAX
484
  */
485
  public function posttype_checklist( $posttype ) {
486
 
499
 
500
 
501
  } // class DPE_Flexible_Posts_Widget
502
+
503
+
504
+ /**
505
+ * Initialize the widget on widgets_init
506
+ */
507
+ add_action( 'widgets_init', create_function( '', 'register_widget("DPE_Flexible_Posts_Widget");' ) );
js/admin.js CHANGED
@@ -4,8 +4,10 @@
4
  * Author: dpe415
5
  * URI: http://wordpress.org/extend/plugins/flexible-posts-widget/
6
  */
 
 
7
 
8
- jQuery(function($) {
9
 
10
  // Setup the show/hide thumbnails box
11
  jQuery('input.dpe-fp-thumbnail').each( function() {
@@ -17,14 +19,14 @@ jQuery(function($) {
17
  });
18
 
19
  // Enable the Get Em By tabs
20
- jQuery('.getembytabs').tabs({
21
  // Set the active tab to a widget option
22
- activate: function( event, ui ) {
23
- jQuery(this).find('.cur_tab').val( jQuery( this ).tabs( "option", "active" ) );
24
  },
25
  // retrieve the saved active tab and set it for the UI
26
- create: function( event, ui ) {
27
- jQuery( this ).tabs( "option", "active", jQuery(this).find('.cur_tab').val() );
28
  }
29
  });
30
 
@@ -32,20 +34,20 @@ jQuery(function($) {
32
 
33
  // Add the tabs functionality AJAX returns
34
  jQuery(document).ajaxComplete(function() {
35
- jQuery('.getembytabs').tabs({
36
  // Set the active tab to a widget option
37
- activate: function( event, ui ) {
38
- jQuery(this).find('.cur_tab').val( jQuery(this).tabs( "option", "active" ) );
39
  },
40
- // retrieve the saved active tab and set it for the UIß
41
- create: function( event, ui ) {
42
- jQuery(this).tabs( "option", "active", jQuery(this).find('.cur_tab').val() );
43
  }
44
  });
45
  });
46
 
47
  // Add event triggers to the show/hide thumbnails box
48
- jQuery('#widgets-right').on("change", 'input.dpe-fp-thumbnail', function(event) {
49
  if( this.checked ) {
50
  jQuery(this).parent().next().slideDown('fast');
51
  } else {
@@ -54,34 +56,33 @@ jQuery('#widgets-right').on("change", 'input.dpe-fp-thumbnail', function(event)
54
  });
55
 
56
  // Setup the get_terms callback
57
- jQuery('#widgets-right').on("change", 'select.dpe-fp-taxonomy', function(event) {
58
 
59
- var terms_div = jQuery(this).parent().nextAll('div.terms');
60
- var terms_label = jQuery(this).parent().next('label');
 
61
 
62
  // If we're not ignoring Taxonomy & Term...
63
- if( jQuery(this).val() != 'none' ) {
64
-
65
 
66
- terms_label.html(objectL10n.gettingTerms).show();
67
 
68
- var selected_terms = [];
69
- terms_div.find("input:checked").each(function () {
70
- selected_terms.push( jQuery(this).val() );
71
  });
72
 
73
- var data = {
74
  action: 'dpe_fp_get_terms',
75
  taxonomy: jQuery(this).val(),
76
- term: selected_terms,
77
  };
78
 
79
  jQuery.post(ajaxurl, data, function(response) {
80
  terms_div.html(response);
81
- terms_label.html(objectL10n.selectTerms).show();
82
  terms_div.slideDown();
83
  }).error( function() {
84
- terms_label.html(objectL10n.noTermsFound).show();
85
  });
86
 
87
  } else {
4
  * Author: dpe415
5
  * URI: http://wordpress.org/extend/plugins/flexible-posts-widget/
6
  */
7
+
8
+ /* global ajaxurl, fpwL10n */
9
 
10
+ jQuery(function() {
11
 
12
  // Setup the show/hide thumbnails box
13
  jQuery('input.dpe-fp-thumbnail').each( function() {
19
  });
20
 
21
  // Enable the Get Em By tabs
22
+ jQuery('.dpe-fp-widget .getembytabs').tabs({
23
  // Set the active tab to a widget option
24
+ activate: function() {
25
+ jQuery(this).find('.cur_tab').val( jQuery( this ).tabs( 'option', 'active' ) );
26
  },
27
  // retrieve the saved active tab and set it for the UI
28
+ create: function() {
29
+ jQuery( this ).tabs( 'option', 'active', jQuery(this).find('.cur_tab').val() );
30
  }
31
  });
32
 
34
 
35
  // Add the tabs functionality AJAX returns
36
  jQuery(document).ajaxComplete(function() {
37
+ jQuery('.dpe-fp-widget .getembytabs').tabs({
38
  // Set the active tab to a widget option
39
+ activate: function() {
40
+ jQuery(this).find('.cur_tab').val( jQuery(this).tabs( 'option', 'active' ) );
41
  },
42
+ // retrieve the saved active tab and set it for the UI
43
+ create: function() {
44
+ jQuery(this).tabs( 'option', 'active', jQuery(this).find('.cur_tab').val() );
45
  }
46
  });
47
  });
48
 
49
  // Add event triggers to the show/hide thumbnails box
50
+ jQuery('#widgets-right').on('change', 'input.dpe-fp-thumbnail', function() {
51
  if( this.checked ) {
52
  jQuery(this).parent().next().slideDown('fast');
53
  } else {
56
  });
57
 
58
  // Setup the get_terms callback
59
+ jQuery('#widgets-right').on('change', 'select.dpe-fp-taxonomy', function() {
60
 
61
+ var terms_div = jQuery(this).parent().nextAll('div.terms'),
62
+ terms_label = jQuery(this).parent().next('label'),
63
+ selected_terms = [], data = {};
64
 
65
  // If we're not ignoring Taxonomy & Term...
66
+ if( jQuery(this).val() !== 'none' ) {
 
67
 
68
+ terms_label.html(fpwL10n.gettingTerms).show();
69
 
70
+ terms_div.find('input:checked').each(function () {
71
+ selected_terms.push( jQuery(this).val() );
 
72
  });
73
 
74
+ data = {
75
  action: 'dpe_fp_get_terms',
76
  taxonomy: jQuery(this).val(),
77
+ term: selected_terms
78
  };
79
 
80
  jQuery.post(ajaxurl, data, function(response) {
81
  terms_div.html(response);
82
+ terms_label.html(fpwL10n.selectTerms).show();
83
  terms_div.slideDown();
84
  }).error( function() {
85
+ terms_label.html(fpwL10n.noTermsFound).show();
86
  });
87
 
88
  } else {
js/admin.min.js ADDED
@@ -0,0 +1 @@
 
1
+ jQuery(function(){jQuery("input.dpe-fp-thumbnail").each(function(){this.checked?jQuery(this).parent().next().slideDown("fast"):jQuery(this).parent().next().slideUp("fast")}),jQuery(".dpe-fp-widget .getembytabs").tabs({activate:function(){jQuery(this).find(".cur_tab").val(jQuery(this).tabs("option","active"))},create:function(){jQuery(this).tabs("option","active",jQuery(this).find(".cur_tab").val())}})}),jQuery(document).ajaxComplete(function(){jQuery(".dpe-fp-widget .getembytabs").tabs({activate:function(){jQuery(this).find(".cur_tab").val(jQuery(this).tabs("option","active"))},create:function(){jQuery(this).tabs("option","active",jQuery(this).find(".cur_tab").val())}})}),jQuery("#widgets-right").on("change","input.dpe-fp-thumbnail",function(){this.checked?jQuery(this).parent().next().slideDown("fast"):jQuery(this).parent().next().slideUp("fast")}),jQuery("#widgets-right").on("change","select.dpe-fp-taxonomy",function(){var terms_div=jQuery(this).parent().nextAll("div.terms"),terms_label=jQuery(this).parent().next("label"),selected_terms=[],data={};"none"!==jQuery(this).val()?(terms_label.html(fpwL10n.gettingTerms).show(),terms_div.find("input:checked").each(function(){selected_terms.push(jQuery(this).val())}),data={action:"dpe_fp_get_terms",taxonomy:jQuery(this).val(),term:selected_terms},jQuery.post(ajaxurl,data,function(response){terms_div.html(response),terms_label.html(fpwL10n.selectTerms).show(),terms_div.slideDown()}).error(function(){terms_label.html(fpwL10n.noTermsFound).show()})):(terms_div.slideUp().html(""),terms_label.hide())});
languages/flexible-posts-widget-ru_RU.mo ADDED
Binary file
languages/flexible-posts-widget-ru_RU.po ADDED
@@ -0,0 +1,189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2013 Flexible Posts Widget
2
+ # This file is distributed under the same license as the Flexible Posts Widget package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: Flexible Posts Widget 3.2\n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/flexible-posts-widget\n"
7
+ "POT-Creation-Date: 2013-10-21 14:34:24+00:00\n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=UTF-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2014-01-09 15:57+0400\n"
12
+ "Last-Translator: \n"
13
+ "Language-Team: LANGUAGE <LL@li.org>\n"
14
+ "X-Generator: Poedit 1.6.3\n"
15
+ "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
16
+ "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
17
+ "Language: ru_RU\n"
18
+
19
+ #: flexible-posts-widget.php:72
20
+ msgid "Display posts as widget items"
21
+ msgstr "Гибкое отображение записей в виджете"
22
+
23
+ #: flexible-posts-widget.php:86
24
+ msgid "Getting terms..."
25
+ msgstr "Загрузка данных..."
26
+
27
+ #: flexible-posts-widget.php:87 views/admin.php:50
28
+ msgid "Select terms:"
29
+ msgstr "Выберите значения:"
30
+
31
+ #: flexible-posts-widget.php:88 flexible-posts-widget.php:375
32
+ #: views/admin.php:68
33
+ msgid "No terms found."
34
+ msgstr "Нет данных."
35
+
36
+ #: flexible-posts-widget.php:184 flexible-posts-widget.php:273
37
+ msgid "Publish Date"
38
+ msgstr "Дата публикации"
39
+
40
+ #: flexible-posts-widget.php:185 flexible-posts-widget.php:274
41
+ msgid "Title"
42
+ msgstr "Заголовок"
43
+
44
+ #: flexible-posts-widget.php:186 flexible-posts-widget.php:275
45
+ msgid "Menu Order"
46
+ msgstr "Как в меню"
47
+
48
+ #: flexible-posts-widget.php:187 flexible-posts-widget.php:276
49
+ #: views/admin.php:31
50
+ msgid "Post ID"
51
+ msgstr "ID записи"
52
+
53
+ #: flexible-posts-widget.php:188 flexible-posts-widget.php:277
54
+ msgid "Author"
55
+ msgstr "Автор"
56
+
57
+ #: flexible-posts-widget.php:189 flexible-posts-widget.php:278
58
+ msgid "Post Slug"
59
+ msgstr "Ярлык записи"
60
+
61
+ #: flexible-posts-widget.php:190 flexible-posts-widget.php:279
62
+ msgid "Comment Count"
63
+ msgstr "Количество комментариев"
64
+
65
+ #: flexible-posts-widget.php:191 flexible-posts-widget.php:280
66
+ msgid "Random"
67
+ msgstr "Случайно"
68
+
69
+ #: flexible-posts-widget.php:194 flexible-posts-widget.php:283
70
+ msgid "Ascending"
71
+ msgstr "По возрастанию"
72
+
73
+ #: flexible-posts-widget.php:195 flexible-posts-widget.php:284
74
+ msgid "Descending"
75
+ msgstr "По убыванию"
76
+
77
+ #: views/admin.php:15
78
+ msgid "Widget title:"
79
+ msgstr "Заголовок виджета:"
80
+
81
+ #: views/admin.php:21
82
+ msgid "Get posts by"
83
+ msgstr "Выбирать записи по"
84
+
85
+ #: views/admin.php:29
86
+ msgid "Post Type"
87
+ msgstr "Тип поста"
88
+
89
+ #: views/admin.php:30
90
+ msgid "Taxonomy &amp; Term"
91
+ msgstr "Таксономия"
92
+
93
+ #: views/admin.php:30
94
+ msgid "Tax &amp; Term"
95
+ msgstr "Таксономия и ее значения"
96
+
97
+ #: views/admin.php:31
98
+ msgid "ID"
99
+ msgstr "ID поста"
100
+
101
+ #: views/admin.php:40
102
+ msgid "Select a taxonomy:"
103
+ msgstr "Выберите таксономию:"
104
+
105
+ #: views/admin.php:42
106
+ msgid "Ignore Taxonomy &amp; Term"
107
+ msgstr "Игнорировать данные таксономии"
108
+
109
+ #: views/admin.php:79
110
+ msgid "Comma-separated list of post IDs:"
111
+ msgstr "Список ID, разделенный запятыми"
112
+
113
+ #: views/admin.php:81
114
+ msgid "Will override settings on the Post Type and Taxonomy &amp; Term tabs."
115
+ msgstr "Настройки на вкладках Тип поста и Таксономия будут проигнорированы."
116
+
117
+ #: views/admin.php:81
118
+ msgid "See documentation."
119
+ msgstr "См. документацию."
120
+
121
+ #: views/admin.php:92
122
+ msgid "Display options"
123
+ msgstr "Настройки отображения"
124
+
125
+ #: views/admin.php:95
126
+ msgid "Ignore sticky posts?"
127
+ msgstr "Игнорировать прилепленные?"
128
+
129
+ #: views/admin.php:98
130
+ msgid "Number of posts to show:"
131
+ msgstr "Показать записей:"
132
+
133
+ #: views/admin.php:102
134
+ msgid "Number of posts to skip:"
135
+ msgstr "Пропустить записей:"
136
+
137
+ #: views/admin.php:106
138
+ msgid "Order posts by:"
139
+ msgstr "Сортировать по:"
140
+
141
+ #: views/admin.php:116
142
+ msgid "Order:"
143
+ msgstr "Порядок:"
144
+
145
+ #: views/admin.php:130
146
+ msgid "Display thumbnails?"
147
+ msgstr "Показывать изображения предпросмотра?"
148
+
149
+ #: views/admin.php:133
150
+ msgid "Select a thumbnail size to show:"
151
+ msgstr "Выберите размер миниатюры:"
152
+
153
+ #: views/admin.php:146
154
+ msgid "Template filename:"
155
+ msgstr "Имя файла шаблона:"
156
+
157
+ #: views/admin.php:149
158
+ msgid "See documentation for details."
159
+ msgstr "Для получения подробной информации см. документацию."
160
+
161
+ #: views/widget.php:39
162
+ msgid "No post found"
163
+ msgstr "Записи не найдены"
164
+
165
+ #. Plugin Name of the plugin/theme
166
+ msgid "Flexible Posts Widget"
167
+ msgstr ""
168
+
169
+ #. Plugin URI of the plugin/theme
170
+ msgid "http://wordpress.org/extend/plugins/flexible-posts-widget/"
171
+ msgstr ""
172
+
173
+ #. Description of the plugin/theme
174
+ msgid ""
175
+ "An advanced posts display widget with many options: get posts by post type "
176
+ "and taxonomy & term or by post ID; sorting & ordering; feature images; "
177
+ "custom templates and more."
178
+ msgstr ""
179
+ "Виджет для отображения записей с расширенными возможностями: выборка записей "
180
+ "по типу, данным таксономии или идентификаторам; тип и порядок сортировки; "
181
+ "отображение миниатюр; возможность изменения шаблонов и многое другое"
182
+
183
+ #. Author of the plugin/theme
184
+ msgid "dpe415"
185
+ msgstr ""
186
+
187
+ #. Author URI of the plugin/theme
188
+ msgid "http://dpedesign.com"
189
+ msgstr ""
license.txt ADDED
@@ -0,0 +1,339 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ GNU GENERAL PUBLIC LICENSE
2
+ Version 2, June 1991
3
+
4
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
5
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6
+ Everyone is permitted to copy and distribute verbatim copies
7
+ of this license document, but changing it is not allowed.
8
+
9
+ Preamble
10
+
11
+ The licenses for most software are designed to take away your
12
+ freedom to share and change it. By contrast, the GNU General Public
13
+ License is intended to guarantee your freedom to share and change free
14
+ software--to make sure the software is free for all its users. This
15
+ General Public License applies to most of the Free Software
16
+ Foundation's software and to any other program whose authors commit to
17
+ using it. (Some other Free Software Foundation software is covered by
18
+ the GNU Lesser General Public License instead.) You can apply it to
19
+ your programs, too.
20
+
21
+ When we speak of free software, we are referring to freedom, not
22
+ price. Our General Public Licenses are designed to make sure that you
23
+ have the freedom to distribute copies of free software (and charge for
24
+ this service if you wish), that you receive source code or can get it
25
+ if you want it, that you can change the software or use pieces of it
26
+ in new free programs; and that you know you can do these things.
27
+
28
+ To protect your rights, we need to make restrictions that forbid
29
+ anyone to deny you these rights or to ask you to surrender the rights.
30
+ These restrictions translate to certain responsibilities for you if you
31
+ distribute copies of the software, or if you modify it.
32
+
33
+ For example, if you distribute copies of such a program, whether
34
+ gratis or for a fee, you must give the recipients all the rights that
35
+ you have. You must make sure that they, too, receive or can get the
36
+ source code. And you must show them these terms so they know their
37
+ rights.
38
+
39
+ We protect your rights with two steps: (1) copyright the software, and
40
+ (2) offer you this license which gives you legal permission to copy,
41
+ distribute and/or modify the software.
42
+
43
+ Also, for each author's protection and ours, we want to make certain
44
+ that everyone understands that there is no warranty for this free
45
+ software. If the software is modified by someone else and passed on, we
46
+ want its recipients to know that what they have is not the original, so
47
+ that any problems introduced by others will not reflect on the original
48
+ authors' reputations.
49
+
50
+ Finally, any free program is threatened constantly by software
51
+ patents. We wish to avoid the danger that redistributors of a free
52
+ program will individually obtain patent licenses, in effect making the
53
+ program proprietary. To prevent this, we have made it clear that any
54
+ patent must be licensed for everyone's free use or not licensed at all.
55
+
56
+ The precise terms and conditions for copying, distribution and
57
+ modification follow.
58
+
59
+ GNU GENERAL PUBLIC LICENSE
60
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61
+
62
+ 0. This License applies to any program or other work which contains
63
+ a notice placed by the copyright holder saying it may be distributed
64
+ under the terms of this General Public License. The "Program", below,
65
+ refers to any such program or work, and a "work based on the Program"
66
+ means either the Program or any derivative work under copyright law:
67
+ that is to say, a work containing the Program or a portion of it,
68
+ either verbatim or with modifications and/or translated into another
69
+ language. (Hereinafter, translation is included without limitation in
70
+ the term "modification".) Each licensee is addressed as "you".
71
+
72
+ Activities other than copying, distribution and modification are not
73
+ covered by this License; they are outside its scope. The act of
74
+ running the Program is not restricted, and the output from the Program
75
+ is covered only if its contents constitute a work based on the
76
+ Program (independent of having been made by running the Program).
77
+ Whether that is true depends on what the Program does.
78
+
79
+ 1. You may copy and distribute verbatim copies of the Program's
80
+ source code as you receive it, in any medium, provided that you
81
+ conspicuously and appropriately publish on each copy an appropriate
82
+ copyright notice and disclaimer of warranty; keep intact all the
83
+ notices that refer to this License and to the absence of any warranty;
84
+ and give any other recipients of the Program a copy of this License
85
+ along with the Program.
86
+
87
+ You may charge a fee for the physical act of transferring a copy, and
88
+ you may at your option offer warranty protection in exchange for a fee.
89
+
90
+ 2. You may modify your copy or copies of the Program or any portion
91
+ of it, thus forming a work based on the Program, and copy and
92
+ distribute such modifications or work under the terms of Section 1
93
+ above, provided that you also meet all of these conditions:
94
+
95
+ a) You must cause the modified files to carry prominent notices
96
+ stating that you changed the files and the date of any change.
97
+
98
+ b) You must cause any work that you distribute or publish, that in
99
+ whole or in part contains or is derived from the Program or any
100
+ part thereof, to be licensed as a whole at no charge to all third
101
+ parties under the terms of this License.
102
+
103
+ c) If the modified program normally reads commands interactively
104
+ when run, you must cause it, when started running for such
105
+ interactive use in the most ordinary way, to print or display an
106
+ announcement including an appropriate copyright notice and a
107
+ notice that there is no warranty (or else, saying that you provide
108
+ a warranty) and that users may redistribute the program under
109
+ these conditions, and telling the user how to view a copy of this
110
+ License. (Exception: if the Program itself is interactive but
111
+ does not normally print such an announcement, your work based on
112
+ the Program is not required to print an announcement.)
113
+
114
+ These requirements apply to the modified work as a whole. If
115
+ identifiable sections of that work are not derived from the Program,
116
+ and can be reasonably considered independent and separate works in
117
+ themselves, then this License, and its terms, do not apply to those
118
+ sections when you distribute them as separate works. But when you
119
+ distribute the same sections as part of a whole which is a work based
120
+ on the Program, the distribution of the whole must be on the terms of
121
+ this License, whose permissions for other licensees extend to the
122
+ entire whole, and thus to each and every part regardless of who wrote it.
123
+
124
+ Thus, it is not the intent of this section to claim rights or contest
125
+ your rights to work written entirely by you; rather, the intent is to
126
+ exercise the right to control the distribution of derivative or
127
+ collective works based on the Program.
128
+
129
+ In addition, mere aggregation of another work not based on the Program
130
+ with the Program (or with a work based on the Program) on a volume of
131
+ a storage or distribution medium does not bring the other work under
132
+ the scope of this License.
133
+
134
+ 3. You may copy and distribute the Program (or a work based on it,
135
+ under Section 2) in object code or executable form under the terms of
136
+ Sections 1 and 2 above provided that you also do one of the following:
137
+
138
+ a) Accompany it with the complete corresponding machine-readable
139
+ source code, which must be distributed under the terms of Sections
140
+ 1 and 2 above on a medium customarily used for software interchange; or,
141
+
142
+ b) Accompany it with a written offer, valid for at least three
143
+ years, to give any third party, for a charge no more than your
144
+ cost of physically performing source distribution, a complete
145
+ machine-readable copy of the corresponding source code, to be
146
+ distributed under the terms of Sections 1 and 2 above on a medium
147
+ customarily used for software interchange; or,
148
+
149
+ c) Accompany it with the information you received as to the offer
150
+ to distribute corresponding source code. (This alternative is
151
+ allowed only for noncommercial distribution and only if you
152
+ received the program in object code or executable form with such
153
+ an offer, in accord with Subsection b above.)
154
+
155
+ The source code for a work means the preferred form of the work for
156
+ making modifications to it. For an executable work, complete source
157
+ code means all the source code for all modules it contains, plus any
158
+ associated interface definition files, plus the scripts used to
159
+ control compilation and installation of the executable. However, as a
160
+ special exception, the source code distributed need not include
161
+ anything that is normally distributed (in either source or binary
162
+ form) with the major components (compiler, kernel, and so on) of the
163
+ operating system on which the executable runs, unless that component
164
+ itself accompanies the executable.
165
+
166
+ If distribution of executable or object code is made by offering
167
+ access to copy from a designated place, then offering equivalent
168
+ access to copy the source code from the same place counts as
169
+ distribution of the source code, even though third parties are not
170
+ compelled to copy the source along with the object code.
171
+
172
+ 4. You may not copy, modify, sublicense, or distribute the Program
173
+ except as expressly provided under this License. Any attempt
174
+ otherwise to copy, modify, sublicense or distribute the Program is
175
+ void, and will automatically terminate your rights under this License.
176
+ However, parties who have received copies, or rights, from you under
177
+ this License will not have their licenses terminated so long as such
178
+ parties remain in full compliance.
179
+
180
+ 5. You are not required to accept this License, since you have not
181
+ signed it. However, nothing else grants you permission to modify or
182
+ distribute the Program or its derivative works. These actions are
183
+ prohibited by law if you do not accept this License. Therefore, by
184
+ modifying or distributing the Program (or any work based on the
185
+ Program), you indicate your acceptance of this License to do so, and
186
+ all its terms and conditions for copying, distributing or modifying
187
+ the Program or works based on it.
188
+
189
+ 6. Each time you redistribute the Program (or any work based on the
190
+ Program), the recipient automatically receives a license from the
191
+ original licensor to copy, distribute or modify the Program subject to
192
+ these terms and conditions. You may not impose any further
193
+ restrictions on the recipients' exercise of the rights granted herein.
194
+ You are not responsible for enforcing compliance by third parties to
195
+ this License.
196
+
197
+ 7. If, as a consequence of a court judgment or allegation of patent
198
+ infringement or for any other reason (not limited to patent issues),
199
+ conditions are imposed on you (whether by court order, agreement or
200
+ otherwise) that contradict the conditions of this License, they do not
201
+ excuse you from the conditions of this License. If you cannot
202
+ distribute so as to satisfy simultaneously your obligations under this
203
+ License and any other pertinent obligations, then as a consequence you
204
+ may not distribute the Program at all. For example, if a patent
205
+ license would not permit royalty-free redistribution of the Program by
206
+ all those who receive copies directly or indirectly through you, then
207
+ the only way you could satisfy both it and this License would be to
208
+ refrain entirely from distribution of the Program.
209
+
210
+ If any portion of this section is held invalid or unenforceable under
211
+ any particular circumstance, the balance of the section is intended to
212
+ apply and the section as a whole is intended to apply in other
213
+ circumstances.
214
+
215
+ It is not the purpose of this section to induce you to infringe any
216
+ patents or other property right claims or to contest validity of any
217
+ such claims; this section has the sole purpose of protecting the
218
+ integrity of the free software distribution system, which is
219
+ implemented by public license practices. Many people have made
220
+ generous contributions to the wide range of software distributed
221
+ through that system in reliance on consistent application of that
222
+ system; it is up to the author/donor to decide if he or she is willing
223
+ to distribute software through any other system and a licensee cannot
224
+ impose that choice.
225
+
226
+ This section is intended to make thoroughly clear what is believed to
227
+ be a consequence of the rest of this License.
228
+
229
+ 8. If the distribution and/or use of the Program is restricted in
230
+ certain countries either by patents or by copyrighted interfaces, the
231
+ original copyright holder who places the Program under this License
232
+ may add an explicit geographical distribution limitation excluding
233
+ those countries, so that distribution is permitted only in or among
234
+ countries not thus excluded. In such case, this License incorporates
235
+ the limitation as if written in the body of this License.
236
+
237
+ 9. The Free Software Foundation may publish revised and/or new versions
238
+ of the General Public License from time to time. Such new versions will
239
+ be similar in spirit to the present version, but may differ in detail to
240
+ address new problems or concerns.
241
+
242
+ Each version is given a distinguishing version number. If the Program
243
+ specifies a version number of this License which applies to it and "any
244
+ later version", you have the option of following the terms and conditions
245
+ either of that version or of any later version published by the Free
246
+ Software Foundation. If the Program does not specify a version number of
247
+ this License, you may choose any version ever published by the Free Software
248
+ Foundation.
249
+
250
+ 10. If you wish to incorporate parts of the Program into other free
251
+ programs whose distribution conditions are different, write to the author
252
+ to ask for permission. For software which is copyrighted by the Free
253
+ Software Foundation, write to the Free Software Foundation; we sometimes
254
+ make exceptions for this. Our decision will be guided by the two goals
255
+ of preserving the free status of all derivatives of our free software and
256
+ of promoting the sharing and reuse of software generally.
257
+
258
+ NO WARRANTY
259
+
260
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261
+ FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262
+ OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263
+ PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264
+ OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266
+ TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267
+ PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268
+ REPAIR OR CORRECTION.
269
+
270
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272
+ REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273
+ INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274
+ OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275
+ TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276
+ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277
+ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278
+ POSSIBILITY OF SUCH DAMAGES.
279
+
280
+ END OF TERMS AND CONDITIONS
281
+
282
+ How to Apply These Terms to Your New Programs
283
+
284
+ If you develop a new program, and you want it to be of the greatest
285
+ possible use to the public, the best way to achieve this is to make it
286
+ free software which everyone can redistribute and change under these terms.
287
+
288
+ To do so, attach the following notices to the program. It is safest
289
+ to attach them to the start of each source file to most effectively
290
+ convey the exclusion of warranty; and each file should have at least
291
+ the "copyright" line and a pointer to where the full notice is found.
292
+
293
+ {description}
294
+ Copyright (C) {year} {fullname}
295
+
296
+ This program is free software; you can redistribute it and/or modify
297
+ it under the terms of the GNU General Public License as published by
298
+ the Free Software Foundation; either version 2 of the License, or
299
+ (at your option) any later version.
300
+
301
+ This program is distributed in the hope that it will be useful,
302
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
303
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304
+ GNU General Public License for more details.
305
+
306
+ You should have received a copy of the GNU General Public License along
307
+ with this program; if not, write to the Free Software Foundation, Inc.,
308
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
309
+
310
+ Also add information on how to contact you by electronic and paper mail.
311
+
312
+ If the program is interactive, make it output a short notice like this
313
+ when it starts in an interactive mode:
314
+
315
+ Gnomovision version 69, Copyright (C) year name of author
316
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
317
+ This is free software, and you are welcome to redistribute it
318
+ under certain conditions; type `show c' for details.
319
+
320
+ The hypothetical commands `show w' and `show c' should show the appropriate
321
+ parts of the General Public License. Of course, the commands you use may
322
+ be called something other than `show w' and `show c'; they could even be
323
+ mouse-clicks or menu items--whatever suits your program.
324
+
325
+ You should also get your employer (if you work as a programmer) or your
326
+ school, if any, to sign a "copyright disclaimer" for the program, if
327
+ necessary. Here is a sample; alter the names:
328
+
329
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
330
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
331
+
332
+ {signature of Ty Coon}, 1 April 1989
333
+ Ty Coon, President of Vice
334
+
335
+ This General Public License does not permit incorporating your program into
336
+ proprietary programs. If your program is a subroutine library, you may
337
+ consider it more useful to permit linking proprietary applications with the
338
+ library. If this is what you want to do, use the GNU Lesser General
339
+ Public License instead of this License.
readme.html ADDED
@@ -0,0 +1,271 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <h1>Flexible Posts Widget</h1>
2
+
3
+ <p><strong>Contributors:</strong> dpe415<br/>
4
+ <strong>Donate link:</strong> https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=DJKSKHJWYAWDU<br/>
5
+ <strong>Tags:</strong> widget, widgets, posts, categories, tags, recent posts, thumbnails, custom post types, custom taxonomies, feature image<br/>
6
+ <strong>Requires at least:</strong> 3.2<br/>
7
+ <strong>Tested up to:</strong> 3.9<br/>
8
+ <strong>Stable tag:</strong> 3.3
9
+ <strong>License:</strong> GPL2 or later<br/>
10
+ <strong>License URI:</strong> http://www.gnu.org/licenses/gpl-2.0.html</p>
11
+
12
+ <p>An advanced posts display widget with many options. Display posts in your sidebars any way you&rsquo;d like!</p>
13
+
14
+ <h2>Description</h2>
15
+
16
+ <p>The default Recent Posts widget is exceptionally basic. I always find myself in need of a way to easily display a selection of posts from any combination post type or taxonomy. Hence, Flexible Post Widget.</p>
17
+
18
+ <p>Flexible Posts Widget (FPW) is more than just a simple alternative to the default Recent Posts widget. With many per-instance options it is highly customizable and allows advanced users to display the resulting posts virtually any way imaginable.</p>
19
+
20
+ <h3>Features &amp; options</h3>
21
+
22
+ <ul>
23
+ <li>Customizable widget title</li>
24
+ <li>Get posts by post type(s) and/or taxonomy &amp; term(s) or directly by a list of post IDs.</li>
25
+ <li>Control the number of posts displayed and the number of posts to offset.</li>
26
+ <li>Option to display the post feature image.</li>
27
+ <li>Select the post feature image size to display from existing image sizes: thumbnail, medium, large, post-thumbnail or any size defined by the current theme.</li>
28
+ <li>Order posts by: date, ID, title, menu order, random, Post ID Order; and sort posts: ascending or descending.</li>
29
+ <li>Each widget&rsquo;s output can be customized by user-defined templates added to the current theme folder.</li>
30
+ </ul>
31
+
32
+
33
+ <h3>Supported Languages</h3>
34
+
35
+ <ul>
36
+ <li>English</li>
37
+ <li>Italian</li>
38
+ <li>Polish</li>
39
+ <li>Russian</li>
40
+ <li>Spanish</li>
41
+ </ul>
42
+
43
+
44
+ <h2>Installation</h2>
45
+
46
+ <ol>
47
+ <li>Upload the <code>flexible-posts-widget</code> folder to the <code>/wp-content/plugins/</code> directory.</li>
48
+ <li>Activate the plugin through the &lsquo;Plugins&rsquo; menu in WordPress.</li>
49
+ <li>Go to &lsquo;Appearance&rsquo; > &lsquo;Widgets&rsquo; and place the widget into a sidebar to configure it.</li>
50
+ </ol>
51
+
52
+
53
+ <h3>To use a custom HTML output template</h3>
54
+
55
+ <ol>
56
+ <li>Create a folder called <code>flexible-posts-widget</code> in the root of your theme folder.</li>
57
+ <li>Copy <code>widget.php</code> from within the plugin&rsquo;s <code>views</code> folder into your theme&rsquo;s new <code>flexible-posts-widget</code> folder.</li>
58
+ <li>Optional: Rename your theme&rsquo;s <code>widget.php</code> template file to a name of your choice (to use different templates for each widget instance).</li>
59
+ <li>Go to &lsquo;Appearance&rsquo; > &lsquo;Widgets&rsquo; in WordPress to configure an instance of the widget.</li>
60
+ <li>In the &lsquo;Template Filename&rsquo; field enter the name of the template file you added to your theme. Example: <code>my-themes-widget.php</code></li>
61
+ </ol>
62
+
63
+
64
+ <h2>Frequently Asked Questions</h2>
65
+
66
+ <h3>How does the &ldquo;Comma-separated list of post IDs&rdquo; work?</h3>
67
+
68
+ <p>The third option (tab) available for getting posts is directly with a list of post IDs. If there is a value in this field, any settings in the &ldquo;Post Type&rdquo; or &ldquo;Taxonomy &amp; Term&rdquo; tabs will be ignored and all public post types will be queried for the specific post IDs provided. All the other widget options (Display, Thumbnails and Template settings) will still be applied.</p>
69
+
70
+ <h3>How do I find a post&rsquo;s ID?</h3>
71
+
72
+ <p>Per a <a href="http://wordpress.org/support/topic/where-can-find-the-post-id">WordPress support thread</a>:</p>
73
+
74
+ <p>Go to Posts in your WordPress admin, and click the post you need the ID of. Then, if you look in the address bar of your browser, you&rsquo;ll see something like this:</p>
75
+
76
+ <p><code>http://example.com/wp-admin/post.php?post=1280&amp;action=edit</code></p>
77
+
78
+ <p>The number, in this case 1280, is the post ID.</p>
79
+
80
+ <h3>How can I display custom fields (custom meta values) with FPW?</h3>
81
+
82
+ <p>You&rsquo;ll want to create a custom HTML template by following <a href="http://wordpress.org/extend/plugins/flexible-posts-widget/installation/" title="View instructions for creating custom FPW templates">the instructions</a> and then you can use the standard WordPress <a href="http://codex.wordpress.org/Custom_Fields" title="View custom field functions on the WordPress Codex">Custom Field</a> functions the same way you would if you were editing your theme&rsquo;s other template files.</p>
83
+
84
+ <p>A simple code example for a custom field named &ldquo;test_field&rdquo; <em>might</em> look like the following:
85
+ <code>$test_field_value = get_post_meta( get_the_ID(), 'test_field', true );
86
+ echo $test_field_value;</code></p>
87
+
88
+ <h3>How can I style the images, titles or other widget output a certain way?</h3>
89
+
90
+ <p>FPW intentionally does NOT add any styling of it&rsquo;s own. To adjust the font size, color, alignment, image size, etc. of any output from this widget, you&rsquo;ll need to edit your theme&rsquo;s styles.</p>
91
+
92
+ <h3>Does this plugin/widget insert any styles or scripts into my site?</h3>
93
+
94
+ <p>FPW does not add styles or scripts to your public theme. The plugin is intentionally designed to work within your existing theme. FPW does add one stylesheet and one JavaScript to the Widgets page in wp-admin to help with the administration of any FPWs in use.</p>
95
+
96
+ <h3>Want to add support for another language?</h3>
97
+
98
+ <p>I&rsquo;d love to support more languages. The plugin&rsquo;s POT file is available with the download. Feel free to post PO &amp; MO files for your language to a <a href="http://wordpress.org/tags/flexible-posts-widget/">new forum thread</a> and I&rsquo;ll get them added to the plugin.</p>
99
+
100
+ <h3>Questions, Support &amp; Bug Reports</h3>
101
+
102
+ <p>To get answers to your questions, request help or submit a bug report, please start a <a href="http://wordpress.org/tags/flexible-posts-widget/">new forum thread</a>.</p>
103
+
104
+ <h2>Upgrade Notice</h2>
105
+
106
+ <p>When upgrading from one major version to another (version 1.x to version 2.x to version 3.x, etc), please remember to verify your settings for any existing widgets. Not all settings combinations will be saved after a major release upgrade.</p>
107
+
108
+ <h2>Other Notes</h2>
109
+
110
+ <h3>Upgrading from one major version to another</h3>
111
+
112
+ <p>When upgrading between major releases (version 1.x to version 2.x to version 3.x, etc), please remember to verify your settings for any existing widgets. Not all settings combinations will be saved after a major release upgrade.</p>
113
+
114
+ <h3>Default vs. Custom Templates</h3>
115
+
116
+ <p>FPW comes with a default template for the widget output. If you would like to alter the widget display code, create a new folder called <code>flexible-posts-widget</code> in your template directory and copy over the &ldquo;views/widget.php&rdquo; file.</p>
117
+
118
+ <p>Edit the new file in your theme to your desired HTML layout. Please do not edit the one in the plugin folder as that will cause conflicts when you update the plugin to the latest release.</p>
119
+
120
+ <h3>Future updates &amp; feature requests list</h3>
121
+
122
+ <ul>
123
+ <li>Dynamically populate the &ldquo;Template Filename&rdquo; field based on the templates available.</li>
124
+ <li>Add shortcode functionality.</li>
125
+ </ul>
126
+
127
+
128
+ <h2>Changelog</h2>
129
+
130
+ <h3>3.3</h3>
131
+
132
+ <ul>
133
+ <li>Refactored the PHP Class to encapsulate the plugin.</li>
134
+ <li>Added the ability to sort posts by &ldquo;Post ID Order&rdquo;. Useful when getting posts using the ID tab (<code>post__in</code>). (Props: @cinus89)</li>
135
+ <li>Added Russian translation. (Props: @mizhgun)</li>
136
+ <li>Tested To bump for WordPress 3.9 support.</li>
137
+ </ul>
138
+
139
+
140
+ <h3>3.2.2</h3>
141
+
142
+ <ul>
143
+ <li>Version bump for WordPress 3.8 support</li>
144
+ </ul>
145
+
146
+
147
+ <h3>3.2.1</h3>
148
+
149
+ <ul>
150
+ <li>Added Italian language support. (Props: @adriano-esposito)</li>
151
+ </ul>
152
+
153
+
154
+ <h3>3.2</h3>
155
+
156
+ <ul>
157
+ <li>Added option to ignore sticky posts.</li>
158
+ <li>Added support to get post by post ID directly.</li>
159
+ <li>Added Polish language support. (Props: @Invens)</li>
160
+ <li>Added a few filters: <code>dpe_fpw_args</code> to filter the query vars before submitting the query and <code>'dpe_fpw_template_' . [$template_name]</code> to filter the selected template.</li>
161
+ </ul>
162
+
163
+
164
+ <h3>3.1.2</h3>
165
+
166
+ <ul>
167
+ <li>Fixed several pesky PHP notices. (Props: @eeb1)</li>
168
+ </ul>
169
+
170
+
171
+ <h3>3.1.1</h3>
172
+
173
+ <ul>
174
+ <li>Fixed incorrect use of rtrim in getTemplateHierarchy when getting custom template files. (Props: @mortenf)</li>
175
+ </ul>
176
+
177
+
178
+ <h3>3.1</h3>
179
+
180
+ <ul>
181
+ <li>Internationalized and added Spanish language support. (Props: @elarequi)</li>
182
+ <li>Added support for Media post types with &ldquo;image/&rdquo; mime types to be displayed directly in the default template.</li>
183
+ </ul>
184
+
185
+
186
+ <h3>3.0.2</h3>
187
+
188
+ <ul>
189
+ <li>Bug fix: Added a check to make sure both taxonomy &amp; term are set for tax queries.</li>
190
+ </ul>
191
+
192
+
193
+ <h3>3.0.1</h3>
194
+
195
+ <ul>
196
+ <li>Bug fix: Not able to get all registered post types &amp; taxonomies until after widget init. Had to reorder some code.</li>
197
+ <li>Bug fix: when getting post types for display in widget admin. (Props: @angelfish276)</li>
198
+ </ul>
199
+
200
+
201
+ <h3>3.0</h3>
202
+
203
+ <ul>
204
+ <li>Allow widgets to query by post type and/or taxonomy &amp; term instead of just one or the other. (Props: @vernal)</li>
205
+ <li>Allow widgets to query by multiple post types and multiple terms within the same taxonomy. (Props: @vernal)</li>
206
+ <li>Changed the list of available post types and taxonomies from every possible option to just those that are public.</li>
207
+ <li>General UI enhancements for the widget admin.</li>
208
+ <li>Some minor code cleanup and security improvements.</li>
209
+ </ul>
210
+
211
+
212
+ <h3>2.1.1</h3>
213
+
214
+ <ul>
215
+ <li>Fixed a source order bug in the widget.php template file. (Props: @carstenbach).</li>
216
+ </ul>
217
+
218
+
219
+ <h3>2.1</h3>
220
+
221
+ <ul>
222
+ <li>Added offset parameter to display options.</li>
223
+ </ul>
224
+
225
+
226
+ <h3>2.0</h3>
227
+
228
+ <ul>
229
+ <li><em>Upgrade notice:</em> When upgrading from v1.x.x to v2.x, remember to double-check the settings for any existing widgets.</li>
230
+ <li>Dynamically populate available terms based on selected taxonomy.</li>
231
+ <li>Make the &ldquo;Get Posts By&rdquo; section selectable and only show the chosen method: Taxonomy &amp; Term or Post Type.</li>
232
+ <li>Miscellaneous admin improvements.</li>
233
+ </ul>
234
+
235
+
236
+ <h3>1.0.5</h3>
237
+
238
+ <ul>
239
+ <li>Bug fix: Removed post_status &lsquo;private&rsquo; from wp_queries. We don&rsquo;t want to show private posts in our loops.</li>
240
+ </ul>
241
+
242
+
243
+ <h3>1.0.4</h3>
244
+
245
+ <ul>
246
+ <li>Fixed an issue where post thumbnails aren&rsquo;t displaying.</li>
247
+ </ul>
248
+
249
+
250
+ <h3>1.0.3</h3>
251
+
252
+ <ul>
253
+ <li>Fixed PHP notices that showed in the admin when WP_DEBUG is enabled</li>
254
+ <li>Added some stub code for future admin JavaScripts (not active yet).</li>
255
+ <li>Readme.txt updates</li>
256
+ </ul>
257
+
258
+
259
+ <h3>1.0.2</h3>
260
+
261
+ <ul>
262
+ <li>Readme.txt updates</li>
263
+ </ul>
264
+
265
+
266
+ <h3>1.0</h3>
267
+
268
+ <ul>
269
+ <li>First public release</li>
270
+ </ul>
271
+
readme.md ADDED
@@ -0,0 +1,172 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Flexible Posts Widget #
2
+ **Contributors:** dpe415
3
+ **Donate link:** https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=DJKSKHJWYAWDU
4
+ **Tags:** widget, widgets, posts, categories, tags, recent posts, thumbnails, custom post types, custom taxonomies, feature image
5
+ **Requires at least:** 3.2
6
+ **Tested up to:** 3.9
7
+ **Stable tag:** 3.3
8
+ **License:** GPL2 or later
9
+ **License URI:** http://www.gnu.org/licenses/gpl-2.0.html
10
+
11
+ An advanced posts display widget with many options. Display posts in your sidebars any way you'd like!
12
+
13
+ ## Description ##
14
+ The default Recent Posts widget is exceptionally basic. I always find myself in need of a way to easily display a selection of posts from any combination post type or taxonomy. Hence, Flexible Post Widget.
15
+
16
+ Flexible Posts Widget (FPW) is more than just a simple alternative to the default Recent Posts widget. With many per-instance options it is highly customizable and allows advanced users to display the resulting posts virtually any way imaginable.
17
+
18
+ ### Features & options ###
19
+ * Customizable widget title
20
+ * Get posts by post type(s) and/or taxonomy & term(s) or directly by a list of post IDs.
21
+ * Control the number of posts displayed and the number of posts to offset.
22
+ * Option to display the post feature image.
23
+ * Select the post feature image size to display from existing image sizes: thumbnail, medium, large, post-thumbnail or any size defined by the current theme.
24
+ * Order posts by: date, ID, title, menu order, random, Post ID Order; and sort posts: ascending or descending.
25
+ * Each widget's output can be customized by user-defined templates added to the current theme folder.
26
+
27
+ ### Supported Languages ###
28
+ * English
29
+ * Italian
30
+ * Polish
31
+ * Russian
32
+ * Spanish
33
+
34
+
35
+ ## Installation ##
36
+ 1. Upload the `flexible-posts-widget` folder to the `/wp-content/plugins/` directory.
37
+ 1. Activate the plugin through the 'Plugins' menu in WordPress.
38
+ 1. Go to 'Appearance' > 'Widgets' and place the widget into a sidebar to configure it.
39
+
40
+ ### To use a custom HTML output template ###
41
+ 1. Create a folder called `flexible-posts-widget` in the root of your theme folder.
42
+ 1. Copy `widget.php` from within the plugin's `views` folder into your theme's new `flexible-posts-widget` folder.
43
+ 1. Optional: Rename your theme's `widget.php` template file to a name of your choice (to use different templates for each widget instance).
44
+ 1. Go to 'Appearance' > 'Widgets' in WordPress to configure an instance of the widget.
45
+ 1. In the 'Template Filename' field enter the name of the template file you added to your theme. Example: `my-themes-widget.php`
46
+
47
+
48
+ ## Frequently Asked Questions ##
49
+
50
+ ### How does the "Comma-separated list of post IDs" work? ###
51
+ The third option (tab) available for getting posts is directly with a list of post IDs. If there is a value in this field, any settings in the "Post Type" or "Taxonomy & Term" tabs will be ignored and all public post types will be queried for the specific post IDs provided. All the other widget options (Display, Thumbnails and Template settings) will still be applied.
52
+
53
+ ### How do I find a post's ID? ###
54
+ Per a [WordPress support thread](http://wordpress.org/support/topic/where-can-find-the-post-id):
55
+
56
+ Go to Posts in your WordPress admin, and click the post you need the ID of. Then, if you look in the address bar of your browser, you'll see something like this:
57
+
58
+ `http://example.com/wp-admin/post.php?post=1280&action=edit`
59
+
60
+ The number, in this case 1280, is the post ID.
61
+
62
+ ### How can I display custom fields (custom meta values) with FPW? ###
63
+ You'll want to create a custom HTML template by following [the instructions](http://wordpress.org/extend/plugins/flexible-posts-widget/installation/ "View instructions for creating custom FPW templates") and then you can use the standard WordPress [Custom Field](http://codex.wordpress.org/Custom_Fields "View custom field functions on the WordPress Codex") functions the same way you would if you were editing your theme's other template files.
64
+
65
+ A simple code example for a custom field named "test_field" _might_ look like the following:
66
+ `$test_field_value = get_post_meta( get_the_ID(), 'test_field', true );
67
+ echo $test_field_value;`
68
+
69
+ ### How can I style the images, titles or other widget output a certain way? ###
70
+ FPW intentionally does NOT add any styling of it's own. To adjust the font size, color, alignment, image size, etc. of any output from this widget, you'll need to edit your theme's styles.
71
+
72
+ ### Does this plugin/widget insert any styles or scripts into my site? ###
73
+ FPW does not add styles or scripts to your public theme. The plugin is intentionally designed to work within your existing theme. FPW does add one stylesheet and one JavaScript to the Widgets page in wp-admin to help with the administration of any FPWs in use.
74
+
75
+ ### Want to add support for another language? ###
76
+ I'd love to support more languages. The plugin's POT file is available with the download. Feel free to post PO & MO files for your language to a [new forum thread](http://wordpress.org/tags/flexible-posts-widget/) and I'll get them added to the plugin.
77
+
78
+ ### Questions, Support & Bug Reports ###
79
+ To get answers to your questions, request help or submit a bug report, please start a [new forum thread](http://wordpress.org/tags/flexible-posts-widget/).
80
+
81
+
82
+
83
+ ## Upgrade Notice ##
84
+ When upgrading from one major version to another (version 1.x to version 2.x to version 3.x, etc), please remember to verify your settings for any existing widgets. Not all settings combinations will be saved after a major release upgrade.
85
+
86
+
87
+ ## Other Notes ##
88
+ ### Upgrading from one major version to another ###
89
+ When upgrading between major releases (version 1.x to version 2.x to version 3.x, etc), please remember to verify your settings for any existing widgets. Not all settings combinations will be saved after a major release upgrade.
90
+
91
+ ### Default vs. Custom Templates ###
92
+ FPW comes with a default template for the widget output. If you would like to alter the widget display code, create a new folder called `flexible-posts-widget` in your template directory and copy over the "views/widget.php" file.
93
+
94
+ Edit the new file in your theme to your desired HTML layout. Please do not edit the one in the plugin folder as that will cause conflicts when you update the plugin to the latest release.
95
+
96
+ ### Future updates & feature requests list ###
97
+ * Dynamically populate the "Template Filename" field based on the templates available.
98
+ * Add shortcode functionality.
99
+
100
+
101
+ ## Changelog ##
102
+
103
+ ### 3.3 ###
104
+ * Refactored the PHP Class to encapsulate the plugin.
105
+ * Added the ability to sort posts by "Post ID Order". Useful when getting posts using the ID tab (`post__in`). (Props: @cinus89)
106
+ * Added Russian translation. (Props: @mizhgun)
107
+ * Tested To bump for WordPress 3.9 support.
108
+
109
+ ### 3.2.2 ###
110
+ * Version bump for WordPress 3.8 support
111
+
112
+ ### 3.2.1 ###
113
+ * Added Italian language support. (Props: @adriano-esposito)
114
+
115
+ ### 3.2 ###
116
+ * Added option to ignore sticky posts.
117
+ * Added support to get post by post ID directly.
118
+ * Added Polish language support. (Props: @Invens)
119
+ * Added a few filters: `dpe_fpw_args` to filter the query vars before submitting the query and `'dpe_fpw_template_' . [$template_name]` to filter the selected template.
120
+
121
+ ### 3.1.2 ###
122
+ * Fixed several pesky PHP notices. (Props: @eeb1)
123
+
124
+ ### 3.1.1 ###
125
+ * Fixed incorrect use of rtrim in getTemplateHierarchy when getting custom template files. (Props: @mortenf)
126
+
127
+ ### 3.1 ###
128
+ * Internationalized and added Spanish language support. (Props: @elarequi)
129
+ * Added support for Media post types with "image/" mime types to be displayed directly in the default template.
130
+
131
+ ### 3.0.2 ###
132
+ * Bug fix: Added a check to make sure both taxonomy & term are set for tax queries.
133
+
134
+ ### 3.0.1 ###
135
+ * Bug fix: Not able to get all registered post types & taxonomies until after widget init. Had to reorder some code.
136
+ * Bug fix: when getting post types for display in widget admin. (Props: @angelfish276)
137
+
138
+ ### 3.0 ###
139
+ * Allow widgets to query by post type and/or taxonomy & term instead of just one or the other. (Props: @vernal)
140
+ * Allow widgets to query by multiple post types and multiple terms within the same taxonomy. (Props: @vernal)
141
+ * Changed the list of available post types and taxonomies from every possible option to just those that are public.
142
+ * General UI enhancements for the widget admin.
143
+ * Some minor code cleanup and security improvements.
144
+
145
+ ### 2.1.1 ###
146
+ * Fixed a source order bug in the widget.php template file. (Props: @carstenbach).
147
+
148
+ ### 2.1 ###
149
+ * Added offset parameter to display options.
150
+
151
+ ### 2.0 ###
152
+ * *Upgrade notice:* When upgrading from v1.x.x to v2.x, remember to double-check the settings for any existing widgets.
153
+ * Dynamically populate available terms based on selected taxonomy.
154
+ * Make the "Get Posts By" section selectable and only show the chosen method: Taxonomy & Term or Post Type.
155
+ * Miscellaneous admin improvements.
156
+
157
+ ### 1.0.5 ###
158
+ * Bug fix: Removed post_status 'private' from wp_queries. We don't want to show private posts in our loops.
159
+
160
+ ### 1.0.4 ###
161
+ * Fixed an issue where post thumbnails aren't displaying.
162
+
163
+ ### 1.0.3 ###
164
+ * Fixed PHP notices that showed in the admin when WP_DEBUG is enabled
165
+ * Added some stub code for future admin JavaScripts (not active yet).
166
+ * Readme.txt updates
167
+
168
+ ### 1.0.2 ###
169
+ * Readme.txt updates
170
+
171
+ ### 1.0 ###
172
+ * First public release
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, categories, tags, recent posts, thumbnails, custom post types, custom taxonomies, feature image
5
  Requires at least: 3.2
6
- Tested up to: 3.8
7
- Stable tag: 3.2.2
8
  License: GPL2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -13,9 +13,7 @@ An advanced posts display widget with many options. Display posts in your sideba
13
  == Description ==
14
  The default Recent Posts widget is exceptionally basic. I always find myself in need of a way to easily display a selection of posts from any combination post type or taxonomy. Hence, Flexible Post Widget.
15
 
16
- Flexible Posts Widget (FPW) is more than just a simple alternative to the default Recent Posts widget. With many per-instance options it is highly customizable and allows advanced users to display the resulting posts virtually any way imaginable.
17
-
18
- Version 3.0 is a major enhancement as widgets can now get posts by *both* post type and/or taxonomy & term as well as select *multiple* post types and terms. Previous versions of the plugin only allowed post type *or* taxonomy & term queries, not both.
19
 
20
  = Features & options =
21
  * Customizable widget title
@@ -23,13 +21,14 @@ Version 3.0 is a major enhancement as widgets can now get posts by *both* post t
23
  * Control the number of posts displayed and the number of posts to offset.
24
  * Option to display the post feature image.
25
  * Select the post feature image size to display from existing image sizes: thumbnail, medium, large, post-thumbnail or any size defined by the current theme.
26
- * Order posts by: date, ID, title, menu order, random; and sort posts: ascending or descending.
27
  * Each widget's output can be customized by user-defined templates added to the current theme folder.
28
 
29
  = Supported Languages =
30
  * English
31
  * Italian
32
  * Polish
 
33
  * Spanish
34
 
35
 
@@ -109,6 +108,14 @@ Edit the new file in your theme to your desired HTML layout. Please do not edit
109
 
110
  == Changelog ==
111
 
 
 
 
 
 
 
 
 
112
 
113
  = 3.2.1 =
114
  * Added Italian language support. (Props: @adriano-esposito)
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=DJKSKHJWYAWDU
4
  Tags: widget, widgets, posts, categories, tags, recent posts, thumbnails, custom post types, custom taxonomies, feature image
5
  Requires at least: 3.2
6
+ Tested up to: 3.9
7
+ Stable tag: 3.3
8
  License: GPL2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
13
  == Description ==
14
  The default Recent Posts widget is exceptionally basic. I always find myself in need of a way to easily display a selection of posts from any combination post type or taxonomy. Hence, Flexible Post Widget.
15
 
16
+ Flexible Posts Widget (FPW) is more than just a simple alternative to the default Recent Posts widget. With many per-instance options it is highly customizable and allows advanced users to display the resulting posts virtually any way imaginable.
 
 
17
 
18
  = Features & options =
19
  * Customizable widget title
21
  * Control the number of posts displayed and the number of posts to offset.
22
  * Option to display the post feature image.
23
  * Select the post feature image size to display from existing image sizes: thumbnail, medium, large, post-thumbnail or any size defined by the current theme.
24
+ * Order posts by: date, ID, title, menu order, random, Post ID Order; and sort posts: ascending or descending.
25
  * Each widget's output can be customized by user-defined templates added to the current theme folder.
26
 
27
  = Supported Languages =
28
  * English
29
  * Italian
30
  * Polish
31
+ * Russian
32
  * Spanish
33
 
34
 
108
 
109
  == Changelog ==
110
 
111
+ = 3.3 =
112
+ * Refactored the PHP Class to encapsulate the plugin.
113
+ * Added the ability to sort posts by "Post ID Order". Useful when getting posts using the ID tab (`post__in`). (Props: @cinus89)
114
+ * Added Russian translation. (Props: @mizhgun)
115
+ * Tested To bump for WordPress 3.9 support.
116
+
117
+ = 3.2.2 =
118
+ * Version bump for WordPress 3.8 support
119
 
120
  = 3.2.1 =
121
  * Added Italian language support. (Props: @adriano-esposito)