Jan 28, 2013

Detects the browser in WordPress

Filled under: ,

Detects the browser in WordPress
Today I found something that had long been looking for, something that although not commonly used for everyone if it is an enormous profit, I would say monumental, and above all very simply.

I mean a very easy way to detect the visitor's browser and act accordingly.


All this is offered - and more - the plugin called PHP Browser detection . Installation is like any other, but the magic is in the template tags offered, and that already gives you a hint that there is a plugin for anyone but developers oriented, or at most advanced users familiar with the conditional .

What we offer is all this ...

Checking specific browsers ... ...

The parameter $ version is optional clear. Includes a higher version number, a simple integrator - 3,4,5, etc ... or leave empty to check any version.
Checking specific browsers

 Checking ... mobile, iPhone, iPad, iPod, etc ...

 Checking ... mobile, iPhone, iPad, iPod

 Specific versions ... Checking ...

 Specific versions ... Checking

Or, if you prefer, you can obtain all the information and do whatever you want from there:

Get just the name ... Browser ...

Get just the name ... Browser

Get the full version number - 3.2, 5.0, etc ...

Get the full version number - 3.2, 5.0

Get it ... all in an array ...

Get it ... all in an array


Do you think the possibilities are immense . You can use it to use conditional CSS for Internet Explorer, display different content depending on the browser or version of it anywhere on the web, or to switch images for videos on iPhones, you name it.

Enjoy it! , you have to practice and learn a lot of cool stuff.


1 comments:

  1. hi nice article, above all very simply.

    ReplyDelete