承接 fabrikage/wp-env-switcher 相关项目开发

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

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

fabrikage/wp-env-switcher

最新稳定版本:0.1.0

Composer 安装命令:

composer require fabrikage/wp-env-switcher

包简介

Adds dropdown to admin bar to switch between different DTAP environments

README 文档

README

Fabrikage logo

fabrikage/wp-env-switcher

Use this package to add a menu item in your WordPress admin bar in which you can switch between environments. This is useful when you have a DTAP street and you want to quickly switch between your environments.


 

The library will compare your current URL with the environment URLs you have set in your environment variables. If the current URL matches one of the environment URLs, that environment will be marked as active. Other environments will show in the submenu.

Screenshot

A screenshot of the menu item

Requirements

Set the following $_ENV variables in your project:

URL_DEVELOPMENT='https://example.dev'
URL_TESTING='https://example.test'
URL_ACCEPTANCE='https://example.acceptance'
URL_PRODUCTION='https://example.com'

Note: These variables are not required, but if you don't set them, the corresponding menu item will not show up.

Installation

Install the package using composer:

composer require fabrikage/wp-env-switcher

Usage

Add the following code to your functions.php:

\Fabrikage\WordPress\EnvSwitcher::enable();

If you want to enable the menu for specific users, pass an array with usernames:

\Fabrikage\WordPress\EnvSwitcher::enable(['admin', 'other-user']);

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-12-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固