Version Description
You can now optionally show the post title when using the shortcode by adding title=yes
to the shortcode
Download this release
Release Info
Developer | vanderwijk |
Plugin | Content Blocks (Custom Post Widget) |
Version | 2.8.4 |
Comparing to | |
See all releases |
Code changes from version 2.8.3 to 2.8.4
- custom-post-widget.php +2 -2
- post-widget.php +6 -1
- readme.txt +4 -2
custom-post-widget.php
CHANGED
@@ -3,14 +3,14 @@
|
|
3 |
Plugin Name: Custom Post Widget
|
4 |
Plugin URI: http://www.vanderwijk.com/wordpress/wordpress-custom-post-widget/?utm_source=wordpress&utm_medium=plugin&utm_campaign=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.8.
|
7 |
Author: Johan van der Wijk
|
8 |
Author URI: http://vanderwijk.nl
|
9 |
Text Domain: custom-post-widget
|
10 |
Domain Path: /languages
|
11 |
License: GPL2
|
12 |
|
13 |
-
Release notes:
|
14 |
|
15 |
Copyright 2015 Johan van der Wijk
|
16 |
|
3 |
Plugin Name: Custom Post Widget
|
4 |
Plugin URI: http://www.vanderwijk.com/wordpress/wordpress-custom-post-widget/?utm_source=wordpress&utm_medium=plugin&utm_campaign=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.8.4
|
7 |
Author: Johan van der Wijk
|
8 |
Author URI: http://vanderwijk.nl
|
9 |
Text Domain: custom-post-widget
|
10 |
Domain Path: /languages
|
11 |
License: GPL2
|
12 |
|
13 |
+
Release notes: You can now show the post title when using the shortcode
|
14 |
|
15 |
Copyright 2015 Johan van der Wijk
|
16 |
|
post-widget.php
CHANGED
@@ -172,7 +172,9 @@ function custom_post_widget_shortcode( $atts ) {
|
|
172 |
'id' => '',
|
173 |
'slug' => '',
|
174 |
'class' => 'content_block',
|
175 |
-
'suppress_content_filters' => 'no'
|
|
|
|
|
176 |
), $atts ) );
|
177 |
|
178 |
if ( $slug ) {
|
@@ -194,6 +196,9 @@ function custom_post_widget_shortcode( $atts ) {
|
|
194 |
|
195 |
foreach( $content_post as $post ) :
|
196 |
$content .= '<div class="'. esc_attr($class) .'" id="custom_post_widget-' . $id . '">';
|
|
|
|
|
|
|
197 |
if ( $suppress_content_filters === 'no' ) {
|
198 |
$content .= apply_filters( 'the_content', $post->post_content);
|
199 |
} else {
|
172 |
'id' => '',
|
173 |
'slug' => '',
|
174 |
'class' => 'content_block',
|
175 |
+
'suppress_content_filters' => 'no',
|
176 |
+
'title' => 'no',
|
177 |
+
'title_tag' => 'h3'
|
178 |
), $atts ) );
|
179 |
|
180 |
if ( $slug ) {
|
196 |
|
197 |
foreach( $content_post as $post ) :
|
198 |
$content .= '<div class="'. esc_attr($class) .'" id="custom_post_widget-' . $id . '">';
|
199 |
+
if ( $title === 'yes' ) {
|
200 |
+
$content .= '<' . esc_attr( $title_tag ) . '>' . $post->post_title . '</' . esc_attr( $title_tag ) . '>';
|
201 |
+
}
|
202 |
if ( $suppress_content_filters === 'no' ) {
|
203 |
$content .= apply_filters( 'the_content', $post->post_content);
|
204 |
} else {
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: vanderwijk
|
|
3 |
Tags: widget, sidebar, content block, block, custom, post, shortcode, wysiwyg, wpml, featured image
|
4 |
Requires at least: 4.0
|
5 |
Tested up to: 4.4
|
6 |
-
Stable tag: 2.8.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -87,7 +87,6 @@ Please post your feature request on [the support forum](https://wordpress.org/su
|
|
87 |
These new features are on the to-do list:
|
88 |
|
89 |
* Display the content block featured image when using the shortcode
|
90 |
-
* Optionally show the post title when using the shortcode
|
91 |
* Front-end editing of the content blocks
|
92 |
* Display shortcode on content block edit screen and/or overview page similar to Contact Form 7
|
93 |
* Visual Composer integration
|
@@ -133,6 +132,9 @@ Creating and supporting this plugin takes up a lot of my free time, therefore I
|
|
133 |
|
134 |
== Changelog ==
|
135 |
|
|
|
|
|
|
|
136 |
= 2.8.3 =
|
137 |
Added Hebrew translation as provided by Daniel Cohen Gindi
|
138 |
|
3 |
Tags: widget, sidebar, content block, block, custom, post, shortcode, wysiwyg, wpml, featured image
|
4 |
Requires at least: 4.0
|
5 |
Tested up to: 4.4
|
6 |
+
Stable tag: 2.8.4
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
87 |
These new features are on the to-do list:
|
88 |
|
89 |
* Display the content block featured image when using the shortcode
|
|
|
90 |
* Front-end editing of the content blocks
|
91 |
* Display shortcode on content block edit screen and/or overview page similar to Contact Form 7
|
92 |
* Visual Composer integration
|
132 |
|
133 |
== Changelog ==
|
134 |
|
135 |
+
= 2.8.4 =
|
136 |
+
You can now optionally show the post title when using the shortcode by adding `title=yes` to the shortcode
|
137 |
+
|
138 |
= 2.8.3 =
|
139 |
Added Hebrew translation as provided by Daniel Cohen Gindi
|
140 |
|