{"id":22124,"date":"2026-05-06T20:14:52","date_gmt":"2026-05-06T19:14:52","guid":{"rendered":"https:\/\/johnjohnston.info\/blog\/?p=22124"},"modified":"2026-05-06T22:22:35","modified_gmt":"2026-05-06T21:22:35","slug":"php-blocks-in-wordpress-7","status":"publish","type":"post","link":"https:\/\/johnjohnston.info\/blog\/php-blocks-in-wordpress-7\/","title":{"rendered":"php blocks in WordPress 7"},"content":{"rendered":"\n<p><a href=\"https:\/\/wp-content.co\/how-to-build-php-only-gutenberg-blocks-in-wordpress-7\/\">How To Build PHP-Only Gutenberg Blocks In WordPress 7<\/a><\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>PHP-only blocks are an ideal migration path for existing shortcodes. The render logic is often identical \u2014 the only difference is where the parameters come from.<\/p>\n<\/blockquote>\n\n\n\n<p>As a very amateur and occasional dabbler in shortcodes &amp; very simple plugins this looks interesting. It will need WordPress 7 and php 8.1. There are already <a href=\"https:\/\/getbutterfly.com\/php-only-block-registration-in-wordpress\/\">quite<\/a> a <a href=\"https:\/\/kinsta.com\/blog\/php-only-gutenberg-blocks\/#a-realworld-example-of-phponly-blocks\">few<\/a> how to articles <a href=\"https:\/\/duckduckgo.com\/?q=example+php+only+blocks+for+wordpress+7\">out there<\/a> already.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As a very amateur and occasional dabbler in shortcodes &#038; very simple plugins this looks interesting. It will need WordPress 7 and php 8.1. There are already quite a few how to articles out there already.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"mf2_syndication":["https:\/\/bsky.app\/profile\/johnjohnston.info\/post\/3ml7fxs6obx2n","https:\/\/social.ds106.us\/@johnjohnston\/116529228007885443"],"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"webmentions_disabled_pings":false,"webmentions_disabled":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[953],"tags":[776,11],"post_format":[],"class_list":{"0":"post-22124","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-posse","7":"tag-gutenberg","8":"tag-wordpress","9":"kind-article","11":"h-entry","12":"hentry"},"better_featured_image":null,"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p57zFQ-5KQ","jetpack_likes_enabled":false,"jetpack_sharing_enabled":true,"kind":false,"_links":{"self":[{"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/posts\/22124","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/comments?post=22124"}],"version-history":[{"count":1,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/posts\/22124\/revisions"}],"predecessor-version":[{"id":22125,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/posts\/22124\/revisions\/22125"}],"wp:attachment":[{"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/media?parent=22124"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/categories?post=22124"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/tags?post=22124"},{"taxonomy":"post_format","embeddable":true,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/post_format?post=22124"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}