WordPress plugin intelligence profile

functionsCapacitor

This plugin allow to apply some WordPress API's functions into your post/page content or as a widget.

WP PlugIndex snapshot

Current directory snapshot

Tested up to WordPress 4.0
Current version0.9.6
WordPress coverageTested up to WordPress 4.0
Minimum stackWP 3.0.1 · PHP —
Directory statusactive
Last directory update29 Oct 201412y ago
Active installations10Adoption metric — not a quality score
WordPress.org rating5.0 / 5 from 1 ratings
Official packageDirect from WordPress.org

Repository metrics are context, not quality scores. Active installations measure adoption and can strongly reflect a plugin’s age and historical popularity. Ratings, recent updates and “Tested up to” metadata also do not guarantee modern code, error-free operation, security, feature completeness or suitability for a particular site. Why active installs don’t tell the whole story →

WP PlugIndex currently records functionsCapacitor version 0.9.6 as active, updated 12y ago and tested up to WordPress 4.0.

Overview

About this plugin

>

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

  • Safe process to use this plugin on WordPress MU or WP MultiSite.
  • Allow to personalize Embedded output

for each functions.

  • Easy and powerfull Functions arguments syntax

to apply any WordPress API options.

  • Generic functions arguments with Magic keywords.
  • NEW: use WordPress conditional tags as option to display a widget.
  • Structured source-code to prevent any conflict.

Three methods to use WordPress API functions:

Method by shortcode tag

Insert a tag into your content like [fct function_name=”parameter1=value&parameter2=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&parameter2=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&parameter2=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%”]

Embedded output

Any functionsCapacitor request will insert <div class="functionsCapacitor">functions output</div>.

Shortcode method allow to personalize main container like

[fct container=”HTML tag name” class=”class(es) name(s)” style=”CSS properties” function1=”args” function2=”args”].

set container=”” to remove main container.

Some functions output were inserted with dedicated container like

function output

or <div class="function_name">function output</div>.

Personalize this container with Special functions parameters.

Functions arguments syntax

Follow these examples to setup your requests:

  • “parameter1=something&parameter2=25”,

parameter1 and parameter2 typed as strings.

  • “parameter1=something&parameter2=false”,

parameter2 typed as boolean.

  • “parameter1=&parameter2= &parameter3=””,

any parameters equal empty string.

  • “parameter1= something &parameter2=’ something ‘”,

parameter1 equal ‘something’,

parameter2 equal ‘ something ‘.

  • “parameter1=something&parameter2=array(‘something’,’something’)”,

parameter2 typed as an array of 2 strings.

  • “parameter1=something&parameter2=array(10,5,20)”,

parameter2 typed as an array of 3 integers.

  • “parameter1=something&parameter2=array(true,false)”,

parameter2 typed as an array of 2 booleans.

Not supported issues:

  • parameter’s value can’t contain “&” or “=” characters.
  • parameter’s value can’t contain an associative array like array(‘name’=>value,’name’=>value).
  • parameter’s value can’t contain an array of arrays.
  • parameter’s value can’t contain a PHP variable like $post->ID,

see Magic keywords.

  • parameter’s value can’t request a PHP or WordPress function.
  • parameter’s value can’t contain PHP source-code.

Magic keywords

Use these keywords to obtain variables values into your functions arguments:

  • %postID% => $post->ID,

ID of post or page where made the request:

related post/page into a shortcode,

or current post/page into a widget.

  • %postparent% => $post->post_parent,

ID of parent page where made the request.

  • %postauthor% => $post->post_author,

author ID of post where made the request.

  • %defaultcatID% => default_category,

ID of default category for newest posts.

  • %posttagIDs% => wp_get_post_tags(),

string of current post tags IDs as “1,2,3,…”

  • %posttagslugs% => wp_get_post_tags(),

string of current post tags slugs as “slug-name,slug-name,…”

You can use magic keywords into an array.

Example: wp_list_categories=”exclude=array(%defaultcatID%,1,2,…)”

Special functions parameters

  • fct:container to set HTML tag of function container.

Set “fct:container=”” to remove this container.

