Details
iPhone Viewport Meta does the following:
- if a request comes from an iPhone or iPod Touch it adds a meta tag and additional styles definitions to optimize content for that browser and it scrolls the location bar up and out of the way after the page loads
- it adds a template tag you can use in your theme to manage inclusion or exclusion of content
Configuration
This plugin has no configuration settings.
Template Tags
This plugin defines a template tag that can be used to prevent generation of content such as sidebars, when viewed by iPhones and iPod Touch:
<?php if (!function_exists('weh_is_iPhone') || (function_exists('weh_is_iPhone') && !weh_is_iPhone())) : // don't send extra bits to iPhone ?>
<?php get_sidebar() ?>
<?php endif; // testing for iPhone ?>
Hooks/API
No hooks or APIs are defined by this plugin.
Known Issues
- This plugin works best with themes derived from Sandbox (http://www.plaintxt.org/themes/sandbox/)
- You will need to use the wehisiPhone() template tag to control the display of sidebars.
- This plugin depends on the user agent string sent by mobile Safari.
Contributions
James Craig, http://cookiecrook.com/
Donny Cruce, http://yoshiki.tv/
Anything else?
iPhone and iPod Touch are trademarks of Apple, Inc.
--Bill Humphries
http://whump.com/