开发者 | BenjaminSommer |
---|---|
更新时间 | 2012年9月30日 16:49 |
捐献地址: | 去捐款 |
PHP版本: | 2.8 及以上 |
WordPress版本: | 3.5 |
clearly and explicitly state the thoughts behind your published programs
, key algorithms and complex code snippets.
Authors can better restart their own thought processes
at any later time, and other programmers
can understand the construction
of the program more easily.
Readers of your posts don't have to decipher the thought process behind the program from the code and
its associated comments.
Source code can be gradually implemented and explained, without the need to repeatedly refer to one complete source code.
Features:
Use WP shortcodes for that: [fragment name="unique fragment name" /]
. In normal cases, this should be placed within a parent fragment:
[fragment name="implemented parent fragment name"] ... [fragment name="define new fragment" /] ... [/fragment]
Just the the shortcode
[fragment name="define new fragment"] //add implementation here [/fragment]
You can add implementations step by step by repeatedly using this fragment with the same name. The plugin
does the rest.
Yes. Just type [fragment name="your_fragment_name"/]
into your WordPress editor.
Well, yes and no. Officially, nested shortcodes having the same name is not recommended/supported according to WordPress.org. But you use fragment
instead of fragment_def
- it worked on my system.
[fragment name="" ref /]
may be used as a shortcut for [fragment_ref name="" /]