blakewilson/wp-enforce-semver 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

blakewilson/wp-enforce-semver

Composer 安装命令:

composer require blakewilson/wp-enforce-semver

包简介

A class to enforce SemVer in your WordPress plugins.

README 文档

README

Screenshot of plugins list with Semantic Versioning for WordPress enabled

Easily enforce SemVer in your WordPress plugins.

By using this class, auto updates will be disabled when the plugin's new version is a major update, and provide a helpful notice in the update section of the plugin that there may be breaking changes.

Usage

  1. Install the class as a dependency via composer:
composer require blakewilson/wp-enforce-semver
  1. Initialize the class in your plugin:
// Init autoloader from Composer
if ( file_exists( plugin_dir_path( __FILE__ ) . 'vendor/autoload.php' ) ) {
	require plugin_dir_path( __FILE__ ) . 'vendor/autoload.php';
}

use EnforceSemVer\EnforceSemVer;

new EnforceSemVer('my-plugin/my-plugin.php');

And that's it! Once your end-users install your plugin, they will be protected against auto updates for major releases, and see a helpful message in the plugins list next to your plugin update:

Screenshot of plugins list with Semantic Versioning for WordPress enabled

Additionally, this notice text can be modified via a filter:

add_filter( 'semantic_versioning_notice_text', function($notice_text, $plugin_file_name) {
	// Modify notice text here.

	return $notice_text;
});

统计信息

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

GitHub 信息

  • Stars: 11
  • Watchers: 2
  • Forks: 0
  • 开发语言: TypeScript

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-10-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固