{"id":34715,"date":"2015-02-24T23:58:41","date_gmt":"2015-02-24T23:58:41","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/units\/"},"modified":"2015-08-21T02:13:21","modified_gmt":"2015-08-21T02:13:21","slug":"units","status":"publish","type":"plugin","link":"https:\/\/pcd.wordpress.org\/plugins\/units\/","author":13158158,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.0.2","stable_tag":"1.0.2","tested":"4.3.34","requires":"3.8","requires_php":"","requires_plugins":"","header_name":"Units","header_author":"Kyle Phillips","header_description":"","assets_banners_color":"363c40","last_updated":"2015-08-21 02:13:21","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/unitswitcher.com\/","header_plugin_uri":"http:\/\/unitswitcher.com","header_author_uri":"https:\/\/github.com\/kylephillips","rating":5,"author_block_rating":0,"active_installs":10,"downloads":2067,"num_ratings":1,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":{"1.0":"<p>Initial release<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"1"},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":"1098692","resolution":"128x128","location":"assets"}},"assets_banners":{"banner-772x250.png":{"filename":"banner-772x250.png","revision":"1098692","resolution":"772x250","location":"assets"}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0","1.0.1","1.0.2"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":"1098692","resolution":"1","location":"assets"},"screenshot-2.png":{"filename":"screenshot-2.png","revision":"1098692","resolution":"2","location":"assets"},"screenshot-3.png":{"filename":"screenshot-3.png","revision":"1098692","resolution":"3","location":"assets"}},"screenshots":{"1":"<p>Display a dropdown method for users to toggle between units of measurement.<\/p>","2":"<p>Optionally save the user's preference via the session or cookie.<\/p>","3":"<p>Add as many units\/alternate units as needed.<\/p>"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[1734,38120,12664],"plugin_category":[48],"plugin_contributors":[78852],"plugin_business_model":[],"class_list":["post-34715","plugin","type-plugin","status-publish","hentry","plugin_tags-localization","plugin_tags-measurements","plugin_tags-units","plugin_category-language-tools","plugin_contributors-kylephillips","plugin_committers-kylephillips"],"banners":{"banner":"https:\/\/ps.w.org\/units\/assets\/banner-772x250.png?rev=1098692","banner_2x":false,"banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/units\/assets\/icon-128x128.png?rev=1098692","icon_2x":false,"generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/units\/assets\/screenshot-1.png?rev=1098692","caption":"<p>Display a dropdown method for users to toggle between units of measurement.<\/p>"},{"src":"https:\/\/ps.w.org\/units\/assets\/screenshot-2.png?rev=1098692","caption":"<p>Optionally save the user's preference via the session or cookie.<\/p>"},{"src":"https:\/\/ps.w.org\/units\/assets\/screenshot-3.png?rev=1098692","caption":"<p>Add as many units\/alternate units as needed.<\/p>"}],"raw_content":"<!--section=description-->\n<p><strong>Why Units?<\/strong><\/p>\n\n<p>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 \u2013 configurable under the plugin settings.<\/p>\n\n<p>Any number of primary\/alternate units can be added, along with their conversion formulas.<\/p>\n\n<p>Visit <a href=\"http:\/\/unitswitcher.com\">unitswitcher.com<\/a> for more detailed information.<\/p>\n\n<p><strong>Using Units<\/strong><\/p>\n\n<p>Add primary units under Settings &gt; Units. Alternate units may be added by providing their name and conversion formula. Multiple alternate units may be added for each primary unit.<\/p>\n\n<p>Use the function <code>unit_switcher($value, $primaryunit, $round)<\/code> in your template to display the switcher. Pass the stored value as the first parameter and primary unit of measurement as the second value.<\/p>\n\n<p>To display a single switcher, the shortcode [unit_switcher] is available for use. The shortcode requires two parameters: <code>unit<\/code> (the primary unit being converted) and <code>value<\/code> (the stored value).<\/p>\n\n<p>For more information visit <a href=\"http:\/\/unitswitcher.com\">unitswitcher.com<\/a>.<\/p>\n\n<p><strong>Important: Unit Switcher requires WordPress version 3.8 or higher, and PHP version 5.3.2 or higher.<\/strong><\/p>\n\n<h3>More Information<\/h3>\n\n<h4>Using the Template Function<\/h4>\n\n<p><strong>unit_switcher($variable, $primaryunit, $round);<\/strong><\/p>\n\n<p>Parameters:\n* $variable - The stored value (integer or float)\n* $primaryunit - The primary unit (the stored value should be stored in this unit)\n* $round - Number of digits to round to (default is 2)<\/p>\n\n<p>Visit <a href=\"http:\/\/unitswitcher.com\">unitswitcher.com<\/a> for more detailed information.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload unit-switcher to the wp-content\/plugins\/ directory<\/li>\n<li>Activate the plugin through the Plugins menu in WordPress<\/li>\n<li>Visit the plugin settings to add units of measurement<\/li>\n<li>Use the unit_switcher() template function or [unit_switcher] shortcode to display the switcher<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt>Is this plugin WPML compatible?<\/dt>\n<dd><p>The plugin is not yet WPML compatible.<\/p><\/dd>\n<dt>How do I add a unit of measurement?<\/dt>\n<dd><p>Visit Settings &gt; Unit Switcher. A primary unit of measurement is required, along with at least one alternate unit. Substitute the primary unit with <code>X<\/code> in the formula to equal the alternate formula. So, to set an alternate unit of <code>inches<\/code> for a primary unit of <code>feet<\/code>, the formula should be set to <code>X*12<\/code>.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.2<\/h4>\n\n<ul>\n<li>Bug fix - conflict with Bootstrap Javascript libary resolved.<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Page caching conflicts resolved. If using a page cache plugin, visit Settings &gt; Unit Switcher to enable the fix.<\/li>\n<li>Minor bug fixes in options saving<\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>Initial release<\/li>\n<\/ul>","raw_excerpt":"Add front-end dropdowns for toggling measurement units.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/34715","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=34715"}],"author":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/kylephillips"}],"wp:attachment":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=34715"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=34715"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=34715"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=34715"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=34715"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=34715"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}