Detect iOS devices in WordPress and provide an iOS specific stylesheet with Stylesheet Per Page plugin

Some of you might have used the plugin I wrote for WordPress, Stylesheet Per Page. It’s an incredibly handy plugin for site developers to generate page specific stylesheets, IE only stylesheets and more.

Now, in today’s release of version 0.5, another feature can be added to the list and that is generating an iOS specific stylesheet for your website to allow customizing of elements specifically for the iPad, iPhone and iPod.

The call for this feature came from one of my own needs which has been to provide some iOS specific modifications to a website I was working on at work. I hacked together a solution which you can find here in both javascript and PHP forms, but immediately had the thought that this would be useful for Stylesheet Per Page users to customize their own sites. As far as I know, no other stylesheeting plugin does this so in that way it’s unique.

Also in version 0.5 of Stylesheet Per Page if you look into the code you’ll notice I’ve changed up the way options handling is done. This is my new preferred method of handling options, it promotes easy use throughout the plugin and for larger more complex plugins it’s the easiest method to implement and keep track of. Eventually I’ll change all my plugins over to using this method when I have the time.

So if you’re interested in checking out the enhancements to Stylesheet Per Page and how to integrate them into your website head over to the project’s page, or directly to the WordPress.org entry for Stylesheet Per Page.

Did you like this article?

If you liked this article click one of the buttons below:

Claim your FREE report

"3 quick ways you can start making money as a programmer today"

No spam is ever sent to our members.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Abusive comments or spam will not be tolerated. Please use your real name.