Linux 软件免费装
Banner图

Units

开发者 kylephillips
更新时间 2015年8月21日 10:14
捐献地址: 去捐款
PHP版本: 3.8 及以上
WordPress版本: 4.3

标签

localization units measurements

下载

1.0 1.0.1 1.0.2

详情介绍:

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.

安装:

  1. Upload unit-switcher to the wp-content/plugins/ directory
  2. Activate the plugin through the Plugins menu in WordPress
  3. Visit the plugin settings to add units of measurement
  4. Use the unit_switcher() template function or [unit_switcher] shortcode to display the switcher

屏幕截图:

  • Display a dropdown method for users to toggle between units of measurement.
  • Optionally save the user's preference via the session or cookie.
  • Add as many units/alternate units as needed.

升级注意事项:

1.0 Initial release

常见问题:

Is this plugin WPML compatible?

The plugin is not yet WPML compatible.

How do I add a unit of measurement?

Visit Settings > Unit Switcher. A primary unit of measurement is required, along with at least one alternate unit. Substitute the primary unit with X in the formula to equal the alternate formula. So, to set an alternate unit of inches for a primary unit of feet, the formula should be set to X*12.

更新日志:

1.0.2 1.0.1 1.0