承接 inpsyde/gutenberg-versions-mirror 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

inpsyde/gutenberg-versions-mirror

Composer 安装命令:

composer require inpsyde/gutenberg-versions-mirror

包简介

Package that mirrors and provide multiple versions of teh Gutenberg plugin.

README 文档

README

What is this?

This package contains a mirror of multiple versions of Gutenberg plugin, in different sub-folders. This allows to contemporarily deploy multiple versions of Gutenberg to WordPress, and let different themes (for example) require different versions.

How does it work?

The wp.org API is called regularly in a GitHub Action to find new Gutenberg versions.

If new versions are found, they are saved, each in a separate folder.

A utility class shipped with the package allows external code to require Gutenberg in the desired version.

How to use this package

  • Require via Composer.
  • Ensure Composer autoload is loaded.
  • From a MU plugin require the version you need in one of the following ways

Require a specific version

/** @var string|null $loadedVersion The exact version loaded or null on failure */
$loadedVersion = Inpsyde\GutenbergVersions\Loader::loadVersion('14.1.0');

Require the first found among a list of possible (accepted) versions

/** @var string|null $loadedVersion The exact version loaded or null on failure */
$loadedVersion = Inpsyde\GutenbergVersions\Loader::loadVersion('14.1.0', '13.2.0');

Require via Semver requirement

/** @var string|null $loadedVersion The exact version loaded or null on failure */
$loadedVersion = Inpsyde\GutenbergVersions\Loader::loadMatching('^14');

$loadedVersion = Inpsyde\GutenbergVersions\Loader::loadMatching('>=14.2.0 || ~13.2');

URL filtering

Gutenberg internally calls plugins_url() with the assumption it is installed under the plugins' folder.

However, when using this library, Gutenberg files are deeper in the plugin folder tree.

To fix broken URLs resulting from that, when loading a Gutenberg version, the package also filters plugins_url().

Unique loading

The package ensures that any attempt of loading Gutenberg multiple times (same of different version) will fail.

License

This repository is a free software, and is released under the terms of the GNU General Public License version 2 or (at your option) any later version. See LICENSE for complete license.

统计信息

  • 总下载量: 126
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: JavaScript

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2022-10-31

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固