mysql - How do I use shortcodes in a standard PHP page? -
i want use wordpress style shortcode in own cms. example, embedded tweets, can say:
[tweet 'tweet url']
and tweet embedded standard format supplied twitter. youtube videos:
[youtube 'youtube video']
will embed youtube video player. how php , mysql? not looking 'generic' system; manually adding shortcodes work fine me, long know doing.
wordpress has elaborate scheme processing post/page content in dbms , depositing in output stream. part of involves scanning text registered shortcodes , replacing them appropriate urls or other text.
the wordpress codex explains how write plugin implement shortcode. there plenty of examples at.
http://codex.wordpress.org/shortcode_api
but if you're going immplement in own cms need build own scheme processing content, , tie processing it.
Comments
Post a Comment