This list is in the form of a regular expression (regex).
Add a new Crawler
Let’s say you are using the ContentKingApp.com service to monitor your website content. ContentKing’s job is to crawl the pages of your sites.
However in doing so, it may send large number of traffic to your site which also triggers our admin-ajax.php request. Because admin-ajax.php requests are not cache, it uses the PHP resources and your site may slow down.
So the idea here is to add ContentKing’s user agent to our bots list. Based on the ContentKing’s documentation, it will send the following user agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36 (+https://whatis.contentkingapp.com)
Putting the full user agent above just takes up so much space, so we grab only the term ‘contentkingapp’ and append it to our default user agent list before the closing bracket.
Place the code below into your theme’s functions.php file.