Table of Contents
Mtekk’s Testimonials is a WordPress 2.5 plugin that allows users to submit testimonials. This is useful for hosting companies, or anyone who makes, sells, or distributes a product. As a modern plugin, Mtekk’s Testimonials conforms to the WordPress i18n recommendations, supports short code hooks, and nonce protection. When placed on the front page, AJAX functionality, brought by MooTools, is available (with super safe fall back).
Latest Testing Release: Mtekk’s Testimonials 1.1.0
- Download the theme zip archive, see Download section.
- Extract the contents of the zip archive into your plugins folder (wp-content/plugins).
- Enable the plugin in the administration panel under the plugins section.
- Continue onto the Usage section.
There are two methods of placing a testimonial on a page. Either WordPress short code tags can be used or direct calling of the PHP functions.
The generic short code tag for displaying a testimonial is:
The primary variation to this is to specify a particular ID like so:
Passing in no or a negative ID value will result in a random testimonial being picked from the approved testimonials in the database. When a ID equal to zero is specified, the action taken is specified in the setting “Default Start ID”. For all specified, non-negative IDs, the navigation links for navigating the testimonial list are not displayed.
PHP Function Call
mtest_display($id, $echo = true, $die = false) may be called directly from any template, or plug-in php file. It has three parameters: $id, $echo, and $die.
$id is the only required parameter, it can be used exactly the same as the id parameter in the Short Code. A negative $id will result in a random testimonial being displayed. A valid, positive $id will result in that testimonial being displayed. If $id is set to 0 its action will be defined by the value of the “Default Start ID” setting.
$echo is an optional parameter which will default to true if not specified. When $echo is true, the function will echo it’s output. If $echo is false, the output string will be returned.
$die is an optional parameter which will default to false if not specified. When $die is true, the function will die after echoing it’s output. This is useful for AJAX operations where we don’t want WordPress to handle output. This parameter is only valid when $echo is true.
Version History and Changelog
- 1.1.0 [7-17-2008]:
New Feature: Now utilizes Mootools 1.2.
New Feature: Now restricting the domain/TLD of the submitted websites is optional.
New Feature: More user friendly reporting of errors in filling out the add testimonial form.
- 1.0.0 [5-31-2008]:
Initial public release
Mtekk’s Testimonials is released under the GNU GPL 2.0 license and comes with absolutely no warranty. Portions licensed under the Open Source MIT License. These include the distributed MooTools library. By downloading Mtekk’s Testimonials you agree to the terms of the GNU GPL 2.0 and MIT licenses.