| 开发者 | catalonec |
|---|---|
| 更新时间 | 2026年11月18日 17:18 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
[unitflip value="350" from="F"] shows 350 °F (177 °C).
[unitflip value="2" from="cups" to="ml"] shows 2 cups (473.2 ml).
If you leave out to, Catalonec Unit Converter picks the usual metric or imperial counterpart (°F → °C, lb → kg, mi → km, cups → ml, and so on).
Interactive converter block
Add the "Unit Converter" block (or the [unitflip_converter category="temperature"] shortcode) and visitors can convert any value themselves. It works on phones, has a swap button and is keyboard and screen-reader friendly.
Categories
Length, weight, temperature, volume (including cups, tablespoons, teaspoons, fluid ounces, pints, quarts, US and UK gallons), area, speed, pressure, energy (calories and kilojoules), power, fuel economy (L/100 km, km/L, mpg) and data size.
Settings
Choose the number of decimals and the display style: 350 °F (177 °C), 350 °F / 177 °C, or only the converted value with the original on hover.
Lightweight and private
No external requests, no tracking, no cookies, no database tables. The script loads only on pages that contain a converter.
Catalonec Unit Converter Pro add-on
A separate, optional add-on is available that converts measurements already written in your posts automatically (no shortcodes needed), adds a metric/imperial switch for visitors, and converts cups of common baking ingredients to grams. Everything described above stays free in this plugin.
For developers
Filters: unit_flip_units (add categories or units), unit_flip_symbols, unit_flip_counterparts, unit_flip_category_labels.
catalonec-unit-converter folder to /wp-content/plugins/.[unitflip] shortcode in your text or add the "Unit Converter" block. Options are in Settings → Catalonec Unit Converter.Short keys like F, C, kg, lb, oz, cup, tbsp, tsp, ml, l, mi, km, ft, m, in, cm, mph, kmh, psi, bar, kcal, kJ, mpg, l100, plus common spellings such as fahrenheit, pounds, cups or km/h.
The original text is shown unchanged, so your post still reads correctly.
Yes. value="1,5" works, and results follow your site's number format.
Cups to grams depends on the ingredient, so this plugin converts volume to volume (cups to ml). Ingredient-aware conversion is part of the Pro add-on.