regionhalland / region-halland-plugin-yellow-labs
使用 Yellow Lab Tools 检查页面性能的脚本 + 显示此信息的仪表盘小部件
v1.1.0
2022-11-07 09:17 UTC
README
如何使用 Region Halland 插件 "RhYellowLabs"
以下是如何使用 "RhYellowLabs" 插件的说明。
应用领域
此插件创建了一个脚本,通过 YellowLabs API 执行测试并在 WordPress 仪表盘中显示结果。
许可证模型
此插件使用 GPL-3.0 许可证模型。您可以通过随附的文件了解更多关于此许可证模型的信息。
LICENSE (https://regionhalland.visualstudio.com/public.RhWpPlugIns/_git/RhYellowLabs?path=%2FLICENSE&version=GBmaster)
安装和激活
A) Hämta pluginen via Git eller läs in det med Composer
B) Installera Region Hallands plugin i Wordpress plugin folder
C) Aktivera pluginet inifrån Wordpress admin
通过 Git 下载插件
git clone https://regionhalland.visualstudio.com/public.RhWpPlugIns/_git/RhYellowLabs
通过 composer 导入插件
以下部分需要添加到您的 composer 文件中
Repositories = 插件存储的位置,在此例中为 github
"repositories": [
{
"type": "vcs",
"url": "https://regionhalland.visualstudio.com/public.RhWpPlugIns/_git/RhYellowLabs"
},
],
Require = 指定您要使用的插件版本,在此例中为 1.0.0
注意!请调整以确保您获取最新版本。
"require": {
"regionhalland/region-halland-plugin-yellow-labs": "1.0.0"
},
使用
为了使用插件,在您的 .env 文件中创建一个名为 "YELLOWLABS_TOKEN" 的变量,并填写任意值。要执行测试,请向 /app/muplugins/region-halland-plugin-yellow-labs/cron/region_halland_yellow_labs_cron.php 发送 POST 请求,将 "token" 字段设置为在您的 .env 文件中填写的密钥。
这会执行脚本并更新数据库,将最新的测试结果显示在仪表盘中。
版本历史
1.1.0
- 从 mu-plugin 更改为 plugin
1.0.4
- 将 cron 的 GET 更改为 POST
1.0.3
- 更改 cron 的工作方式
1.0.2
- 添加检查以查看是否已运行测试
1.0.1
- 修正模板中的变量名
1.0.0
- 第一个版本