Categories: General News

Dennis Snell: Enter the mess: Shortcodes

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 means that there is not a general Shortcode grammar.
  • Whether a shortcode has “content,” meaning whether it expects a closing tag, depends on whether the closing tag exists in the post.

This is a problem that has plagued me for years and I have generally just ignored. There’s an open Core issue in Trac for changing some shortcode parsing (#50683), and I have thought a lot about it.

But I think there is more to explore, and more to gain. Maybe this goes nowhere, but keep your eyes open for it.

The News Vista

Share
Published by
The News Vista

Recent Posts

Trump Shares Shehbaz Sharif UN Speech On Operation Sindoor, Claims Credit For India-Pakistan Truce – outlookindia.com

Trump Shares Shehbaz Sharif UN Speech On Operation Sindoor, Claims Credit For India-Pakistan Truce  outlookindia.com

49 minutes ago

Houthi strikes on Saudi Arabia? Pakistan’s role under lens; pact without an impact

Houthi attacks on Saudi Arabia raise concerns regarding Pakistan's military commitment defined in a recent…

54 minutes ago

SIR Should Not Be Used For Political Purposes: Karnataka CM Shivakumar – outlookindia.com

SIR Should Not Be Used For Political Purposes: Karnataka CM Shivakumar  outlookindia.com

1 hour ago

US planning military action in Cuba? Officials weigh ‘possible’ military action

The US Army Reserve is currently evaluating the potential deployment of military police and medical…

1 hour ago