Content Blocks (Custom Post Widget) - Version 2.3.5

Version Description

Added the option to use your own widget template file as suggested by flynsarmy. See http://wordpress.org/support/topic/patch-custom-widget-frontends?replies=1 for more information.

Download this release

Release Info

Developer vanderwijk
Plugin Icon 128x128 Content Blocks (Custom Post Widget)
Version 2.3.5
Comparing to
See all releases

Code changes from version 2.3.4 to 2.3.5

Files changed (3) hide show
  1. custom-post-widget.php +2 -2
  2. post-widget.php +5 -0
  3. readme.txt +5 -11
custom-post-widget.php CHANGED
@@ -3,12 +3,12 @@
3
  Plugin Name: Custom Post Widget
4
  Plugin URI: http://www.vanderwijk.com/wordpress/wordpress-custom-post-widget/
5
  Description: Show the content of a custom post of the type 'content_block' in a widget or with a shortcode.
6
- Version: 2.3.4
7
  Author: Johan van der Wijk
8
  Author URI: http://www.vanderwijk.com
9
  License: GPL2
10
 
11
- Release notes: Version 2.3.4 Added pt_BR translation file
12
 
13
  Copyright 2013 Johan van der Wijk (email: info@vanderwijk.com)
14
 
3
  Plugin Name: Custom Post Widget
4
  Plugin URI: http://www.vanderwijk.com/wordpress/wordpress-custom-post-widget/
5
  Description: Show the content of a custom post of the type 'content_block' in a widget or with a shortcode.
6
+ Version: 2.3.5
7
  Author: Johan van der Wijk
8
  Author URI: http://www.vanderwijk.com
9
  License: GPL2
10
 
11
+ Release notes: Version 2.3.5 You can now use your own template for displaying the widget content
12
 
13
  Copyright 2013 Johan van der Wijk (email: info@vanderwijk.com)
14
 
post-widget.php CHANGED
@@ -92,6 +92,11 @@ class custom_post_widget extends WP_Widget {
92
  $apply_content_filters = isset($instance['apply_content_filters']) ? $instance['apply_content_filters'] : false;
93
  $content_post = get_post($custom_post_id);
94
  $content = $content_post->post_content;
 
 
 
 
 
95
  if ( !$apply_content_filters ) { // Don't apply the content filter if checkbox selected
96
  $content = apply_filters( 'the_content', $content);
97
  }
92
  $apply_content_filters = isset($instance['apply_content_filters']) ? $instance['apply_content_filters'] : false;
93
  $content_post = get_post($custom_post_id);
94
  $content = $content_post->post_content;
95
+ // Display custom widget frontend
96
+ if ( $located = locate_template( 'custom-post-widget.php' ) ) {
97
+ require $located;
98
+ return;
99
+ }
100
  if ( !$apply_content_filters ) { // Don't apply the content filter if checkbox selected
101
  $content = apply_filters( 'the_content', $content);
102
  }
readme.txt CHANGED
@@ -4,8 +4,8 @@ Author URI: http://www.vanderwijk.com/
4
  Donate link: http://www.vanderwijk.com/wordpress/support/
5
  Tags: widget, sidebar, content block, block, custom, post, shortcode, wysiwyg, wpml, featured image
6
  Requires at least: 2.9.2
7
- Tested up to: 3.6.1
8
- Stable tag: 2.3.4
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -87,6 +87,9 @@ Creating and supporting this plugin takes up a lot of my free time, therefore I
87
 
88
  == Changelog ==
89
 
 
 
 
90
  = 2.3.4 =
91
  Added pt_BR translation files as kindly provided by Ronaldo Chevalier.
92
 
@@ -187,12 +190,3 @@ Fixed screenshots for plugin directory
187
 
188
  = 1.0 =
189
  First release
190
-
191
-
192
- == Upgrade Notice ==
193
-
194
- = 2.0 =
195
- You can now show the featured image for content block in the widget. Note that this new functionality might need some refinement.
196
- The language files for DE, FR, PL and RU are missing some translation strings because of new functionality that has been added tot the plugin. Any help in updating the translations is highly appreciated!
197
-
198
-
4
  Donate link: http://www.vanderwijk.com/wordpress/support/
5
  Tags: widget, sidebar, content block, block, custom, post, shortcode, wysiwyg, wpml, featured image
6
  Requires at least: 2.9.2
7
+ Tested up to: 3.7.1
8
+ Stable tag: 2.3.5
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
87
 
88
  == Changelog ==
89
 
90
+ = 2.3.5 =
91
+ Added the option to use your own widget template file as suggested by flynsarmy. See http://wordpress.org/support/topic/patch-custom-widget-frontends?replies=1 for more information.
92
+
93
  = 2.3.4 =
94
  Added pt_BR translation files as kindly provided by Ronaldo Chevalier.
95
 
190
 
191
  = 1.0 =
192
  First release