Hi @jpnl
I hope you are doing well.
You can test different user agents with a PHP filter:
<?php
/**
* Plugin Name: BLC Local User Agent
* Description: Sends a browser user agent from the Broken Link Checker local engine.
*/
add_filter(
'wpmudev_blc_local_ua',
static function () {
return 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36';
}
);
add_filter(
'http_request_args',
static function ( $args ) {
$fallback = 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)';
if ( isset( $args['user-agent'] ) && $fallback === $args['user-agent'] ) {
$args['user-agent'] = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36';
}
return $args;
}
);
https://wpmudev.com/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-plugins
Unfortunately, we don’t have a filter to modify the results and ignore only specific response code. I can see how it can be helpful so I am sharing this situation with the plugin developers and I hope we can add some filters to be able to modify that as well.
Best Regards
Patrick Freitas
Thank you, I will try that.
I would love to see this as a field under Local » settings » advanced, so you don’t have to install it as a (mu) plugin.
Same for a ‘Status code exclusion list’ field where you can enter the status codes that should be ignored and not trigger a warning.
Thanks
JP
Hello @jpnl ,
I hope you are doing well.
I have forwarded your request to our developers. They will check if this is something they can bring in future versions. However, I can’t promise you an ETA.
Kind Regards,
Fida Al Hasan
Hi @jpnl
Again, thank you for the suggestions! I would suggest subscribing to our roadmap and receiving updates about our products https://wpmudev.com/roadmap.
That said, this was already forwarded to our developers and I am marking this thread as resolved, but if you have any additional questions, feel free to let us know.
Best regards,
Williams Valerio