Wait... How is the plugin gonna decide which theme is the iPhone theme and how is it gonna load it? The plugin just changes the value of the $TEMPLATE variable to "iPhone" if the file (which has a constant theme folder name???) exists.
I think the plugin should work like this:
- Make the admin to choose the iPhone theme from a dropdown list of the themes in the plugin options page.
- Load the selected theme if the user agent is iPhone.
Otherwise, it'd just look for an "iPhone" folder in the "theme" folder.
PS: Just to be safe, let's change the plugin description line with the line below:
I think the plugin should work like this:
- Make the admin to choose the iPhone theme from a dropdown list of the themes in the plugin options page.
- Load the selected theme if the user agent is iPhone.
Otherwise, it'd just look for an "iPhone" folder in the "theme" folder.
PS: Just to be safe, let's change the plugin description line with the line below:
Code:
'This plugin automatically detects a user\'s browser and sets the theme accordingly.', // Plugin Description