Changeset 764791
- Timestamp:
- 08/30/2013 03:31:51 PM (13 years ago)
- File:
-
- 1 edited
-
ttt-devices/trunk/readme.txt (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ttt-devices/trunk/readme.txt
r762950 r764791 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html 9 9 10 Description: Simple way to detect the client device at php level. 10 Custom device performance. 11 12 Make your Responsive Design better. Beyond CSS @media Queries. 11 13 12 14 … … 17 19 = Identify the device with a CSS body class = 18 20 19 Based on http://wordpress.org/extend/themes/thematic 21 Based on http://wordpress.org/extend/themes/thematic with some improvements! 20 22 21 23 We add a "body_class" filter with the device information: … … 53 55 ` 54 56 55 And also some for IE , nobody worried about it...;)57 And also some for IE ;) 56 58 57 59 … … 104 106 ` 105 107 108 = Stop loading some js for mobile = 109 110 Is very usefull if you need to make your site faster for mobile or tablet, this browsers can handle well some javascripts effects. You can stop remove them from a device like this: 111 112 ` 113 function heavyanimation_script() { 114 if ( is_tttdevice('desktop') ) { 115 wp_enqueue_script( 'heavyanimation', get_template_directory_uri() . '/js/havyscript.js', array('jquery')); 116 } 117 } 118 add_action('wp_enqueue_scripts', 'heavyanimation_script'); 119 ` 120 This means that js only load in desktop devices, easy :) 106 121 107 122 … … 112 127 e.g. 113 128 114 1. Upload ` plugin-name.php`to the `/wp-content/plugins/` directory129 1. Upload `ttt-devices` folder to the `/wp-content/plugins/` directory 115 130 1. Activate the plugin through the 'Plugins' menu in WordPress 116 131
Note: See TracChangeset
for help on using the changeset viewer.