Title: Units
Author: Kyle Phillips
Published: <strong>24 فوریه 2015</strong>
Last modified: 21 آگوست 2015

---

جستجوی افزونه‌ها

![](https://ps.w.org/units/assets/banner-772x250.png?rev=1098692)

این افزونه **با ۳ نگارش عمدهٔ اخیر وردپرس آزمایش نشده است**. ممکن است دیگر نگهداری
یا پشتیبانی نشود و هنگام استفاده با نگارش‌های تازه‌تر وردپرس مشکل سازگاری داشته 
باشد.

![](https://ps.w.org/units/assets/icon-128x128.png?rev=1098692)

# Units

 توسط [Kyle Phillips](https://profiles.wordpress.org/kylephillips/)

[دانلود](https://downloads.wordpress.org/plugin/units.1.0.2.zip)

 * [جزئیات](https://fa.wordpress.org/plugins/units/#description)
 * [نقد و بررسی‌ها](https://fa.wordpress.org/plugins/units/#reviews)
 *  [نصب](https://fa.wordpress.org/plugins/units/#installation)
 * [توسعه](https://fa.wordpress.org/plugins/units/#developers)

 [پشتیبانی](https://wordpress.org/support/plugin/units/)

## توضیحات

**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](http://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](http://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](http://unitswitcher.com) for more detailed information.

## عکس‌های صفحه

[⌊Display a dropdown method for users to toggle between units of measurement.⌉⌊Display
a dropdown method for users to toggle between units of measurement.⌉[

Display a dropdown method for users to toggle between units of measurement.

[⌊Optionally save the user's preference via the session or cookie.⌉⌊Optionally save
the user's preference via the session or cookie.⌉[

Optionally save the user’s preference via the session or cookie.

[⌊Add as many units/alternate units as needed.⌉⌊Add as many units/alternate units
as needed.⌉[

Add as many units/alternate units as needed.

## نصب

 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

## سوالات متداول

  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`.

## نقد و بررسی‌ها

نقد و بررسی‌ای برای این افزونه یافت نشد.

## توسعه دهندگان و همکاران

“Units” نرم افزار متن باز است. افراد زیر در این افزونه مشارکت کرده‌اند.

مشارکت کنندگان

 *   [ Kyle Phillips ](https://profiles.wordpress.org/kylephillips/)

[ترجمه “Units” به زبان شما.](https://translate.wordpress.org/projects/wp-plugins/units)

### علاقه‌ مند به توسعه هستید؟

[کد را مرور کنید](https://plugins.trac.wordpress.org/browser/units/)، [مخزن SVN](https://plugins.svn.wordpress.org/units/)
را بررسی کنید، یا از طریق [RSS](https://plugins.trac.wordpress.org/log/units/?limit=100&mode=stop_on_copy&format=rss)
در [گزارش توسعه](https://plugins.trac.wordpress.org/log/units/) مشترک شوید.

## گزارش تغییرات

#### 1.0.2

 * Bug fix – conflict with Bootstrap Javascript libary resolved.

#### 1.0.1

 * Page caching conflicts resolved. If using a page cache plugin, visit Settings
   > Unit Switcher to enable the fix.
 * Minor bug fixes in options saving

#### 1.0

 * Initial release

## اطلاعات

 *  نگارش **1.0.2**
 *  آخرین به‌روزرسانی **11 سال پیش**
 *  نصب‌های فعال **10+**
 *  نگارش وردپرس ** 3.8 یا بالاتر **
 *  آزمایش‌شده تا **4.3.34**
 *  زبان
 * [English (US)](https://wordpress.org/plugins/units/)
 * برچسب
 * [localization](https://fa.wordpress.org/plugins/tags/localization/)[measurements](https://fa.wordpress.org/plugins/tags/measurements/)
   [units](https://fa.wordpress.org/plugins/tags/units/)
 *  [نمایش پیشرفته](https://fa.wordpress.org/plugins/units/advanced/)

## امتیازها

 5 از 5 ستاره.

 *  [  امتیاز 1 5-ستاره     ](https://wordpress.org/support/plugin/units/reviews/?filter=5)
 *  [  امتیاز 0 4-ستاره     ](https://wordpress.org/support/plugin/units/reviews/?filter=4)
 *  [  امتیاز 0 3-ستاره     ](https://wordpress.org/support/plugin/units/reviews/?filter=3)
 *  [  امتیاز 0 2-ستاره     ](https://wordpress.org/support/plugin/units/reviews/?filter=2)
 *  [  امتیاز 0 1-ستاره     ](https://wordpress.org/support/plugin/units/reviews/?filter=1)

[بررسی شما](https://wordpress.org/support/plugin/units/reviews/#new-post)

[مشاهدهٔ همهٔ بررسی‌ها](https://wordpress.org/support/plugin/units/reviews/)

## مشارکت کنندگان

 *   [ Kyle Phillips ](https://profiles.wordpress.org/kylephillips/)

## پشتیبانی

چیزی برای گفتن دارید؟ نیاز به کمک دارید؟

 [مشاهده انجمن پشتیبانی](https://wordpress.org/support/plugin/units/)

## کمک مالی

آیا تمایل دارید از پیشرفت این افزونه حمایت کنید؟

 [ کمک مالی به این افزونه ](http://unitswitcher.com/)