{"id":2760,"date":"2026-09-26T02:43:45","date_gmt":"2026-09-26T02:43:45","guid":{"rendered":"https:\/\/mailurdu.co.uk\/?p=2760"},"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:\/\/mailurdu.co.uk\/?p=2760","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>\n","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 and parsing is wildly dynamic. Shortcode syntax is only technically recognized for shortcodes registered at the time of parsing. This <a class=\"read-more\" href=\"https:\/\/mailurdu.co.uk\/?p=2760\">\u0645\u0632\u06cc\u062f \u067e\u0691\u06be\u06cc\u06ba<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2760","post","type-post","status-publish","format-standard","hentry","category-pakistan"],"_links":{"self":[{"href":"https:\/\/mailurdu.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/2760","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mailurdu.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mailurdu.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mailurdu.co.uk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mailurdu.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2760"}],"version-history":[{"count":0,"href":"https:\/\/mailurdu.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/2760\/revisions"}],"wp:attachment":[{"href":"https:\/\/mailurdu.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2760"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mailurdu.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2760"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mailurdu.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2760"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}