{"id":116037,"date":"2020-01-15T08:13:06","date_gmt":"2020-01-15T08:13:06","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/block-logic\/"},"modified":"2026-01-05T16:01:39","modified_gmt":"2026-01-05T16:01:39","slug":"block-logic","status":"publish","type":"plugin","link":"https:\/\/kn.wordpress.org\/plugins\/block-logic\/","author":8195469,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"2.1.5","stable_tag":"2.1.5","tested":"6.9.4","requires":"6.5","requires_php":"5.6","requires_plugins":null,"header_name":"Block Logic","header_author":"Sascha Paukner","header_description":"Adds a conditional block attribute Block Logic to control block display to the \"Advanced\" control panel","assets_banners_color":"951b81","last_updated":"2026-01-05 16:01:39","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"https:\/\/saschapaukner.de","rating":5,"author_block_rating":0,"active_installs":300,"downloads":5419,"num_ratings":13,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"landwire","date":"2020-12-11 19:25:55"},"1.0.2":{"tag":"1.0.2","author":"landwire","date":"2021-08-17 15:05:11"},"1.0.3":{"tag":"1.0.3","author":"landwire","date":"2021-09-23 15:48:12"},"1.0.4":{"tag":"1.0.4","author":"landwire","date":"2022-03-17 11:30:00"},"1.0.5":{"tag":"1.0.5","author":"landwire","date":"2022-09-25 10:15:08"},"1.0.6":{"tag":"1.0.6","author":"landwire","date":"2023-09-21 08:16:44"},"1.0.7":{"tag":"1.0.7","author":"landwire","date":"2023-09-24 10:23:09"},"1.0.8":{"tag":"1.0.8","author":"landwire","date":"2023-09-24 10:43:08"},"1.1.0":{"tag":"1.1.0","author":"landwire","date":"2025-09-12 11:27:31"},"2.0.0":{"tag":"2.0.0","author":"landwire","date":"2026-01-01 21:55:53"},"2.1.0":{"tag":"2.1.0","author":"landwire","date":"2026-01-05 15:05:42"},"2.1.1":{"tag":"2.1.1","author":"landwire","date":"2026-01-05 15:29:54"},"2.1.2":{"tag":"2.1.2","author":"landwire","date":"2026-01-05 15:39:31"},"2.1.3":{"tag":"2.1.3","author":"landwire","date":"2026-01-05 15:53:10"},"2.1.4":{"tag":"2.1.4","author":"landwire","date":"2026-01-05 15:55:52"},"2.1.5":{"tag":"2.1.5","author":"landwire","date":"2026-01-05 16:01:39"}},"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":13},"assets_icons":{"icon-256x256.png":{"filename":"icon-256x256.png","revision":2227643,"resolution":"256x256","location":"assets","locale":""},"icon.svg":{"filename":"icon.svg","revision":2227643,"resolution":false,"location":"assets","locale":false}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":2227643,"resolution":"1544x500","location":"assets","locale":""},"banner-772x250.png":{"filename":"banner-772x250.png","revision":2227643,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{"blueprint.json":{"filename":"blueprint.json","revision":3432880,"resolution":false,"location":"assets","locale":"","contents":"{\"$schema\":\"https:\\\/\\\/playground.wordpress.net\\\/blueprint-schema.json\",\"landingPage\":\"\\\/?p=6\",\"preferredVersions\":{\"php\":\"8.1\",\"wp\":\"latest\"},\"phpExtensionBundles\":[\"kitchen-sink\"],\"steps\":[{\"step\":\"login\",\"username\":\"admin\",\"password\":\"password\"},{\"step\":\"installPlugin\",\"options\":{\"activate\":true},\"pluginData\":{\"resource\":\"wordpress.org\\\/plugins\",\"slug\":\"block-logic\"}},{\"step\":\"runPHP\",\"code\":\"<?php\\ninclude 'wordpress\\\/wp-load.php';\\nadd_post_type_support( 'page', 'excerpt' );\"},{\"step\":\"runPHP\",\"code\":\"<?php\\ninclude 'wordpress\\\/wp-load.php';\\nwp_insert_post(array(\\n'import_id' => 6,\\n'post_title' => 'Block Logic',\\n'post_type' => 'page',\\n'post_content' => '<!-- wp:paragraph {\\\"blockLogic\\\":\\\"is_user_logged_in()\\\"} -->\\n<p>Paragraph for logged in users only!<\\\/p>\\n<!-- \\\/wp:paragraph -->\\n\\n<!-- wp:paragraph {\\\"blockLogic\\\":\\\"!is_user_logged_in()\\\"} -->\\n<p>Paragraph for logged out users only!<\\\/p>\\n<!-- \\\/wp:paragraph -->\\n\\n<!-- wp:paragraph -->\\n<p>Paragraph that is always visible. No logic applied.<\\\/p>\\n<!-- \\\/wp:paragraph -->\\n\\n<!-- wp:paragraph {\\\"blockLogic\\\":\\\"has_excerpt()\\\"} -->\\n<p>Only show this block, if the page\\\/post has an excerpt.<\\\/p>\\n<!-- \\\/wp:paragraph -->',\\n'post_status' => 'publish',\\n'post_author' => 1\\n));\"}]}"}},"all_blocks":[],"tagged_versions":["1.0.0","1.0.2","1.0.3","1.0.4","1.0.5","1.0.6","1.0.7","1.0.8","1.1.0","2.0.0","2.1.0","2.1.1","2.1.2","2.1.3","2.1.4","2.1.5"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":2227643,"resolution":"1","location":"assets","locale":""}},"screenshots":{"1":"The 'Block logic' field at work in the block editor."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[1220,4060,5106,25157,6309],"plugin_category":[],"plugin_contributors":[180763],"plugin_business_model":[],"class_list":["post-116037","plugin","type-plugin","status-publish","hentry","plugin_tags-block","plugin_tags-conditional","plugin_tags-conditions","plugin_tags-logic","plugin_tags-visibility","plugin_contributors-landwire","plugin_committers-landwire"],"banners":{"banner":"https:\/\/ps.w.org\/block-logic\/assets\/banner-772x250.png?rev=2227643","banner_2x":"https:\/\/ps.w.org\/block-logic\/assets\/banner-1544x500.png?rev=2227643","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":"https:\/\/ps.w.org\/block-logic\/assets\/icon.svg?rev=2227643","icon":"https:\/\/ps.w.org\/block-logic\/assets\/icon.svg?rev=2227643","icon_2x":false,"generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/block-logic\/assets\/screenshot-1.png?rev=2227643","caption":"The 'Block logic' field at work in the block editor."}],"raw_content":"<!--section=description-->\n<p>Block Logic adds a \"Block Logic\" field to the \"Advanced\" section of the block editor (i.e Gutenberg), that lets you show or hide any block based on conditions. You can use WordPress' <a href=\"http:\/\/codex.wordpress.org\/Conditional_Tags\">Conditional Tags<\/a> or any general PHP code.<\/p>\n\n<h3>Show or hide blocks based on<\/h3>\n\n<ul>\n<li>User role<\/li>\n<li>User login status<\/li>\n<li>Post status<\/li>\n<li>Date and time<\/li>\n<li>The result of a custom PHP function<\/li>\n<\/ul>\n\n<h3>Features<\/h3>\n\n<ul>\n<li>Show or hide any block using conditions<\/li>\n<li>Combine conditions with \u201cand\u201d or \u201cor\u201d operators. See FAQ Writing Logic Code<\/li>\n<li>Full flexibility: use any condition you want (you can extend base functionality with filters)<\/li>\n<\/ul>\n\n<h3>Limitations<\/h3>\n\n<p>Does not work with the Classic Block, Widget Block or Widget Area Block ['core\/freeform', 'core\/legacy-widget', 'core\/widget-area'], as the those blocks do not support block attributes. Does also not work with the HTML Block ['core\/html'] inside the Widget Screen, as this one also does not support block attributes there.<\/p>\n\n<h3>Configuration<\/h3>\n\n<p>Just activate the plugin. The \"Block Logic\" textbox will then appear in the \"Advanced\" section of the Gutenberg editor.<\/p>\n\n<h3>Breaking changes since 2.0.0<\/h3>\n\n<p>Since version 2.0.0 the code does not get eval'd directly, but there is a whitelist of allowed functions that can be extended via a filter.<\/p>\n\n<h3>Upgrade Notice<\/h3>\n\n<p>When upgrading to version 2.x you will need to update your logic. No <code>return<\/code> is allowed anymore and no semicolons in code as only expressions are evaluated. See FAQ Section <strong>Writing Logic Code<\/strong>.<\/p>\n\n<!--section=faq-->\n<dl>\n<dt id='writing%20logic%20code'><h3>Writing Logic Code<\/h3><\/dt>\n<dd><p>Make good use of <a href=\"http:\/\/codex.wordpress.org\/Conditional_Tags\">WP's own conditional tags<\/a>. Use operators to combine conditions. See Supported functions and globals section for allowed functions. Functions are extendable via filters.<\/p>\n\n<ol>\n<li><p><strong>Operators<\/strong><\/p>\n\n<ul>\n<li><code>!<\/code> (not) to <strong>reverse<\/strong> the logic, eg <code>!is_home()<\/code> is TRUE when this is NOT the home page.<\/li>\n<li><code>||<\/code> (or) to <strong>combine<\/strong> conditions. <code>X || Y<\/code> is TRUE when either X or Y is true.<\/li>\n<li><code>&amp;&amp;<\/code> (and) to make conditions <strong>more specific<\/strong>. <code>X &amp;&amp; Y<\/code> is TRUE when both X and Y are true.<\/li>\n<\/ul><\/li>\n<li><p><strong>WordPress Conditional Checks<\/strong><\/p>\n\n<ul>\n<li><code>is_home()<\/code> -- just the main blog page<\/li>\n<li><code>!is_page('about')<\/code> -- everywhere except this specific WP page<\/li>\n<li><code>is_user_logged_in()<\/code> -- shown when a user is logged in<\/li>\n<li><code>is_category(array(5,9,10,11))<\/code> -- category page of one of the given category IDs<\/li>\n<li><code>is_single() &amp;&amp; in_category('baked-goods')<\/code> -- single post that\u2019s in the \u201cbaked-goods\u201d category<\/li>\n<li><code>current_user_can('administrator')<\/code> -- admin-only blocks<\/li>\n<li><code>strpos($_SERVER['HTTP_REFERER'], \"google.com\") !== false<\/code> -- blocks to show when clicked through from Google<\/li>\n<li><code>is_category() &amp;&amp; in_array($cat, get_term_children(5, 'category'))<\/code> -- category page that\u2019s a descendant of category 5<\/li>\n<li><code>in_array(77, get_post_ancestors($post))<\/code> -- WP page that is a child of page 77<\/li>\n<li><code>is_page('home') || $post-&gt;post_parent == 13<\/code> -- home page or the page that\u2019s a child of page 13<\/li>\n<\/ul><\/li>\n<li><p><strong>WordPress Post &amp; Term Checks<\/strong><\/p>\n\n<ul>\n<li><code>has_term('special-offer', 'category', $post)<\/code> -- post has a specific category term<\/li>\n<li><code>get_post_meta(get_the_ID(), 'featured', true) == 'yes'<\/code> -- check a meta field value<\/li>\n<li><code>get_post_type() == 'product'<\/code> -- current post type is a WooCommerce product<\/li>\n<li><code>is_sticky()<\/code> -- sticky posts only<\/li>\n<li><code>has_post_thumbnail()<\/code> -- only posts\/pages with a featured image<\/li>\n<li><code>get_the_category()<\/code> -- fetch post categories (can be used in expressions)<\/li>\n<li><code>get_the_tags()<\/code> -- fetch post tags<\/li>\n<\/ul><\/li>\n<li><p><strong>WooCommerce-Specific Checks<\/strong><\/p>\n\n<ul>\n<li><code>WC()-&gt;cart &amp;&amp; WC()-&gt;cart-&gt;get_cart_contents_count() &gt; 0<\/code> -- cart has at least one item<\/li>\n<li><code>WC()-&gt;cart &amp;&amp; WC()-&gt;cart-&gt;total &gt; 50<\/code> -- cart total is more than $50<\/li>\n<li><code>is_product() &amp;&amp; get_post_meta(get_the_ID(), '_sale_price', true) !== ''<\/code> -- product has a sale price<\/li>\n<li><code>is_product_category('shoes') &amp;&amp; WC()-&gt;cart<\/code> -- category page \u201cshoes\u201d and cart exists<\/li>\n<li><code>is_user_logged_in() &amp;&amp; WC()-&gt;cart &amp;&amp; WC()-&gt;cart-&gt;get_cart_contents_count() &gt; 0<\/code> -- logged-in user and cart has items<\/li>\n<\/ul><\/li>\n<li><p><strong>ACF Checks (Read-only)<\/strong><\/p>\n\n<ul>\n<li><code>get_field('featured') == true<\/code> -- ACF field \u201cfeatured\u201d is true<\/li>\n<li><code>get_sub_field('discount') &gt; 0<\/code> -- ACF subfield \u201cdiscount\u201d has a value<\/li>\n<li><code>get_row() &gt; 0<\/code> -- there are ACF repeater rows<\/li>\n<li><code>get_field_object('product_info')['value'] !== ''<\/code> -- check ACF field object value<\/li>\n<\/ul><\/li>\n<li><p><strong>PHP Helpers<\/strong><\/p>\n\n<ul>\n<li><code>in_array('baked-goods', wp_get_post_categories($post))<\/code> -- category array check<\/li>\n<li><code>strpos(get_permalink($post), 'sale') !== false<\/code> -- check if permalink contains \u201csale\u201d<\/li>\n<li><code>empty(get_post_meta(get_the_ID(), 'stock', true))<\/code> -- post has no stock meta<\/li>\n<li><code>count(WC()-&gt;cart-&gt;get_cart()) &gt; 1<\/code> -- more than 1 item in cart<\/li>\n<li><code>time() &gt; strtotime('2026-01-01')<\/code> -- check current timestamp<\/li>\n<li><code>number_format(WC()-&gt;cart-&gt;total, 2)<\/code> -- format cart total<\/li>\n<li><code>round(get_post_meta(get_the_ID(), 'rating', true)) &gt; 4<\/code> -- rating is greater than 4<\/li>\n<\/ul><\/li>\n<\/ol><\/dd>\n<dt id='supported%20functions%20and%20globals'><h3>Supported functions and globals<\/h3><\/dt>\n<dd><p>Block Logic comes with a set of safe WordPress, WooCommerce, ACF, and PHP helper functions, as well as selected globals and superglobals. These can be used in block logic expressions to control the display of blocks dynamically.<\/p>\n\n<ol>\n<li><p><strong>Allowed Superglobals<\/strong><\/p>\n\n<ul>\n<li>By default, only safe, read-only superglobals are available. Developers can extend this list via the <code>block_logic_allowed_superglobals<\/code> filter.\n\n<ul>\n<li><code>$_GET<\/code> -- query parameters<\/li>\n<li><code>$_POST<\/code> -- submitted form data<\/li>\n<li><code>$_SERVER<\/code> -- server\/environment info (e.g., <code>$_SERVER['HTTP_REFERER']<\/code>)<\/li>\n<li><code>$_COOKIE<\/code> -- cookies<\/li>\n<\/ul><\/li>\n<li><p>Example usage:<\/p>\n\n<pre><code>!empty($_GET['ref']) &amp;&amp; strpos($_SERVER['HTTP_REFERER'], 'google.com') !== false\n<\/code><\/pre><\/li>\n<\/ul><\/li>\n<li><p><strong>Allowed WordPress Globals<\/strong><\/p>\n\n<ul>\n<li>These global variables are accessible inside block logic expressions. Extend the list via the <code>block_logic_allowed_globals<\/code> filter.\n\n<ul>\n<li><code>$post<\/code> -- current post object<\/li>\n<li><code>$wp_query<\/code> -- main query object<\/li>\n<li><code>$wp_the_query<\/code> -- backup of main query<\/li>\n<li><code>$wp<\/code> -- WP environment object<\/li>\n<li><code>$wp_rewrite<\/code> -- rewrite rules<\/li>\n<li><code>$current_user<\/code> -- WP_User object of the current user<\/li>\n<li><code>$wp_version<\/code> -- WordPress version<\/li>\n<\/ul><\/li>\n<li><p>Example usage:<\/p>\n\n<pre><code>in_array($post-&gt;ID, get_post_ancestors($post)) &amp;&amp; is_user_logged_in()\n<\/code><\/pre><\/li>\n<\/ul><\/li>\n<li><p><strong>Allowed WordPress Functions<\/strong><\/p>\n\n<ul>\n<li>Overview\n\n<ul>\n<li><code>current_user_can('administrator')<\/code> -- check user capabilities<\/li>\n<li><code>get_current_user_id()<\/code> -- current user ID<\/li>\n<li><code>get_option('blogname')<\/code> -- get site title<\/li>\n<li><code>get_post_meta(get_the_ID(), 'featured', true)<\/code> -- read post meta<\/li>\n<li><code>get_post_type()<\/code> -- post type slug<\/li>\n<li><code>get_the_ID()<\/code> -- current post ID<\/li>\n<li><code>has_post_thumbnail()<\/code> -- check if post has featured image<\/li>\n<li><code>is_page('about')<\/code> -- check if current page is \"about\"<\/li>\n<\/ul><\/li>\n<li><p>Example usage:<\/p>\n\n<pre><code>is_page('about') &amp;&amp; has_post_thumbnail()\n<\/code><\/pre><\/li>\n<\/ul><\/li>\n<li><p><strong>ACF Functions<\/strong><\/p>\n\n<ul>\n<li>Overview\n\n<ul>\n<li><code>get_field('featured')<\/code> -- read ACF field value<\/li>\n<li><code>get_sub_field('discount')<\/code> -- read subfield in repeater<\/li>\n<li><code>get_row()<\/code> -- number of repeater rows<\/li>\n<li><code>get_field_object('product_info')['value']<\/code> -- field object value<\/li>\n<\/ul><\/li>\n<li><p>Example usage:<\/p>\n\n<pre><code>get_field('featured') == true &amp;&amp; get_sub_field('discount') &gt; 0\n<\/code><\/pre><\/li>\n<\/ul><\/li>\n<li><p><strong>WooCommerce Functions<\/strong><\/p>\n\n<ul>\n<li>Overview\n\n<ul>\n<li><code>wc_get_cart_contents_count()<\/code> -- number of items in cart<\/li>\n<li><code>wc_get_cart_total()<\/code> -- cart total<\/li>\n<li><code>wc_get_cart_subtotal()<\/code> -- cart subtotal<\/li>\n<li><code>wc_cart_is_empty()<\/code> -- TRUE if cart is empty<\/li>\n<li><code>wc_customer_get_id()<\/code> -- current customer ID<\/li>\n<li><code>wc_customer_get_billing_email()<\/code> -- customer billing email<\/li>\n<li><code>wc_customer_get_shipping_country()<\/code> -- shipping country<\/li>\n<li><code>wc_customer_get_shipping_state()<\/code> -- shipping state<\/li>\n<li><code>wc_customer_get_shipping_postcode()<\/code> -- shipping postcode<\/li>\n<li><code>wc_get_product($product_id)<\/code> -- get WC_Product object<\/li>\n<\/ul><\/li>\n<li><p>Example usage:<\/p>\n\n<pre><code>wc_get_cart_contents_count() &gt; 0 &amp;&amp; wc_get_cart_total() &gt; 50\n<\/code><\/pre><\/li>\n<\/ul><\/li>\n<li><p><strong>PHP Helpers<\/strong><\/p>\n\n<ul>\n<li>Overview\n\n<ul>\n<li><code>strpos($haystack, $needle)<\/code><\/li>\n<li><code>in_array($needle, $array)<\/code><\/li>\n<li><code>empty($var)<\/code><\/li>\n<li><code>isset($var)<\/code><\/li>\n<li><code>count($array)<\/code><\/li>\n<li><code>strlen($string)<\/code><\/li>\n<li><code>preg_match($pattern, $subject)<\/code><\/li>\n<li><code>current_time('timestamp')<\/code><\/li>\n<li><code>strtotime($string)<\/code><\/li>\n<li><code>date($format, $timestamp)<\/code><\/li>\n<li><code>time()<\/code><\/li>\n<li><code>number_format($number, $decimals)<\/code><\/li>\n<li><code>round($number)<\/code><\/li>\n<\/ul><\/li>\n<li><p>Example usage:<\/p>\n\n<pre><code>count(WC()-&gt;cart-&gt;get_cart()) &gt; 1 &amp;&amp; time() &gt; strtotime('2026-01-01')\n<\/code><\/pre><\/li>\n<\/ul><\/li>\n<\/ol><\/dd>\n<dt id='extending%20the%20list%20of%20allowed%20functions'><h3>Extending the list of allowed functions<\/h3><\/dt>\n<dd><p>Block Logic provides four filters that developers can use to safely extend which functions, globals, and superglobals are available inside block logic expressions.<\/p>\n\n<ol>\n<li><p><strong>Add custom functions<\/strong><\/p>\n\n<ul>\n<li>Use the <code>block_logic_allowed_functions<\/code> filter to make additional functions available in block logic expressions.<\/li>\n<li><p>Example<\/p>\n\n<pre><code>add_filter('block_logic_allowed_functions', function($allowed) {\n    $allowed[] = 'my_cart_has_items';\n    return $allowed;\n});\n\nfunction my_cart_has_items() {\n    return WC()-&gt;cart &amp;&amp; WC()-&gt;cart-&gt;get_cart_contents_count() &gt; 0;\n}\n<\/code><\/pre><\/li>\n<li><p>Usage in a block logic field:<\/p>\n\n<pre><code>my_cart_has_items()\n<\/code><\/pre><\/li>\n<\/ul><\/li>\n<li><p><strong>Add extra superglobals<\/strong><\/p>\n\n<ul>\n<li>Use the <code>block_logic_allowed_superglobals<\/code> filter to allow additional superglobals like $_SESSION.<\/li>\n<li><p>Example:<\/p>\n\n<pre><code>add_filter('block_logic_allowed_superglobals', function($allowed) {\n    $allowed[] = '_SESSION';\n    return $allowed;\n});\n<\/code><\/pre><\/li>\n<li><p>Usage in a block logic field:<\/p>\n\n<pre><code>!empty($_SESSION['special_offer'])\n<\/code><\/pre><\/li>\n<\/ul><\/li>\n<li><p><strong>Add extra WordPress globals<\/strong><\/p>\n\n<ul>\n<li>Use the <code>block_logic_allowed_globals<\/code> filter to allow extra global variables.<\/li>\n<li><p>Example:<\/p>\n\n<pre><code>add_filter('block_logic_allowed_globals', function($allowed) {\n    $allowed[] = 'my_global_data';\n    return $allowed;\n});\n\n\/\/ Somewhere in your theme or plugin\n$GLOBALS['my_global_data'] = ['foo' =&gt; 'bar'];\n<\/code><\/pre><\/li>\n<li><p>Usage in a block logic field:<\/p>\n\n<pre><code>$post-&gt;ID == my_global_data['foo']\n<\/code><\/pre><\/li>\n<\/ul><\/li>\n<li><p><strong>Add completely custom globals<\/strong><\/p>\n\n<ul>\n<li>Use the <code>block_logic_extra_globals<\/code> filter to allow any additional global variable in block logic expressions.<\/li>\n<li><p>Example:<\/p>\n\n<pre><code>add_filter('block_logic_extra_globals', function($allowed) {\n    $allowed[] = 'my_custom_flag';\n    return $allowed;\n});\n\n\/\/ Initialize the global somewhere\n$GLOBALS['my_custom_flag'] = true;\n<\/code><\/pre><\/li>\n<li><p>Usage in a block logic field:<\/p>\n\n<pre><code>$my_custom_flag &amp;&amp; is_user_logged_in()\n<\/code><\/pre><\/li>\n<\/ul><\/li>\n<\/ol><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>2.1.5<\/h4>\n\n<p>Raised version to show updated readme.txt<\/p>\n\n<h4>2.1.4<\/h4>\n\n<p>Raised version to show updated readme.txt<\/p>\n\n<h4>2.1.3<\/h4>\n\n<p>Raised version to show updated readme.txt<\/p>\n\n<h4>2.1.2<\/h4>\n\n<p>Raised version to show updated readme.txt<\/p>\n\n<h4>2.1.1<\/h4>\n\n<p>Raised version to show updated readme.txt<\/p>\n\n<h4>2.1.0<\/h4>\n\n<ul>\n<li>added filters to extend the functionality<\/li>\n<li>updated README for new plugin version<\/li>\n<\/ul>\n\n<h4>2.0.0<\/h4>\n\n<ul>\n<li>totally reworked and removed all directly evalled code<\/li>\n<\/ul>\n\n<h4>1.0.8<\/h4>\n\n<ul>\n<li>recompiled assets to remove console.log<\/li>\n<\/ul>\n\n<h4>1.0.7<\/h4>\n\n<ul>\n<li>added logic indicator to mark blocks that have logic applied<\/li>\n<\/ul>\n\n<h4>1.0.6<\/h4>\n\n<ul>\n<li>added check for Classic Block, Widget Block or Widget Area Block ['core\/freeform', 'core\/legacy-widget', 'core\/widget-area'], as those do not support block attributes<\/li>\n<li>added limitations to plugin description<\/li>\n<li>updated dev dependencies<\/li>\n<\/ul>\n\n<h4>1.0.5<\/h4>\n\n<ul>\n<li>added check for Classic Block and disabled display of settings there<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial Release of the plugin<\/li>\n<\/ul>","raw_excerpt":"Block Logic adds a &quot;Block Logic&quot; field to the block editor, that lets you show or hide any block based on conditions.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/kn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/116037","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/kn.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/kn.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=116037"}],"author":[{"embeddable":true,"href":"https:\/\/kn.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/landwire"}],"wp:attachment":[{"href":"https:\/\/kn.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=116037"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/kn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=116037"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/kn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=116037"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/kn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=116037"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/kn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=116037"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/kn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=116037"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}