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

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -