Deprecated: Function get_currentuserinfo is deprecated since version 4.5.0! Use wp_get_current_user() instead. in /var/www/html/wp-includes/functions.php on line 5383

Reply To: Content of page, portfolio and post does is empty

New Front EN Support Forums Ikebana Theme Support Content of page, portfolio and post does is empty Reply To: Content of page, portfolio and post does is empty

#6886
rctorp
Member

It seems that the problem is related to the plugin shortcodes-pro, especially the filter that has been added to line 57 in the file
shortcodes-pro/inc/class-shortcodespro-type.php

This calles the following functions:
function sp_do_shortcode( $content ) {
return $this->replace_do_shortcode( $content );
}

* Searches and replaces up to 3 levels of [do] shortcode.

function replace_do_shortcode( $content ) {
// short shortcode
$pattern = ‘~\[do action\=\”[^\”]*\”\s?[^\]]*?\/]~’;
$content = preg_replace_callback( $pattern, array( &$this, ‘replace_do_shortcode_callback’ ), $content );

// normal shortcode/no nesting
$pattern = ‘~\[do action\=\”[^\”]*\”\s?[^\]\/]*\]( [^\[\d\o\n]* )\[\/do\]~’;
$content = preg_replace_callback( $pattern, array( &$this, ‘replace_do_shortcode_callback’ ), $content );

return $content;
}

Since this plugin is part of the theme and the filter is in an anonymus object I had to search for it. Its probably not compatible to other PHP-versions.

As my host-provider tells me, this code ought to work if its add’ed to the sent-part in the init-action:

<?php
function dnd_fix_shortcode_filter() {
global $wp_filter;
$hook=’the_content’;
$found=0;
foreach($wp_filter[$hook] as $priority=>$record) {
foreach($record as $name => $values) {
if (strpos($name,’sp_do_shortcode’)>0) {
remove_filter($hook,$name,$priority);
$found=1;
break;
}
}
if($found) break;
}
}
?>

————
The question is: This way of working around the problem is not something i prefer. In fact I ususally avoid it at all cost.

Any advice?