Units

plugin banner

Add front end dropdown for toggling and saving of units and measurements.

Author:Kyle Phillips (profile at wordpress.org)
WordPress version required:3.8
WordPress version tested:4.3.33
Plugin version:1.0.2
Added to WordPress repository:24-02-2015
Last updated:21-08-2015
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://unitswitcher.com
Total downloads:1 558
Active installs:10+
plugin download
Click to start download

Why Units?

Units provides your users with an intuitive way to choose and display their preferred unit of measurement. The user’s preferred unit of measurement is saved via session, cookie, or none – configurable under the plugin settings.

Any number of primary/alternate units can be added, along with their conversion formulas.

Visit unitswitcher.com for more detailed information.

Using Units

Add primary units under Settings > Units. Alternate units may be added by providing their name and conversion formula. Multiple alternate units may be added for each primary unit.

Use the function unit_switcher($value, $primaryunit, $round) in your template to display the switcher. Pass the stored value as the first parameter and primary unit of measurement as the second value.

To display a single switcher, the shortcode [unit_switcher] is available for use. The shortcode requires two parameters: unit (the primary unit being converted) and value (the stored value).

For more information visit unitswitcher.com.

Important: Unit Switcher requires WordPress version 3.8 or higher, and PHP version 5.3.2 or higher.

More Information

Using the Template Function

unit_switcher($variable, $primaryunit, $round);

Parameters:
* $variable – The stored value (integer or float)
* $primaryunit – The primary unit (the stored value should be stored in this unit)
* $round – Number of digits to round to (default is 2)

Visit unitswitcher.com for more detailed information.


Screenshots
FAQ
ChangeLog