PluginProbe
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder / 2.14.0
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder v2.14.0
2.14.0 2.13.0 2.13.1 2.12.0 2.11.1 2.11.0 2.10.0 2.9.0 2.7.4 2.7.5 2.7.6 2.7.7 2.8.0 2.8.1 2.9.1 trunk 1.0 1.0-beta1 1.0-beta2 1.0-beta3 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 All 81 releases
← All changes | includes/frontend/dynamic-content/interpreter.php +7 -0 2.9.0 → 2.14.0 View file →
@@ -53,8 +53,15 @@
53 53 ];
54 54 }
55 55
56 56 public static function init( string $content, $block, $instance ) : string {
57 + // This filter runs for EVERY block on the page (including core and
58 + // third-party blocks). The regex in parse() is expensive, so skip it
59 + // unless the block actually contains a dynamic-content marker.
60 + if ( false === strpos( $content, 'ablocks_dc' )
61 + && false === strpos( $content, 'ablocks-richtext-dynamic-content' ) ) {
62 + return $content;
63 + }
57 64 $ins = new self( $content, $instance->context );
58 65 return $ins->content;
59 66 }
60 67 }