helsingborg-stad / broken-link-detector
Detects and fixes (if possible) broken links in post_content
Installs: 8 359
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 12
Forks: 3
Open Issues: 5
Type:wordpress-plugin
Requires
- dev-main
- 3.0.6
- 3.0.5
- 3.0.4
- 3.0.3
- 3.0.2
- 2.0.0
- 1.4.0
- 1.3.14
- 1.3.13
- 1.3.12
- 1.3.11
- 1.3.10
- 1.3.9
- 1.3.8
- 1.3.7
- 1.3.6
- 1.3.5
- 1.3.4
- 1.3.3
- 1.3.2
- 1.3.1
- 1.3.0
- 1.2.3
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.8
- 1.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.9
- 1.0.8
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- dev-feat/link-not-avabile
- dev-bug/mce-min
- dev-feat/npm-install
- dev-master
- dev-develop
This package is auto-updated.
Last update: 2024-11-13 13:40:23 UTC
README
Detects and fixes (if possible) broken links in post_content.
Enable log mode
Define the constant BROKEN_LINKS_LOG to true to enable extended logging. This will write curl messages and errors to the default logfile.
Bypass for domains
You can bypass checks (automatically consider valid) by adding domains to the 'brokenLinks/External/ExceptedDomains' filter. The filter requires that you provide your domains in the same format as parse_url($url, PHP_URL_HOST) returns. It's therefore recommended that you filter all your domains trough this function.
add_filter('brokenLinks/External/ExceptedDomains',function($array) { return array( parse_url("http://agresso/agresso/", PHP_URL_HOST), parse_url("http://qlikviewserver/qlikview/index.htm", PHP_URL_HOST), parse_url("http://serviceportalen/", PHP_URL_HOST), parse_url("http://a002163:81/login/login.asp", PHP_URL_HOST), parse_url("http://serviceportalen/Default.aspx", PHP_URL_HOST), parse_url("http://cmg/BluStarWeb/Start", PHP_URL_HOST), parse_url("http://surveyreport/admin", PHP_URL_HOST), parse_url("http://klarspraket/", PHP_URL_HOST), parse_url("http://guideochtips/", PHP_URL_HOST), parse_url("http://hbgquiz/index.php/category/?id=3", PHP_URL_HOST), parse_url("http://agresso/agresso/", PHP_URL_HOST), parse_url("http://a002490/efact/", PHP_URL_HOST), parse_url("http://a002064/Kurser/", PHP_URL_HOST), parse_url("http://a002064/kursbokning/", PHP_URL_HOST) ); }, 10);