Linux 软件免费装

Calculate Values with Shortcodes

开发者 bhagwad
更新时间 2020年5月20日 14:44
捐献地址: 去捐款
PHP版本: 5.2.4 及以上
WordPress版本: 5.2
版权: GPLv2 or later
版权网址: 版权信息

标签

shortcodes evaluation calculated fields

下载

2.2 2.0

详情介绍:

Have you ever wanted to calculate some values dynamically to display in your posts? Let's say you have some shortcodes that retrieve values in real time from the database. Now you want to perform some calculations on those shortcodes and display the results in your posts or pages. This plugin allows you to use a simple [calculate] shortcode with the expression inside to display these values in real time! So an expression like [calculate]2+3*4[/calculate] will return the value "14". Now just replace any numeric value with a shortcode that returns a number and you're set.

安装:

  1. You can install the plugin from WordPress's plugin repository.
  2. Just click "Activate" to enable the shortcode.
  3. Or download the zipped file
  4. Then go to Plugins -> Add New
  5. Click "Upload Plugin" at the top of the screen
  6. Use "Choose File" , select the zip file you just downloaded, and click "Install Now"
  7. On the next screen, click "Activate"

屏幕截图:

  • Basic Shortcode Usage in Editor
  • Calculated value in the post
  • Shortcode usage with shortcodes inside

升级注意事项:

2.2 = Strip out HTML from any inside shortcodes 2.1.1 Fixed a potential deprecation error: "Methods with the same name as their class will not be constructors in a future version of PHP" Thanks to Kristina for pointing it out!

更新日志:

Added a new optional "int" attribute which will format the output in a local currency. So for example, [calculate int="fr_FR"]15.00[/calculate] will return 15,00 Fixed a potential deprecation error: "Methods with the same name as their class will not be constructors in a future version of PHP"