wp-forge/wp-plugin-check 问题修复 & 功能扩展

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

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

wp-forge/wp-plugin-check

最新稳定版本:1.0

Composer 安装命令:

composer require wp-forge/wp-plugin-check

包简介

Check if a WordPress plugin is compatible with the current environment.

README 文档

README

Check if a WordPress plugin is compatible with the current environment. If not, it will automatically deactivate the plugin and show a message to the user letting them know what they can do about it.

Note: Only supports checking PHP 5.2+.

Installation

composer require wp-forge/wp-plugin-check

Usage

This is how the code should be used:

<?php

// Plugin headers go here...

require dirname( __FILE__ ) . '/vendor/autoload.php';

// Check plugin requirements
global $pagenow;
if ( 'plugins.php' === $pagenow ) {
	$plugin_check = new WP_Forge_Plugin_Check( __FILE__ );

	$plugin_check->min_php_version    = '5.6';
	$plugin_check->min_wp_version     = '5.0';
	$plugin_check->req_php_extensions = array( 'json', 'SimpleXML' );
	
	$plugin_check->check_plugin_requirements();
}

require dirname( __FILE__ ) . '/includes/bootstrap.php';

Alter the WordPress version, PHP version, and required PHP extensions as needed.

Important: Don't load any other code in your main plugin file! PHP parses all code in a file before running it, so incompatible PHP code added after this check will negate the ability to properly perform compatibility checks.

统计信息

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

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2020-04-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固