定制 kodansha/killer-pads 二次开发

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

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

kodansha/killer-pads

最新稳定版本:v1.6.0

Composer 安装命令:

composer require kodansha/killer-pads

包简介

Killer Pads is a plugin like security pads for "prevention is better than cure". It activates the default configuration of security and operational efficiency to WordPress websites.

README 文档

README

Killer Pads is a plugin like security pads for "prevention is better than cure". It activates the default configuration of security and operational efficiency to WordPress websites.

Features

Admin page customization

  • Disable admin dashboard page
  • Add favicon to admin pages (favicon.ico, favicon.png or favicon.svg must be placed in your theme's root directory)
  • Disable post autosave
  • Limit the number of post revisions to 100 by default
  • Disable comments features by default

Remove REST routes

  • Remove all routes except ones used by famous plugins and explicitly whitelisted

Security concerns

  • Disable XML-RPC

Installation

This plugin is intended to be installed exclusively via Composer.

Configure your composer.json like the following:

{
  // ... snip ...
  "require": {
    // ... snip ...
    "kodansha/killer-pads": "^1.0.0"
    // ... snip ...
  }
  // ... snip ...
}

Configuration

REST routes

By default, only the following namespaces are allowed in whitelist:

  • api
  • preview

If you want to provide your own whitelist (e.g. wp/v2), add the following to wp-config.php:

define('KILLER_PADS_NAMESPACE_WHITELIST', ['wp/v2', 'preview']);

Warning Rest routes that start with /wp/v2/users are always blocked even when the wp/v2 namespace is whitelisted.

Remove Dashboard function configuration

When activating this plugin, admin home page is being redirected to /edit.php?post_type=post. If you want to change the path to be redirected, add the following to wp-config.php:

define('KILLER_PADS_ADMIN_HOME_PAGE_PATH', "edit.php?post_type=page");

Post revisions

This plugin limits the number of stored post revisions to 100 by default. However, if the WP_POST_REVISIONS constant is defined, that value takes precedence.

Enable comments

Comments features are completely disabled by default. If you want to use comments and need to show comments menu in admin pages, add the following to wp-config.php:

define('KILLER_PADS_ENABLE_COMMENTS', true);

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2024-01-17