Hi,
I run a charity website that uses theme x Pro and runs a plug in called WPCharitable. There is a small glitch which we’ve narrowed down to being how the theme interacts with the plug in. The developer of the plug in has very kindly gone above and beyond, and searched through Theme Pro to isolate the issue and would like some feedback from you so hopefully it can be resolved. I’ll include his email in the secure note.
"We are experiencing a bug related to how the Pro theme is dealing with shortcodes. It is either stripping the shortcode, or attempting to render it at a point when it shouldn’t be (or at least, when Charitable is not expecting it to be).
To be a little more specific, this has been found to occur when a page uses the [charitable_submit_content] shortcode. This shortcode generates a form on the front-end; the form provides a way to create/edit a content of the campaign post type. As part of the form, it includes an editor field (i.e. wp_editor), which allows editing of the content (post_content) of the campaign.
This is where the problem arises. In my test scenario, the actual content of the campaign being edited is the following:
asdfasdf
[charitable_donors campaign=current show_avatar=0 number=1000]
In the editor with Pro theme activated, this appears as follows:
asdfasdf (without the shortcode)
It took me a while to trace where exactly in Pro this is getting altered, but I have been able to establish that it’s related to the Cornerstone_Shortcode_Preserver class. In Cornerstone_Shortcode_Preserver::__construct(), if I comment out the following line of code, the shortcode appears as expected:
$this->attach_hooks( ( ‘’ === $hook ) ? ‘the_content’ : $hook );
I’m not sure what the purpose of Cornerstone_Shortcode_Preserver is, or why it’s running here. I initially tried to add charitable_donors to cs_preserve_shortcodes, but that didn’t work. Adding charitable_submit_campaign did work.
Do you have any documentation explaining the purpose of Cornerstone_Shortcode_Preserver & the cs_preserve_shortcodes filter so I can make sure we don’t have this same error with other shortcodes?
Eric Daams."
Thanks!