定制 builtnorth/wp-environment-indicator 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

builtnorth/wp-environment-indicator

Composer 安装命令:

composer require builtnorth/wp-environment-indicator

包简介

A simple WordPress environment indicator for the admin bar

README 文档

README

A simple composer package that shows the current WordPress environment (development, staging, production) in the admin bar.

WP Environment Indicator Screenshot

Installation

composer require builtnorth/wp-environment-indicator

Usage

Basic Usage

Initialize the plugin in your theme or plugin:

$indicator = new BuiltNorth\WPEnvironmentIndicator\App();
$indicator->boot();

Custom Configuration

Customize the environment colors and labels:

use WPEnvironmentIndicator\App;

$indicator = new App();

// Customize environment settings
$indicator->set_config([
    'development' => [
        'color' => '#00ff00',
        'text' => 'Local Dev'
    ],
    'staging' => [
        'color' => '#ffaa00',
        'text' => 'QA Environment'
    ]
]);

$indicator->init();

Features

  • Automatically detects environment using WP_ENVIRONMENT_TYPE
  • Shows environment indicator in admin bar
  • Customizable colors and labels
  • Only visible to users with manage_options capability
  • Lightweight and efficient

Requirements

  • PHP 8.0 or higher
  • WordPress 5.0 or higher

License

GPL-2.0-or-later

Disclaimer

This software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.

Use of this library is at your own risk. The authors and contributors of this project are not responsible for any damage to your website or any loss of data that may result from the use of this library.

While we strive to keep this library up-to-date and secure, we make no guarantees about its performance, reliability, or suitability for any particular purpose. Users are advised to thoroughly test the library in a safe environment before deploying it to a live site.

By using this library, you acknowledge that you have read this disclaimer and agree to its terms.

builtnorth/wp-environment-indicator 适用场景与选型建议

builtnorth/wp-environment-indicator 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 658 次下载、GitHub Stars 达 2, 最近一次更新时间为 2025 年 03 月 22 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 builtnorth/wp-environment-indicator 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 builtnorth/wp-environment-indicator 我们能提供哪些服务?
定制开发 / 二次开发

基于 builtnorth/wp-environment-indicator 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

  • Stars: 2
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2025-03-22