johngodley/redirection
关于
管理 WordPress 中的所有 301 重定向并监控 404 错误
网站与应用开发实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- +1
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Redirection
Redirection is a WordPress plugin to manage 301 redirections, keep track of 404 errors, and generally tidy up any loose ends your site may have. This is particularly useful if you are migrating pages from an old website, or are changing the directory of your WordPress installation.
Note: this is the current 'trunk' version of Redirection. It may be newer than what is in the WordPress.org plugin repository, and should be considered experimental.
Installation
Redirection can be installed by visiting the WordPress.org plugin page:
https://wordpress.org/plugins/redirection/
Customisation
Redirection provides a large set of WordPress action and filter hooks that can be used to extend or customise the plugin. These can found on the Redirection Hooks page.
Permissions
Access to the Redirection admin interface is given to users who can manage_options. You can modify this with permission filters, described on the Redirection permissions page.
Building
Redirection is mostly a PHP plugin, but does contain files that need to be built. For this you'll need Node and pnpm installed.
Requirements
- Node.js >= 12.14.0
- pnpm
- Composer (for PHP development)
Setup
Install JavaScript dependencies:
pnpm install
Install PHP dependencies (for linting and testing):
composer install
Development
The UI is built with React using @wordpress/scripts. To start development with hot-reload:
pnpm start
To create a production build:
pnpm build
Linting
Run all linters:
pnpm lint
Or run individually:
pnpm lint:php- PHP linting (PHPCS and PHPStan)pnpm lint:js- JavaScript lintingpnpm lint:css- CSS lintingpnpm lint:ts- TypeScript type checking
PHP code can be auto-formatted with:
composer format
Testing
PHP Unit tests:
pnpm test:unit
Or directly via Composer:
composer test-unit
PHP Integration tests (requires WordPress):
First, start the WordPress environment:
pnpm wp-env:start
Then run the integration tests:
pnpm test:integration
To stop the environment:
pnpm wp-env:destroy
JavaScript tests:
pnpm test:js
End-to-end tests:
pnpm test:e2e
Run all tests:
pnpm test
Releasing
Create a release build (builds assets and creates a zip file):
pnpm release
Create just the plugin zip without releasing:
pnpm plugin:zip
Release to WordPress.org SVN:
pnpm release:svn
API Documentation
Generate API documentation:
pnpm doc
Support
Please raise any bug reports or enhancement requests here. Pull requests are always welcome.
You can find a more detailed description of the plugin on the Redirection home page
Translations can be added here:
https://translate.wordpress.org/projects/wp-plugins/redirection
探索相关项目
加载中…