Version Description
Fix for error when using shortcode with the WPML plugin
Download this release
Release Info
Developer | vanderwijk |
Plugin | Content Blocks (Custom Post Widget) |
Version | 1.9.8 |
Comparing to | |
See all releases |
Code changes from version 1.9.7 to 1.9.8
- custom-post-widget.php +2 -2
- popup.php +4 -0
- post-widget.php +5 -1
- readme.txt +3 -0
custom-post-widget.php
CHANGED
@@ -3,12 +3,12 @@
|
|
3 |
Plugin Name: Custom Post Widget
|
4 |
Plugin URI: http://www.vanderwijk.com/services/web-design/wordpress-custom-post-widget/
|
5 |
Description: Show the content of a custom post of the type 'content_block' in a widget.
|
6 |
-
Version: 1.9.
|
7 |
Author: Johan van der Wijk
|
8 |
Author URI: http://www.vanderwijk.com
|
9 |
License: GPL2
|
10 |
|
11 |
-
Release notes: Version 1.9.
|
12 |
|
13 |
Copyright 2012 Johan van der Wijk (email: info@vanderwijk.com)
|
14 |
|
3 |
Plugin Name: Custom Post Widget
|
4 |
Plugin URI: http://www.vanderwijk.com/services/web-design/wordpress-custom-post-widget/
|
5 |
Description: Show the content of a custom post of the type 'content_block' in a widget.
|
6 |
+
Version: 1.9.8
|
7 |
Author: Johan van der Wijk
|
8 |
Author URI: http://www.vanderwijk.com
|
9 |
License: GPL2
|
10 |
|
11 |
+
Release notes: Version 1.9.8 Fix for debug message when using shortcode with the WPML plugin
|
12 |
|
13 |
Copyright 2012 Johan van der Wijk (email: info@vanderwijk.com)
|
14 |
|
popup.php
CHANGED
@@ -33,6 +33,10 @@ function add_content_block_popup(){ ?>
|
|
33 |
<?php query_posts('post_type=content_block&orderby=ID&order=ASC&showposts=-1');
|
34 |
if ( have_posts() ) : while ( have_posts() ) : the_post();
|
35 |
$currentID = get_the_ID();
|
|
|
|
|
|
|
|
|
36 |
if($currentID == $custom_post_id)
|
37 |
$extra = 'selected' and
|
38 |
$widgetExtraTitle = get_the_title();
|
33 |
<?php query_posts('post_type=content_block&orderby=ID&order=ASC&showposts=-1');
|
34 |
if ( have_posts() ) : while ( have_posts() ) : the_post();
|
35 |
$currentID = get_the_ID();
|
36 |
+
// Add support for WPML Plugin.
|
37 |
+
if ( function_exists( 'icl_object_id' ) ){
|
38 |
+
$custom_post_id = icl_object_id( $custom_post_id, 'content_block', true );
|
39 |
+
}
|
40 |
if($currentID == $custom_post_id)
|
41 |
$extra = 'selected' and
|
42 |
$widgetExtraTitle = get_the_title();
|
post-widget.php
CHANGED
@@ -58,7 +58,7 @@ class custom_post_widget extends WP_Widget {
|
|
58 |
|
59 |
<p>
|
60 |
<input class="checkbox" type="checkbox" <?php checked( (bool) isset( $instance['show_featured_image'] ), true ); ?> id="<?php echo $this->get_field_id( 'show_featured_image' ); ?>" name="<?php echo $this->get_field_name( 'show_featured_image' ); ?>" />
|
61 |
-
<label for="<?php echo $this->get_field_id( 'show_featured_image' ); ?>"><?php echo __( 'Show
|
62 |
</p>
|
63 |
|
64 |
<p>
|
@@ -103,6 +103,10 @@ class custom_post_widget extends WP_Widget {
|
|
103 |
if ( $apply_content_filters ) { // Don't apply the content filter if checkbox selected
|
104 |
remove_filter('the_content', 'wpautop');
|
105 |
the_content(); // This is where the actual content of the custom post is being displayed
|
|
|
|
|
|
|
|
|
106 |
} else {
|
107 |
the_content(); // This is where the actual content of the custom post is being displayed
|
108 |
}
|
58 |
|
59 |
<p>
|
60 |
<input class="checkbox" type="checkbox" <?php checked( (bool) isset( $instance['show_featured_image'] ), true ); ?> id="<?php echo $this->get_field_id( 'show_featured_image' ); ?>" name="<?php echo $this->get_field_name( 'show_featured_image' ); ?>" />
|
61 |
+
<label for="<?php echo $this->get_field_id( 'show_featured_image' ); ?>"><?php echo __( 'Show featured image', 'custom-post-widget' ) ?></label>
|
62 |
</p>
|
63 |
|
64 |
<p>
|
103 |
if ( $apply_content_filters ) { // Don't apply the content filter if checkbox selected
|
104 |
remove_filter('the_content', 'wpautop');
|
105 |
the_content(); // This is where the actual content of the custom post is being displayed
|
106 |
+
|
107 |
+
//remove_all_filters('the_content', 'plugin_filters');
|
108 |
+
//add_filter('the_content', 'do_shortcode');
|
109 |
+
|
110 |
} else {
|
111 |
the_content(); // This is where the actual content of the custom post is being displayed
|
112 |
}
|
readme.txt
CHANGED
@@ -79,6 +79,9 @@ If your social media sharing plugin adds buttons to the widget areas you could c
|
|
79 |
|
80 |
== Changelog ==
|
81 |
|
|
|
|
|
|
|
82 |
= 1.9.7 =
|
83 |
Added featured image support and now using query_posts instead of get_post
|
84 |
|
79 |
|
80 |
== Changelog ==
|
81 |
|
82 |
+
= 1.9.8 =
|
83 |
+
Fix for error when using shortcode with the WPML plugin
|
84 |
+
|
85 |
= 1.9.7 =
|
86 |
Added featured image support and now using query_posts instead of get_post
|
87 |
|