WordPress Shortcode API
Though I have been using WordPress for over a year, some of its features still amaze and surprise me.
One of these features is the Shortcode API since version 2.5. As many would have used to insert photo galleries in a post, shortcodes are used to place custom "tags" in the content, which later will be converted or processed by WordPress or plugins.
For example:
1 | [gallery id="123" size="medium"] |
The shortcode API processes the 'id' and 'size' attributes without the need to write regular expressions for string matching. Many have utilized this mechanism to construct a user-friendly environment for insert images, thumbnails, Google ads and more.







Categorized under
Posted at 08:09:2802.17.2009.
Has no comments, add a comment below. 





