bonnier / wp-bonnier-redirect
Redirect for Bonnier integration with Custom Permalink and Polylang
Installs: 7 532
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 13
Forks: 0
Open Issues: 2
Type:wordpress-plugin
Requires
- php: >=7.4
- guzzlehttp/guzzle: ^6.5
- illuminate/support: ^5.7
- league/csv: 9.6.*
- symfony/http-foundation: ^4.3.8
- symfony/mime: ^5.4
Requires (Dev)
- dev-master
- 4.15.2
- 4.15.1
- 4.15.0
- 4.13.25
- 4.13.24
- 4.13.23
- 4.13.22
- 4.13.21
- 4.13.20
- 4.13.19
- 4.13.18
- 4.13.17
- 4.13.16
- 4.13.15
- 4.13.14
- 4.13.13
- 4.13.12
- 4.13.11
- 4.13.10
- 4.13.9
- 4.13.8
- 4.13.7
- 4.13.6
- 4.13.5
- 4.13.4
- 4.13.3
- 4.13.2
- 4.13.1
- 4.13.0
- 4.12.0
- 4.11.0
- 4.10.0
- 4.9.0
- 4.8.2
- 4.8.1
- 4.8.0
- 4.7.3
- 4.7.2
- 4.7.1
- 4.7.0
- 4.6.3
- 4.6.2
- 4.6.1
- 4.6.0
- 4.5.1
- 4.5.0
- 4.4.0
- 4.3.1
- 4.3.0
- 4.2.1
- 4.2.0
- 4.1.0
- 4.0.0
- 3.0.0
- 2.2.1
- 2.2.0
- 2.1.0
- 2.0.2
- 2.0.1
- 2.0.0
- 1.3.15
- v1.3.14
- v1.3.13
- v1.3.12
- v1.3.11
- 1.3.10
- 1.3.9
- 1.3.8
- v1.3.7
- v1.3.6
- v1.3.5
- v1.3.4
- v1.3.3
- v1.3.2
- v1.3.1
- v1.3.0
- v1.2.7
- v1.2.6
- 1.2.5
- 1.2.4
- 1.2.3
- 1.2.2
- v1.2.1
- 1.2.0
- 1.1.10
- 1.1.9
- 1.1.8
- v1.1.7
- 1.1.6
- 1.1.5
- 1.1.4
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- dev-WILL-5904/Bug-fix/cronjob-does-not-check-redirects
- dev-dependabot/composer/guzzlehttp/psr7-1.9.1
- dev-WILL-3190/fix-redirects
- dev-bug/4.13.22/fix-wrong-redirects
- dev-Improve_willow_docker_local_setup
- dev-test-circleci-not-running
- dev-fix-failing-tests
- dev-BUGFIX/testing
- dev-Fix-wp-redirect-update-issue-if-id-is-not-exited
- dev-avoid-creating-redirects-with-underscore
- dev-fix/bad-migration
- dev-fix/add-extra-months
- dev-WILL-2301/Deleted-tags-creates-redirect-to-404-page
- dev-Fix-error-for-running-cmd-wp-contenthub-editor-categories-sync
- dev-IVD
- dev-legacy
This package is auto-updated.
Last update: 2024-11-22 13:14:07 UTC
README
A requirement to use this plugin is custom-redirects
Importing
To import aliases and redirect you must run the following commands
wp bonnier redirect import redirect GDS-path_redirect-20170814.csv
and
wp bonnier redirect import alias GDS-url_alias-20170814.csv
Filters
This plugin exposes the following filters:
redirect/slug-is-live | Bonnier\WP\Redirect\WPBonnierRedirect::FILTER_SLUG_IS_LIVE
:
Perform your own validation on whether a url is live or not.
/** * @param bool $isLive The plugins evaluation of whether the url is live or not * @param string $url The 'from'-url being saved * @param string $locale The locale of the redirect being saved * @param WP_Post|WP_Term|null $object The object found by the redirect plugin - null if $isLive == false * * @return bool */ add_filter('redirect/slug-is-live', function (bool $isLive, string $url, string $locale, $object) { return $isLive; }, 10, 4);
Actions
This plugin exposes the following actions:
redirect/redirect-saved | Bonnier\WP\Redirect\WPBonnierRedirect::ACTION_REDIRECT_SAVED
:
Register an action, when a new redirect is saved.
/** * @param Redirect $redirect The newly created redirect */ add_filter('redirect/redirect-saved', function (Redirect $redirect) { // Do stuff with the newly created Redirect }, 10);