Each functions have a default container related to its output.

  • fct:container_id to set container “id” attribute.
  • fct:container_class to set container “class” attribute.

Function name as default.

Example with shortcode: [fct function_name=”fct:container_class=name&param1=value&param2=value”].

  • fct:container_style to set container “style” attribute.

functionsCapacitor not create a container if the API function still return a container.

See WordPress Codex to personalize them.

Supported functions

  • get_the_post_thumbnail()

with size=thumbnail|medium|large|post-thumbnail

php.

  • get_the_tag_list()

with before=”&sep=’ ‘&after=” as default,

apply only on page or post,

rendered into DIV container

  • wp_get_archives()

with echo=0&format=html as default

  • wp_get_recent_posts()

rendered as list with UL container,

with exclude=%postID%&suppress_filters=false&post_status=publish&fct:perm=readable as default

(see bellow)

  • wp_list_authors()

with echo=0 as default

  • wp_list_bookmarks()

with echo=0 as default

  • wp_list_categories()

with echo=0 as default

  • wp_list_pages()

with echo=0 as default

  • wp_nav_menu()

with echo=false as default,

see Codex to setting its container

  • wp_tag_cloud()

with echo=0 as default,

format=flat|list only

See WordPress Codex about these functions and their arguments syntax.

fr

wp_get_recent_posts()

  • if fct:perm=readable hide draft, future, pending, protected posts

but display private posts if user is allowed.

  • if fct:perm=” not output permalink of draft, future, pending, private posts.
  • set fct:show_excerpt=1|true to display posts excerpts.
  • set fct:show_date=1|true to display posts dates.
  • set fct:show_thumbnail=1|true to display post thumbnail,

with fct:thumbnail_size=thumbnail|medium|large|post-thumbnail

php.

  • fct:show_thumbnail=true if fct:thumbnail_size is defined
  • display excerpt and thumbnail for draft, future, pending, private, and protected posts

but not create an excerpt from content.

Supported conditional functions

  • cat_is_ancestor_of()

check if current category is child of conditional argument.

  • in_category()
  • is_category()
  • is_front_page()
  • is_home()
  • is_page()
  • is_single()

See WordPress Conditional Tags about these functions and their arguments syntax.

Not canonical conditional functions

These functions are designed for this plugin only, not available elsewhere, and not documented into the WordPress Codex.

  • in_tree_of()

check if page, post, or category is descendant of conditional argument (or itself),

require argument as page or category numeric ID.

  • is_category_in_tree_of()

check if category is descendant of conditional argument (or itself),

require argument as category numeric ID.

  • is_page_descendant_of()

check if page is descendant of conditional argument,

require argument as page numeric ID.

  • is_page_in_tree_of()

check if page is descendant of conditional argument (or itself),

require argument as page numeric ID.

  • is_single_in_tree_of()

check if post is in descendant of conditional argument,

require argument as category numeric ID.

Conditional functions arguments syntax

Support only arguments as single value; string, numeric, or magic keyword.

WordPress.org metadata

Plugin tags

Topics listed for this plugin in the WordPress.org directory.

  • api
  • codex
  • content
  • post
  • shortcode
Compatibility & maintenance

Compatibility & maintenance

Tested up to WordPress 4.0

Not yet marked as tested with WordPress 7.1. WordPress.org currently lists Tested up to 4.0.

Current WordPress releaseWordPress 7.1
WordPress.org Tested up to4.0
Minimum requirementsWordPress 3.0.1 · PHP not listed
Update activity29 Oct 201412y ago

“Tested up to” is directory metadata supplied by the plugin author. WP PlugIndex does not turn an older declaration into a claim that the plugin is incompatible.

Changes recorded by WP PlugIndex

Recent tracked changes

No tracked version or compatibility changes have been recorded by WP PlugIndex yet.

Tracking & source

WP PlugIndex tracks public WordPress.org directory metadata and records selected version, compatibility and availability changes as they are detected.

Plugin watchlist

Watch this plugin

Sign in to your WP PlugIndex account or create a free account. Free accounts can watch up to 5 plugins and see what changed.

Watch limit

Watchlist limit reached

You have reached your current active watch limit.