Unverified Commit 1f1471dc authored by totten's avatar totten Committed by GitHub

Merge pull request #126 from bastienho/master

Gutenberg Compatibility - Do not render shortcodes in REST context
parents 0e900d48 5ca3e143
......@@ -246,7 +246,11 @@ class CiviCRM_For_WordPress_Shortcodes {
* @return string HTML for output
*/
public function render_single( $atts ) {
// Do not parse shortcodes in REST context, which breaks saving in Gutenberg editor
if(defined('REST_REQUEST') && REST_REQUEST){
return;
}
// check if we've already parsed this shortcode
global $post;
if ( is_object($post) ) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment