Àpèjúwe
Usage
Use the [insert] shortcode inside posts or anywhere else that processes shortcodes.
[insert] shortcode attributes
- query Ìtumọ̀ Yorùbá: – sets up a new
WP_Queryviaget_posts() - data Ìtumọ̀ Yorùbá: – data to pass to actions
- action Ìtumọ̀ Yorùbá: – action to run, runs for each post if applicable
- filter Ìtumọ̀ Yorùbá: – filter to run, runs for each post if applicable
- template Ìtumọ̀ Yorùbá: – template to load via
locate_template()
All attributes are optional and can be used in combination to yield powerful abilities.
Abilities
Possibilities with [insert] are endless. Practical uses include:
- Insert posts into posts
- Insert hooks into posts
- Insert posts into widgets
- Run action hooks via widgets
- Load templates via widgets
Examples
Insert a template
`
[insert template=”branding.php”]
`
Insert an action
`
[insert action=”dostuff”]
`
Pass data to an action
`
[insert data=”field=slug&value=example&tax=category” action=”dostuff”]
`
The action receives data as an array.
`
add_action(‘dostuff’, ‘print_r’);
`
Insert a page via template
`
[insert query=”name=about&post_type=page” template=”entry.php”]
`
Insert a page via action
This sets up the query and triggers the action.
`
[insert query=”name=about&post_type=page” action=”dostuff”]
`
WP template tags are available inside the action.
`
add_action(‘dostuff’, ‘the_title’);
`
Github
Ìgbéwọlẹ̀
Requires: PHP 5.3+
- Upload to the
/wp-content/plugins/directory - Activate through the Plugins menu in WordPress
Àwọn àgbéyẹ̀wò
Kò sí àwọn àgbéyẹ̀wò fún plugin yìí.
Àwọn Olùkópa & Olùgbéejáde
“insert” jẹ́ ètò ìṣàmúlò orísun ṣíṣí sílẹ̀. Àwọn ènìyàn wọ̀nyí ti ṣe ìkópa sí plugin yìí.
Àwọn OlùkópaṢe o nífẹ̀ẹ́ sí ìdàgbàsókè?
Ṣàwárí koodu, ṣàyẹ̀wò ibi ìpamọ́ SVN, tàbí ṣe àgbékalẹ̀ sí àkọsílẹ̀ ìdàgbàsókè nípasẹ̀ RSS.