Giter Site home page Giter Site logo

Comments (7)

zetokore avatar zetokore commented on July 26, 2024

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.

gregpriday avatar gregpriday commented on July 26, 2024

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.

zetokore avatar zetokore commented on July 26, 2024

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.

gregpriday avatar gregpriday commented on July 26, 2024

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.

zetokore avatar zetokore commented on July 26, 2024

I don't suppose you could suggest a simple hack to work around this issue in the meantime?

from siteorigin-panels.

MathieuChartier86 avatar MathieuChartier86 commented on July 26, 2024

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.

braamgenis avatar braamgenis commented on July 26, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.