{"id":1037,"date":"2026-09-26T02:43:45","date_gmt":"2026-09-26T02:43:45","guid":{"rendered":"https:\/\/reservasantaelena.org\/index.php\/2026\/09\/26\/dennis-snell-enter-the-mess-shortcodes\/"},"modified":"2026-09-26T02:43:45","modified_gmt":"2026-09-26T02:43:45","slug":"dennis-snell-enter-the-mess-shortcodes","status":"publish","type":"post","link":"https:\/\/reservasantaelena.org\/index.php\/2026\/09\/26\/dennis-snell-enter-the-mess-shortcodes\/","title":{"rendered":"Dennis Snell: Enter the mess: Shortcodes"},"content":{"rendered":"<p class=\"wp-block-paragraph\">Tonight I started working on some Shortcode processing in WordPress. This is an historically nasty problem because the Shortcode syntax and parsing is wildly dynamic.<\/p>\n<ul class=\"wp-block-list\">\n<li>Shortcode syntax is only technically recognized for shortcodes registered at the time of parsing. This means that there is not a general Shortcode grammar.<\/li>\n<li>Whether a shortcode has \u201ccontent,\u201d meaning whether it expects a closing tag, depends on whether the closing tag <em>exists<\/em> in the post.<\/li>\n<\/ul>\n<p class=\"wp-block-paragraph\">This is a problem that has plagued me for years and I have generally just ignored. There\u2019s an open Core issue in Trac for changing some shortcode parsing (<a href=\"https:\/\/core.trac.wordpress.org\/ticket\/50683\">#50683<\/a>), and I have thought a lot about it.<\/p>\n<p class=\"wp-block-paragraph\">But I think there is more to explore, and more to gain. Maybe this goes nowhere, but keep your eyes open for it.<\/p>","protected":false},"excerpt":{"rendered":"<p>Tonight I started working on some Shortcode processing in WordPress. This is an historically nasty problem because the Shortcode syntax [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1037","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"aioseo_notices":[],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"ultp_layout_landscape_large":false,"ultp_layout_landscape":false,"ultp_layout_portrait":false,"ultp_layout_square":false,"awb_sm":false,"awb_md":false,"awb_lg":false,"awb_xl":false},"uagb_author_info":{"display_name":"WalterRBNSE","author_link":"https:\/\/reservasantaelena.org\/index.php\/author\/walterrbnse\/"},"uagb_comment_info":0,"uagb_excerpt":"Tonight I started working on some Shortcode processing in WordPress. This is an historically nasty problem because the Shortcode syntax [&hellip;]","_links":{"self":[{"href":"https:\/\/reservasantaelena.org\/index.php\/wp-json\/wp\/v2\/posts\/1037","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/reservasantaelena.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/reservasantaelena.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/reservasantaelena.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/reservasantaelena.org\/index.php\/wp-json\/wp\/v2\/comments?post=1037"}],"version-history":[{"count":0,"href":"https:\/\/reservasantaelena.org\/index.php\/wp-json\/wp\/v2\/posts\/1037\/revisions"}],"wp:attachment":[{"href":"https:\/\/reservasantaelena.org\/index.php\/wp-json\/wp\/v2\/media?parent=1037"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/reservasantaelena.org\/index.php\/wp-json\/wp\/v2\/categories?post=1037"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/reservasantaelena.org\/index.php\/wp-json\/wp\/v2\/tags?post=1037"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}