Super PlugIn. Thanks for creating it.
I noticed an issue related to case insensitive regular expressions;
^(.*(Google)).*$ – Finds any instance of Google, Googlebot, etc. in a User Agent String
^(.*(Google)).*$ – Does not find google in a User Agent String
^(.*(google)).*$ – Finds any instance of Google, Googlebot, etc. in a User Agent String
^(.*(google)).*$ – Does not find google in a User Agent String
^(.*(Google)).*$ – Does not find GOogle in a User Agent String
^(.*(Google)).*$ – Finds GoogleBot in a User Agent String
I attempted several variations of ‘activating’ case insensitivity using (?i), /google/i, #google#i, plus various PHP quirks with regular expressions, and the \ escape in several places.
And it gets weirder;
^(.*(Google.*|google.*)).*$
^(.*(Google|google)).*$
…both of the above regular expressions result in a very odd hybrid returned to the browser that includes elements from both themes installed on the website.
I’m using a feature of Google Chrome to test various User Agent Strings on this website: https://FSCNS.com
Not complaining, just trying to help make the plugin better by pointing something out you might have missed.
No need to reply unless you need more information that I can provide to assist you.
The PlugIn does actually work perfectly with Google / Googlebot as Google always uses a capital G in Google.
Thanks again for making it.
]]>Hi,
Would it be possible to use this plugin to tell Facebook’s UserAgent to use a different theme (instead of just telling mobiles etc to use a different theme)?
(For some reason Facebook’s scraper has a problem accessing the meta information when my current theme is activated but can get it from a more basic theme).
I believe that Facebook’s scraper identifies with the following (taken from https://developers.facebook.com/docs/sharing/webmasters/crawler):
facebookexternalhit/1.1
]]>Just some (hopefully constructive) feedback.
I’ve just tried using the plugin. I was actually looking for something to automatically use a different theme on my site if it’s accessed using Internet Explorer browsers, as my theme doesn’t play well with them and I don’t want to either dumb it down so it works in all browsers, or effectively run two different websites. Not sure if this would have been the right plugin to do that.
However, I use a child theme based on ‘Montezuma’. When the plugin is activated it won’t let me use the child theme, just ‘Montezuma’ itself. When I activate the plugin, it switches themes from my child to ‘Montezuma’. Although my child still shows when I go to the themes page, it won’t let me activate it. When the plugin is deactivated, everything returns to normal. Not conclusive proof it’s the plugin, but a fairly strong indication.
It might just be something to do with the base theme being ‘Montezuma’. The theme is fundamentally different to other WordPress themes in how it operates etc.
Not hugely important, just thought I should let you know, in case it’s a more widely spread issue. ??
Best regards,
Kevin
PS: My site is at https://disc-over.me if it’s helpful, though I doubt it will be as I’ve deactivated the plugin and doubt I’ll try to pursue it further.
]]>