[wordpress插件] Control Live Changes控制实时更改

wordpress 插件 文章 2020-04-01 19:40 491 0 全屏看文

AI助手支持GPT4.0

评分
0
描述

This plugin has arisen from the requirements of a client who manage many of their WordPress sites via Git repositories on Beanstalk.

此插件源自客户端的要求,该客户端通过Beanstalk上的Git存储库管理许多WordPress网站。

Core WP files are not in the repo, to keep its size down, but plugins and themes are.

核心WP文件不在存储库中,以减小文件的大小,但包含插件和主题文件。

WP upgrades are of course tested on local development and remote staging servers before being run on the production server.

WP升级当然要先在本地开发服务器和远程登台服务器上进行测试,然后才能在生产服务器上运行。

But since plugins and themes are in the repo, ideally they should be upgraded locally for testing, then pushed to Beanstalk.

但是由于插件和主题都在仓库中,因此理想情况下,应该在本地对其进行升级以进行测试,然后再推送到Beanstalk。

Beanstalk in turn deploys the changes to the staging server, and then the production server.

Beanstalk依次将更改部署到登台服务器,然后再部署到生产服务器。

To help maintain this workflow, this plugin tests if the environment is local or not (checking for WP_LOCAL_DEV or searching for “localhost” in $_SERVER['HTTP_HOST']

为帮助维护此工作流,此插件测试环境是否为本地环境(检查 WP_LOCAL_DEV 或在 $ _ SERVER ['HTTP_HOST']

>).

>)。

If the environment isn’t local, plugin and theme installation, editing and upgrades are disabled.

如果环境不是本地环境,则将禁用插件和主题安装,编辑和升级。

The following constants can be defined in wp-config.php to override the defaults:

可以在 wp-config.php 中定义以下常量以覆盖默认值:

    • SLT_CLC_LOCAL_STRING – The string to search for in $_SERVER['HTTP_HOST'] that will indicate a local development environment.

    • SLT_CLC_LOCAL_STRING –在 $ _ SERVER ['HTTP_HOST'] 中搜索的字符串,它将指示本地开发环境。

      Default: "localhost"

    • 默认值:“ localhost”

    • SLT_CLC_DISABLE_REMOTE_CORE_UPGRADES – Default: false
    • SLT_CLC_DISABLE_REMOTE_CORE_UPGRADES –默认值: false

    • SLT_CLC_DISABLE_REMOTE_PLUGIN_THEME_UPGRADES – This will also disable editing plugin and theme files via the admin interface.

    • SLT_CLC_DISABLE_REMOTE_PLUGIN_THEME_UPGRADES –这还将通过管理界面禁用编辑插件和主题文件。

      Default: true

    • 默认值: true

    • SLT_CLC_OUTPUT_NOTICES – Whether to output explanatory notices on the upgrades, themes, and plugins admin pages.

    • SLT_CLC_OUTPUT_NOTICES –是否在升级,主题和插件管理页面上输出解释性通知。

      Default: true

    • 默认值: true

    • SLT_CLC_CORE_NOTICE – Default: "Core upgrades are currently disabled on this server by the Control Live Changes plugin."
    • SLT_CLC_CORE_NOTICE –默认:“当前已通过Control Live Changes插件在此服务器上禁用核心升级。”

    • SLT_CLC_PLUGIN_THEME_NOTICE – Default: "Plugin and theme upgrades are currently disabled on this server by the Control Live Changes plugin."
    • SLT_CLC_PLUGIN_THEME_NOTICE –默认值:“当前通过Control Live Changes插件在此服务器上禁用插件和主题升级。”

    An alternative to the SLT_CLC_LOCAL_STRING check for a local environment is the WP_LOCAL_DEV constant.

    WP_LOCAL_DEV 常量是 SLT_CLC_LOCAL_STRING 检查本地环境的替代方法。

    This is used by Mark Jaquith in his technique for defining local database connection details in a separate file (http://markjaquith.wordpress.com/2011/06/24/wordpress-local-dev-tips/).

    Mark Jaquith在其用于在单独文件(http://markjaquith.wordpress.com/2011/06/24/wordpress-local-dev-tips/)中定义本地数据库连接详细信息的技术中使用此方法。

    If WP_LOCAL_DEV is set to true, the SLT_CLC_LOCAL_STRING check is made irrelevant.

    如果将 WP_LOCAL_DEV 设置为true,则将使 SLT_CLC_LOCAL_STRING 检查不相关。

    Development code hosted at GitHub.

    托管在 GitHub 上的开发代码。

安装步骤

    1. Upload the control-live-changes directory into the /wp-content/plugins/ directory
    2. control-live-changes 目录上载到 / wp-content / plugins / 目录

    3. Activate the plugin through the ‘Plugins’ menu in WordPress
    4. 通过WordPress中的“插件”菜单激活插件

    5. If necessary, define constants in wp-config.php to override the plugin defaults – see the Description for details.
    6. 如有必要,请在 wp-config.php 中定义常量以覆盖插件默认设置-有关详细信息,请参见说明。

    NOTE: Instead of the above, you may want to drop the control-live-changes.php file into the /wp-content/mu-plugins/ directory

    注意:您可能希望将 control-live-changes.php 文件拖放到 / wp-content / mu-plugins / 目录中

    to ensure that no one deactivates this plugin!

    确保没有人停用此插件!

下载地址
https://downloads.wordpress.org/plugin/control-live-changes.0.2.2.zip
-EOF-

AI助手支持GPT4.0