Comments (7)
If I replace this:
<?php echo apply_filters('the_content', $content); ?>
With this:
<?php echo $content; ?>
it resolves the issue, but I need that content filtered. :)
from siteorigin-panels.
Just to confirm, do not get this issue when Page Builder is deactivated?
Also, where are you getting that shortcode from? Is it from a plugin or
have you custom coded it?
On Monday, March 16, 2015, SteveS123 [email protected] wrote:
If I replace this:
With this:
it resolves the issue, but I need that content filtered. :)
—
Reply to this email directly or view it on GitHub
#47 (comment)
.
I make free WordPress themes
http://siteorigin.com
from siteorigin-panels.
That's right, if I have the Page Builder deactivated and paste my shortcode into the standard visual editor it works fine. The shortcode is custom coded, I've stripped everything out from it, the shortcode below exhibits the bug:
function callout( $atts, $content = null ) {
if(has_filter('callout'))
return apply_filters('callout', $atts, $content);
extract(shortcode_atts(array(), $atts));
ob_start();
apply_filters('the_content', $content);
$output_string = ob_get_contents();
ob_end_clean();
return $output_string;
}
add_shortcode('callout', 'callout');
from siteorigin-panels.
I can see how that would cause an infinite loop. I'll take a look at that
when I'm back at my office and see if I can figure anything out.
One fairly simple fix would be to remove the Page Builder filters on
the_content and readd them afterwards. That's a bit of a hack though. I'd
rather try see if I can get Page Builder itself to deal with this situation.
On Monday, March 16, 2015, SteveS123 <[email protected]
javascript:_e(%7B%7D,'cvml','[email protected]');> wrote:
That's right, if I have the Page Builder deactivated and paste my
shortcode into the standard visual editor it works fine. The shortcode is
custom coded, I've stripped everything out from it, the shortcode below
exhibits the bug:function callout( $atts, $content = null ) {
if(has_filter('callout')) return apply_filters('callout', $atts, $content); extract(shortcode_atts(array(), $atts)); ob_start(); apply_filters('the_content', $content); $output_string = ob_get_contents(); ob_end_clean(); return $output_string;
}
add_shortcode('callout', 'callout');—
Reply to this email directly or view it on GitHub
#47 (comment)
.
I make free WordPress themes
http://siteorigin.com
from siteorigin-panels.
I don't suppose you could suggest a simple hack to work around this issue in the meantime?
from siteorigin-panels.
I had the same conflict between my plugin Modal -Portfolio and Page Builder.
This is the alternative that works:
wpautop(get_post_field('post_content', $post->id));
(It should perhaps change $post->id depending on your configuration)
The cause of this conflict is simple : it is not possible to use apply_filters function in another apply_filters function (already used by Page Builder).
As apply_filters() function uses the wpautop() function to add line breaks, just use this function to solve the problem with any displaying function for the content. :-)
Note: I'm French, sorry for my bad English ...
from siteorigin-panels.
Thanks for the input @Internet-Formation That's a good suggestion.
@SteveS123 You can also take a look at the default-filters.php file and apply only the filters you need. Otherwise the editor will try to process your shortcode over and over again. Hope that helps.
from siteorigin-panels.
Related Issues (20)
- Add Design - Border Radius Setting
- Layout Block: Check row actions padding HOT 1
- Background Image: Introduce Size Options
- Settings: Add Additional Units of Measurement
- Design Styles: Add a Border Thickness Setting
- Layout Builder: Check styling in the Customizer Widget Block Area HOT 1
- Changes may not be saved when viewing widget HOT 3
- Page builder for WordPress 6.1.1 not template compatible HOT 5
- Column Resizing Rework HOT 1
- Parse panels_data HOT 1
- Testimonial Slider and PHP8 HOT 5
- Page Builder HOT 1
- Add Method to Save Page Without Leaving Row/Widget Modal
- Add Setting to Inline Margin/Padding/Border Styles
- Full Height Setting
- Border radius field UI HOT 1
- Support for Custom Row Colours
- Investigate removing CSS rules with a null value
- Layout Block: Export JSON file name
- EDD: Add New button text missing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from siteorigin-panels.