This plugin allow to apply some WordPress API's functions into your post/page content or as a widget.
Author: | oliezekat (profile at wordpress.org) |
WordPress version required: | 3.0.1 |
WordPress version tested: | 4.0.0 |
Plugin version: | 0.9.6 |
Added to WordPress repository: | 28-02-2012 |
Last updated: | 29-10-2014
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
|
Rating, %: | 100 |
Rated by: | 1 |
Plugin URI: | http://wordpress.org/extend/plugins/functions... |
Total downloads: | 2 198 |
Active installs: | 10+ |
Click to start download
|
Back WordPress API to the content.
You can request some* functions of WordPress API with same syntax for arguments into your posts, pages, or widgets content.
functionsCapacitor will insert function result into your content as HTML output.
(*) see Supported functions
or conditional tags.
Features
Three methods to use WordPress API functions :
Method by shortcode tag
Insert a tag into your content like [fct function_name="parameter1=value¶meter2=value"].
One shortcode tag can request several functions, input [fct function_name1="arguments" function_name2="arguments"].
Method with a widget
Add a functionsCapacitor widget, select a function, input function parameters like "parameter1=value¶meter2=value" (without quotes).
Optional: choose a supported conditional function to decide where to display your widget.
Method by custom fields
Set a custom field name with function name and put function arguments into custom field value like "parameter1=value¶meter2=value" (without quotes).
- Result is always inserted at end.
- Plugin has priority 5. Most plugins use priority 10.
- This method is applied if post/page is displayed.
Examples
- Tag cloud of popular posts tags,
insert [fct wp_tag_cloud]
- List of children pages of current page,
insert [fct wp_list_pages="title_li=&child_of=%postID%&depth=1"]
- List of category's recent posts with excerpts,
insert [fct wp_get_recent_posts="category=X&fct:show_excerpt=1"]
with X equal category ID number
- List of categories without default category,
insert [fct wp_list_categories="title_li=&exclude=%defaultcatID%"]
FAQ
Is it safe ?
Yes ! And you can install functionsCapacitor on WPMU or WPMS.
- functionsCapacitor not execute or eval users input (function name or arguments).
- functionsCapacitor output is managed by WordPress itself, and related to users role.
Example: wp_list_pages() function will not return private pages if current user is anonymous.
How come from functions capacitor idea ?
I was standing on my chair in front of the computer,
I was copy-paste a hack into a template,
the desk was wet,
my mouse slipped, right button hit the flowerpot,
and when I saw the result on screen I had a revelation ! A vision !
The functions capacitor !
D’où vient l’idée du convecteur de fonctions ?
J’étais assis devant mon ordinateur,
j’allais copier-coller un hack dans un template,
le bureau était mouillé,
ma souris a glissé, le bouton-droit a heurté le pot de fleurs,
et en voyant le résultat à l’écran j’ai eu une révélation ! Une vision !
Le convecteur de fonctions !
ChangeLog
0.9.6
- support is_page() conditional function.
- add is_page_in_tree_of() conditional function (not canonical).
- in_tree_of() support page ID as argument.
- add is_page_descendant_of() conditional function (not canonical).
- Tested with WordPress 4.0 (and 3.5.1).
0.9.5
- fix issue while esc_textarea() API is missing.
- support is_category() conditional function.
- support cat_is_ancestor_of() conditional function.
- support is_single() conditional function.
- support in_category() conditional function.
- add is_category_in_tree_of() conditional function (not canonical).
- add is_single_in_tree_of() conditional function (not canonical).
- add in_tree_of() conditional function (not canonical).
- support get_the_post_thumbnail() function.
0.9.4
- add fct:show_date for wp_get_recent_posts().
- add fct:container_id special parameter.
0.9.3
- add conditional options to choose when to display or not a widget,
- support is_home() conditional function.
- support is_front_page() conditional function.
0.9.2
- set post_status=publish as default for wp_get_recent_posts().
- allow post_status=draft|future|pending for wp_get_recent_posts(),
but require to set fct:perm=” to display these posts.
- if request wp_get_recent_posts() with fct:perm=”,
any posts with as draft, future, pending, private status are display without permalink.
0.9
- add fct:perm=readable for wp_get_recent_posts().
0.8
- add fct:container special parameter.
- support get_the_tag_list().
- allow to personalize “style” attribute of shortcode main container.
- add fct:container_style special parameter.
- add %defaultcatID% magic keyword.
- add %posttagIDs% magic keyword.
- add %posttagslugs% magic keyword.
0.7
- add fct:show_thumbnail and fct:thumbnail_size parameters for wp_get_recent_posts().
- allow to personalize shortcode main container.
0.6
- support wp_list_authors().
- add %postparent% magic keyword.
- add %postauthor% magic keyword.
0.5
- purpose to use API’s functions as a widget.
- set “exclude=%postID%” as default for wp_get_recent_posts().
0.4
- support wp_get_recent_posts() as UL list rendering.
- support parameter value as an array of strings, integers, or booleans
like “parameter=array(‘string’,integer,true,false,…)”.
- check an API function exists.
- add special parameter “fct:container_class=class(es) name(s)”.
0.3
- support wp_tag_cloud() function.
0.2
- support wp_nav_menu() function.
- fix function arguments processing from shortcode tag.
0.1
- Experimental release which support wp_get_archives(), wp_list_bookmarks(), wp_list_categories(), and wp_list_pages().