regionhalland/region-halland-plugin-acf-matomo-statistic

ACF 字段在 admin 中用于存储 Matomo 跟踪代码

v1.5.0 2022-11-07 09:16 UTC

This package is auto-updated.

Last update: 2024-09-07 13:42:46 UTC


README

如何使用 Region Halland 插件 "RhAcfMatomoStatistic"

以下是使用 "RhAcfMatomoStatistic" 插件的说明。

用途

此插件在 admin 中创建一个 ACF 字段用于存储 Matomo 跟踪代码

许可模型

此插件使用 GPL-3.0 许可模型。您可以通过附带文件了解更多关于此许可模型的信息

LICENSE (https://regionhalland.visualstudio.com/public.RhWpPlugIns/_git/RhAcfMatomoStatistic?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/RhAcfMatomoStatistic

通过 composer 导入插件

以下两部分需要添加到您的 composer 文件中

Repositories = 插件存储位置,在本例中为 github

"repositories": [
  {
    "type": "vcs",
    "url": "https://regionhalland.visualstudio.com/public.RhWpPlugIns/_git/RhAcfMatomoStatistic"
  },
],

Require = 指定您想要使用的插件版本,在本例中为 1.0.0

注意!请确保您下载的是最新版本。

"require": {
  "regionhalland/region-halland-acf-matomo-statistic": "1.0.0"
},

在 blade 文件中显示 JavaScript 代码

@if(function_exists('get_region_halland_acf_matomo_statitic'))
    @php($myMatomo = get_region_halland_acf_matomo_statitic())
    {!! $myMatomo['tracking_code'] !!}
@endif

版本历史

1.5.0

  • 从 mu-plugin 更改为插件

1.4.0

  • ACF 字段现在在 WP-JSON REST API 中显示

1.3.3

  • 从数字字段更改为文本字段

1.3.2

  • 更改了返回值的名称

1.3.1

  • 将包类型更改为 mu-plugin

1.3.0

  • 从文本区域更改为数字字段

1.2.0

  • 更新了关于如何显示代码的 readme

1.1.0

  • 添加了用于在 Packagist 上发布的工作流程

1.0.0

  • 第一个版本