Filter – user_agent_items

This filter allows you to modify the list of user agents the plugin looks for and blocks.

You can easily add new user agents to block with a simple piece of code.

To add a new user agent you want to block you need to use the code below. It is a simple piece of code that takes the incoming list of user agents, adds any new user agents we want to block, and then returns it to the plugin.

The filter looks for any occurrence of the phrase, so you can be as specific or not specific as you wish.

add_filter( 'user_agent_items', 'filter_user_agent_items' );

function filter_user_agent_items( $useragents ) {
  // You can add more than one, just copy the line below and change the text.
  $useragents[] = 'seekportbot';
  return $useragents;
}
Notice
Not sure how to add this code to your website? Check out this helpful article – How to include custom code on your website.

Was this helpful?