[Plugin: Custom Post Widget] Conflict with 2-click-socialmedia-button plugin
-
Hello Johann,
I’m runing wordpress 3.3.1 with custom-post-widget 1.9.1 and 2-click-socialmedia-button 0.31.1
On every article the 2-click-socialmedia-button is executed 6-7 times if custom-post-widget is active.
On the german Support page of 2-click-socialmedia-button https://blog.ppfeufer.de/wordpress-plugin-2-click-social-media-buttons/comment-page-7/#comment-28184
I found a hint that the apply_filters( ‘the_content’, $content ) should not called in themes or widgets since this is done via wordpress itself.I’m not aware of the internals of wordpress widgets programming, but if I remove the apply_fitler(‘the_content’…) from lines 64 in post-widget.php the conflict is removed and 2-click-socialmedia-buttton appears only once on a page.
Maybe this is a bug.
Regards,
Dirkdiff -uNr wordpress.orig/wp-content/plugins/custom-post-widget/post-widget.php wordpress/wp-content/plugins/custom-post-widget/post-widget.php
— wordpress.orig/wp-content/plugins/custom-post-widget/post-widget.php 2012-02-24 10:20:02.000000000 +0100
+++ wordpress/wp-content/plugins/custom-post-widget/post-widget.php 2012-03-29 10:25:23.000000000 +0200
@@ -64,7 +64,7 @@
$show_custom_post_title = isset( $instance[‘show_custom_post_title’] ) ? $instance[‘show_custom_post_title’] : false;^M
$content_post = get_post($custom_post_id);^M
$content = $content_post->post_content;^M
– $content = apply_filters(‘the_content’, $content);^M
+ /** $content = apply_filters(‘the_content’, $content); */^M
echo $before_widget;^M
if ( $show_custom_post_title ) {^M
echo $before_title . apply_filters(‘widget_title’,$content_post->post_title) . $after_title; // This is the line that displays the title (only if show title is set) ^M
@@ -191,4 +191,4 @@
if(in_array(CUSTOM_POST_WIDGET_CURRENT_PAGE, array(‘post.php’, ‘page.php’, ‘page-new.php’, ‘post-new.php’))) {^M
add_action(‘admin_footer’, ‘add_content_block_popup’);^M
}^M
-?>
\ No newline at end of file
+?>^M
- The topic ‘[Plugin: Custom Post Widget] Conflict with 2-click-socialmedia-button plugin’ is closed to new replies.