Easily insert progress meters into your content and/or sidebars.
As of this writing WordPress does not support shortcodes in text
widgets. ProgPress has the ability to enable all shortcodes in
text widgets (not just [progpress]), but it is turned off by
default. It can be enabled on the ProgPress settings page.
The code is based on a proposed patch to WordPress core. Hopefully this feature is added to WordPress itself at some later date. I've tried to code defensively so if the feature is added to WordPress in the future, having it enabled in the plugin should not have any negative side effects.
Please check out the Examples section on the settings page. It will generate markup and display the default styles for the currently installed version of ProgPress when you click "Load Examples". I've done this rather than put a static copy here that I might forget to update in future.
Since ProgPress pre-dates shortcodes being added to WordPress it
originally used an older syntax based on HTML comments. This syntax is
still supported (although newer features like label have not been
back-ported). It can be enabled on the ProgPress settings page.
You add a progress meter by including the following in a post or in a text widget:
<!--progpress|title|goal|current|previous|label-->
Only these five options are supported, only the first three are required.
Sure. You can call the jcp_progpress_generate_meter function
directly.
<?php if (function_exists('jcp_progpress_generate_meter')){
echo jcp_progpress_generate_meter("title", 100, 50, 25, "label");
}?>
The arguments to the function are:
title
, goal, current, previous, label, separator, class,
and prefix (in that order).
Inline styles (based on the default styles) are used to ensure the meters render in RSS readers.
Requires: 2.2 or higher
Compatible up to: 3.3.2
Last Updated: 2010-10-19
Downloads: 4,667
Got something to say? Need help?