{"id":7491,"date":"2009-12-21T09:55:33","date_gmt":"2009-12-21T09:55:33","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/mobile-smart\/"},"modified":"2017-10-11T09:22:50","modified_gmt":"2017-10-11T09:22:50","slug":"mobile-smart","status":"closed","type":"plugin","link":"https:\/\/haz.wordpress.org\/plugins\/mobile-smart\/","author":4428372,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"v1.3.16","stable_tag":"trunk","tested":"4.8.28","requires":"3.1","requires_php":"","requires_plugins":"","header_name":"Mobile Smart","header_author":"<a href=\"http:\/\/www.dansmart.co.uk\/\">Dan Smart<\/a>","header_description":"","assets_banners_color":"000000","last_updated":"2017-11-28 18:11:46","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/www.mobile-smart.co.uk\/","header_plugin_uri":"http:\/\/www.dansmart.co.uk\/downloads\/","header_author_uri":"","rating":4.6,"author_block_rating":0,"active_installs":1000,"downloads":180380,"num_ratings":9,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":{"1.3.8":"<ul>\n<li>Fix for undeclared plugins_url in transcoding<\/li>\n<\/ul>","1.3.7":"<ul>\n<li>Fixed some code warnings and fixed access permissions for admin page<\/li>\n<\/ul>","1.3.6":"<ul>\n<li>Debugged tablet switching code<\/li>\n<\/ul>","1.3.5":"<ul>\n<li>Fix for cookie path<\/li>\n<li>Updated Mobile ESP to latest version<\/li>\n<li>Improved tablet tier checking for Android tablets<\/li>\n<\/ul>","1.3":"<p>Improved admin, enable\/disable iPad\/tablet switching, updated MobileESP device detection engine<\/p>","1.2.1":"<p>Security patch to timthumb.php<\/p>","1.2":"<p>If you&#039;re switching to a child theme, you will need to save your Mobile Smart settings before use.<\/p>","1.1":"","1.0":"","0.2":"","0.1":"<p>Initial release.<\/p>"},"ratings":{"1":"1","2":0,"3":0,"4":0,"5":"8"},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":"978958","resolution":"128x128","location":"assets"}},"assets_banners":{"banner-772x250.png":{"filename":"banner-772x250.png","revision":"978958","resolution":"772x250","location":"assets"}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0","1.1.1","1.2.1","1.3","1.3.1","1.3.10","1.3.11","1.3.12","1.3.13","1.3.14","1.3.15","1.3.16","1.3.5","1.3.6","1.3.7","1.3.8","1.3.9"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[224,841,3281,7249,11085],"plugin_category":[],"plugin_contributors":[79704],"plugin_business_model":[],"class_list":["post-7491","plugin","type-plugin","status-closed","hentry","plugin_tags-iphone","plugin_tags-mobile","plugin_tags-mobile-device","plugin_tags-mobile-theme","plugin_tags-theme-switcher","plugin_contributors-dolby_uk","plugin_committers-dolby_uk"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/mobile-smart_000000.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Mobile Smart (http:\/\/www.mobile-smart.co.uk\/), using trusty detection from the MobileESP project (http:\/\/www.mobileesp.com) allows the following:<\/p>\n\n<ul>\n<li>Switch your theme to a mobile-ready theme if a mobile device is detected (you can now enable\/disable iPad\/tablets)<\/li>\n<li>Manual Switcher - to allow your user to manually switch between desktop and mobile versions. Available in 3 versions: widget, option to automatically insert into footer, or template tag.<\/li>\n<li>Template functions to help determine which tier of mobile device (touch\/smartphone\/other) is viewing your site, to allow conditional content inclusion.<\/li>\n<li>Adds device and tier specific CSS selectors to the body_class, to allow conditional CSS (e.g. so in the same way you have \".single\" that you can target \".iphone\" or \".mobile-tier-touch\".)<\/li>\n<li>Image transcoding - rescale images to fit their device<\/li>\n<\/ul>\n\n<p>See the Frequently Asked Questions for guidance on how to use the plugin.<\/p>\n\n<p>Device support includes iPhone, iPad, Android, Android tablet, Samsung, Motorola, Blackberry, Windows Phone 6 &amp; 7, Symbian, and many more.<\/p>\n\n<h4>Mobile Smart Pro<\/h4>\n\n<p>Check out the Mobile Smart Pro plugin http:\/\/www.mobile-smart.co.uk\/mobile-smart-pro for support for:<\/p>\n\n<ul>\n<li>Domain switching - use a mobile theme to detect mobile devices, and\/or redirect to appropriate theme URL (e.g. m.yoursite.com)<\/li>\n<li>Mobile Pages - mobile versions of posts and pages with the same URL<\/li>\n<li>Mobile Menus - mobile versions of menus for mobile-specific navigation<\/li>\n<li>Mobile Widgets - disable selected widgets when viewing your site on your mobile device<\/li>\n<li>Mobile Plugins - disable selected plugins when viewing your site on your mobile device<\/li>\n<li>Mobile Home Page - select a different page to be the mobile site's home page<\/li>\n<\/ul>\n\n<h4>Contribute<\/h4>\n\n<p>Want to contribute to the project? Checkout the GitHub project at http:\/\/www.github.com\/dansmart\/mobile-smart<\/p>\n\n<h4>Mobile Theme<\/h4>\n\n<p>Mobile Smart comes with a basic barebones ('boilerplate') theme that can be used by theme developers to develop for mobile devices.<\/p>\n\n<p>The Mobile Smart boilerplate theme is based on two projects: http:\/\/html5boilerplate.com\/mobile\/ and http:\/\/html5reset.org\/#wordpress\nwith some additional Mobile Smart modifications.<\/p>\n\n<p>Note: The theme is not designed to be used without developer modification.<\/p>\n\n<!--section=installation-->\n<p>This section describes how to install the plugin and get it working.<\/p>\n\n<ol>\n<li>Upload the <code>mobile-smart<\/code> directory to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<li>Go to Settings-&gt;Mobile Smart and choose your theme to display when a mobile device encounters your page.<\/li>\n<\/ol>\n\n<p>Go to http:\/\/www.mobile-smart.co.uk\/installation\/ for more details.<\/p>\n\n<!--section=faq-->\n<p>See http:\/\/www.mobile-smart.co.uk\/frequently-asked-questions\/ for more.<\/p>\n<dl>\n<dt>Does this work with other mobile plugins<\/dt>\n<dd><p>It would be advisable not to use other mobile theme switching functionality with this unless theme switching is turned off (go to Settings-&gt;Mobile Smart to disable).<\/p>\n\n<p>This has been tested with the Wordpress Mobile Pack transcoder and is noted to be compatible, though the list of mobile devices are different between the two.<\/p><\/dd>\n<dt>How to switch and style for Tablets<\/dt>\n<dd><p>Go to the Mobile Theme tab in the Settings-&gt;Mobile Smart admin page, and enable \/ disable tablet support.<\/p>\n\n<p>If you wish to serve up different styles for tablets, you'll have to modify your template to use the template tags to detect:<\/p>\n\n<pre><code>&lt;?php\n\/* add additional stylesheet for certain mobile types *\/\nglobal $mobile_smart;\n\/\/ add stylesheets dependent on header\nif ($mobile_smart-&gt;isTierTablet())\n{\n  wp_enqueue_style('mobile-tablet', get_bloginfo('stylesheet_directory').\"\/css\/tablet.css\");\n}\n?&gt;\n<\/code><\/pre>\n\n<p>You can use the same template tag (isTierTablet()) to display additional content (such as sidebars, etc).<\/p><\/dd>\n<dt>How do I use the Manual Switcher?<\/dt>\n<dd><p>You have the option of the following:\n* Mobile Smart Manual Switcher Widget - go to Appearance-&gt;Widgets and drop the widget in an appropriate sidebar. If you're\n  a theme developer, you can create a new 'sidebar' in the appropriate location, e.g. the footer bar, if you don't want\n  this option in the standard sidebar.\n* Enable Manual Switcher in footer - if this option is enabled (via the Options-&gt;Mobile Smart page), this adds\n  the Manual Switcher link into the wp_footer() call, which means it will be displayed at the bottom of your page.\n* Template tag, see below:<\/p>\n\n<pre><code>&lt;?php\n  \/\/ get global instance of Mobile Smart class\n  global $mobile_smart;\n\n  \/\/ display manual switcher link - requires Manual Switching to be enabled\n  $mobile_smart-&gt;addSwitcherLink();\n?&gt;\n<\/code><\/pre>\n\n<p>The Manual Switcher displays the switcher link in a div with an id of <em>mobilesmart_switcher<\/em><\/p><\/dd>\n<dt>Do you do domain switching<\/dt>\n<dd><p>Go to http:\/\/www.mobile-smart.co.uk\/ for more information on the Mobile Smart Pro plugin.<\/p><\/dd>\n<dt>How do I enable unique handset body classes<\/dt>\n<dd><p>To enable the CSS body classes, ensure that in your mobile theme you have the body_class() function included:<\/p>\n\n<pre><code> &lt;?php body_class(); ?&gt;\n<\/code><\/pre><\/dd>\n<dt>How do I change stylesheets dependent on device tier<\/dt>\n<dd><p>You would do this if you prefer to split out each device tier CSS into separate files. Be aware that this creates an extra function call though.<\/p>\n\n<p>Use the following PHP code:<\/p>\n\n<pre><code>&lt;?php\n\/* add additional stylesheet for certain mobile types *\/\nglobal $mobile_smart;\n\/\/ add stylesheets dependent on header\nif ($mobile_smart-&gt;isTierTouch())\n{\n  wp_enqueue_style('mobile-touch', get_bloginfo('stylesheet_directory').\"\/css\/touch.css\");\n}\nelse if ($mobile_smart-&gt;isTierSmartphone())\n{\n  wp_enqueue_style('mobile-smartphone', get_bloginfo('stylesheet_directory').\"\/css\/smartphone.css\");\n}\n?&gt;\n<\/code><\/pre>\n\n<p>Note: these functions do not test for the Manual Switcher. To test for the manual switcher (in case you are using\nthese template tag functions in a desktop theme), you should call:<\/p>\n\n<pre><code>&lt;?php\n\/* add additional stylesheet for certain mobile types *\/\nglobal $mobile_smart;\n\/\/ find out manual switching state\n$is_manual_switched_to_mobile = $mobile_smart-&gt;switcher_isMobile();\n?&gt;\n<\/code><\/pre><\/dd>\n<dt>Can you add xxxx-device?<\/dt>\n<dd><p>Please email me with details of the device that is not yet supported by Mobile Smart, and I will add it in, and endeavour to release an updated version within the week (if timescales allow).<\/p><\/dd>\n<dt>Where can I get a mobile theme from?<\/dt>\n<dd><p>Try the Mobile Smart boilerplate theme if you're a developer. Also check out the Wordpress Mobile Pack\nfor a good example of a theme that is compatible with XHTML-MP.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<p>= 1.3.16\n- Bug fix: latest version of mdetect.php didn't set tablet version properly. Thanks to Jesse Heap (https:\/\/github.com\/jesseheap) for this fix.<\/p>\n\n<p>= 1.3.15\n- Security: Updated timthumb.php to the latest version<\/p>\n\n<p>= 1.3.14\n- Update MobileESP mobile detection library - updated the Mobile ESP detection code. New support for: Windows Phone 10, Firefox OS, Ubuntu Mobile OS, Sailfish, Tizen TV, WebOS TV. Removed support for Opera Android Phone and Tablet. Updated DetectTierIphone(), DetectTierTablet(), DetectSmartphone(). See http:\/\/blog.mobileesp.com\/?p=425\n- Remove deprecated function call to get_bloginfo()<\/p>\n\n<p>= 1.3.13\n- Fix admin screen on mobile was showing mobile theme instead of desktop theme<\/p>\n\n<p>= 1.3.12\n- Fix CSS error in admin<\/p>\n\n<p>= 1.3.11\n- Fix errors in dependencies brought across from Mobile Smart Pro - compatible and tested with WordPress 4.4<\/p>\n\n<p>= 1.3.10\n- Fix debug warnings for deprecated functions<\/p>\n\n<p>= 1.3.9\n- Security fix: escape output of add_query_arg (only used in admin and 'add switcher link'). Thanks to WordPress team for information<\/p>\n\n<p>= 1.3.8\n- Fix for undeclared plugins_url in transcoding<\/p>\n\n<p>= 1.3.7\n- Fixed some code warnings and fixed access permissions for admin page<\/p>\n\n<p>= 1.3.6\n- Debugged tablet switching code<\/p>\n\n<p>= 1.3.5\n- Fix for cookie path\n- Updated Mobile ESP to latest version\n- Improved tablet tier checking for Android tablets<\/p>\n\n<h4>1.3<\/h4>\n\n<p>Major upgrade:\n- Upgrade of MobileESP detection engine - better support for Opera Mini on Android (see http:\/\/blog.mobileesp.com\/ for latest updates)\n- Admin upgrade to tabs\n- You can now select to switch for Ipad\/tablet or not\n- Debugged image transcoding<\/p>\n\n<h4>1.2.1<\/h4>\n\n<p>Vital Security patch (timthumb.php). Please upgrade immediately.<\/p>\n\n<h4>1.2<\/h4>\n\n<p>Added support for child themes<\/p>\n\n<h4>1.1.1<\/h4>\n\n<p>Bug fix where plugin was calling non existent DetectTierTouch() function.<\/p>\n\n<h4>1.1<\/h4>\n\n<p>Includes sample mobile theme - based on Mobile Boilerplate and HTML 5 Reset projects<\/p>\n\n<h4>1.0<\/h4>\n\n<p>Based detector on Mobile ESP project, meaning device detection will stay up to date with latest mobile devices<\/p>\n\n<h4>0.2<\/h4>\n\n<p>Added Manual Mobile Switcher - widget, link, and template tag.<\/p>\n\n<h4>0.1<\/h4>\n\n<p>Initial release, containing mobile device detection, body classes, and mobile tier template tags.<\/p>","raw_excerpt":"The Mobile Smart plugin allows your Wordpress site to switch your theme if a user visits it using a mobile device, plus adds template tags to help you &hellip;","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/haz.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/7491","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/haz.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/haz.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/haz.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=7491"}],"author":[{"embeddable":true,"href":"https:\/\/haz.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/dolby_uk"}],"wp:attachment":[{"href":"https:\/\/haz.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=7491"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/haz.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=7491"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/haz.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=7491"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/haz.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=7491"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/haz.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=7491"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/haz.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=7491"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}