Last active
November 4, 2019 14:54
-
-
Save kaskad88/74d5760c96c0520c2763d8dd01125069 to your computer and use it in GitHub Desktop.
HDquiz & JetPopup compatibility
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'elementor/widget/before_render_content', function( $widget ) { | |
if ( 'shortcode' !== $widget->get_name() ) { | |
return; | |
} | |
if ( false === strpos( $widget->get_settings_for_display( 'shortcode' ), '[HDquiz quiz' ) ) { | |
return; | |
} | |
Elementor\Plugin::instance()->frontend->remove_content_filter(); | |
} ); | |
add_filter( 'elementor/widget/render_content', function ( $content, $widget ) { | |
if ( 'shortcode' !== $widget->get_name() ) { | |
return $content; | |
} | |
if ( false === strpos( $widget->get_settings_for_display( 'shortcode' ), '[HDquiz quiz' ) ) { | |
return $content; | |
} | |
Elementor\Plugin::instance()->frontend->add_content_filter(); | |
return $content; | |
}, 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment