regionhalland/region-halland-plugin-mixed-functions

包含多种实用功能的前端插件

v1.4.0 2022-11-24 07:06 UTC

This package is auto-updated.

Last update: 2024-09-24 10:49:17 UTC


README

如何使用Region Halland的插件"RhMixedFunctions"

以下是使用"RhMixedFunctions"插件的操作说明。

使用范围

此插件包含多个实用的前端功能

许可模型

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

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

通过composer导入插件

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

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

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

Require = 指定您希望使用的插件版本,在此例中为版本1.0.0

注意!请确保您获取的是最新版本。

"require": {
  "regionhalland/region-halland-mixed-functions": "1.0.0"
},

通过"Blade"在页面中使用"region_halland_remove_shortcode"功能

<p>
  {{ region_halland_remove_shortcode($page->post_content) }}
</p>

通过"Blade"在页面中使用"region_halland_switch_http_https"功能

  • 依赖于环境变量env('WP_ENV')的值
  • 如果设置为'production',则所有http将被https替代
  • 如果值不是'production',则所有https将被http替代
<p>
  {{ region_halland_switch_http_https($page->url) }}
</p>

版本历史

1.4.0

  • 提取当前帖子的短名称

1.3.0

  • 包含通过Packagist发布
  • 调整了composer名称

1.2.0

  • 添加了关于许可模型的信息
  • 附带了许可模型文件

1.1.0

  • 根据env('WP_ENV')的值替换http和https的功能

1.0.0

  • 第一个版本
  • 用于从文本中删除shortcodes的功能