Changeset 1353438
- Timestamp:
- 02/18/2016 12:37:22 PM (10 years ago)
- Location:
- android-50-lollipop-status-bar-customiser/trunk
- Files:
-
- 2 edited
-
android-5.0-status-bar.php (modified) (4 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
android-50-lollipop-status-bar-customiser/trunk/android-5.0-status-bar.php
r1074150 r1353438 114 114 } 115 115 116 if ( isset( $this->options['vibrate'] ) && $this->options['vibrate'] == 1 ) { 117 $output .= <<<HTML 118 <script type="text/javascript"> 119 navigator.vibrate = navigator.vibrate || navigator.webkitVibrate || navigator.mozVibrate || navigator.msVibrate; 120 // vibrate for 500ms if available 121 if ( navigator.vibrate ) { 122 navigator.vibrate(500); 123 } 124 </script> 125 HTML; 126 127 } 128 116 129 echo $output; 117 130 } … … 186 199 array( 'id' => 'android-icon' ) 187 200 ); 201 202 add_settings_section( 203 'misc', // ID 204 'Misc Settings', // Title 205 array( $this, 'print_section_info_misc' ), // Callback 206 'wn-android-statusbar' // Page 207 ); 208 209 add_settings_field( 210 'vibrate', // ID 211 'Enable Vibration (if available)', // Title 212 array( $this, 'vibrate_callback' ), // Callback 213 'wn-android-statusbar', // Page 214 'misc', // Section 215 array( 'id' => 'vibrate' ) 216 ); 188 217 } 189 218 … … 216 245 { 217 246 echo 'Enter a URL or select a file to use from the Media Gallery. For best results, use an absolute URL.'; 247 } 248 249 /** 250 * Print the Section text for Icons 251 */ 252 public function print_section_info_misc() 253 { 254 echo 'Configure misc settings here.'; 218 255 } 219 256 … … 242 279 } 243 280 281 /** 282 * Get the settings option array and print one of its values 283 */ 284 public function vibrate_callback( $args ) 285 { 286 printf( 287 '<input type="checkbox" name="wn_android_statusbar[%s]" value="1" placeholder="" %s />', 288 $args['id'], 289 isset( $this->options[ $args['id'] ] ) ? 'checked' : '' 290 ); 291 } 292 244 293 } 245 294 -
android-50-lollipop-status-bar-customiser/trunk/readme.txt
r1237067 r1353438 2 2 Contributors: niraj.shah 3 3 Donate link: 4 Tags: android 5.0, android lollipop, status bar, browser, chrome 4 Tags: android 5.0, android lollipop, status bar, browser, chrome, vibration 5 5 Requires at least: 2.7 6 6 Tested up to: 4.3 7 Stable tag: 1. 2.17 Stable tag: 1.3 8 8 9 9 Use this plugin to change the Status Bar of Devices Running Android 5.0 Lollipop. … … 17 17 1. Upload the `android-50-lollipop-status-bar-customiser` folder to the `/wp-content/plugins/` directory 18 18 2. Activate the plugin through the 'Plugins' menu in WordPress 19 3. Set a Colour, Upload a Icon and Save settings.20 19 3. Set a Colour, Upload a Icon, Enable or Disable vibration, and Save settings. 20 1 21 21 == Screenshots == 22 22 … … 30 30 31 31 == Changelog == 32 33 = 1.3 = 34 * Added vibration option for supported devices 32 35 33 36 = 1.2.1 =
Note: See TracChangeset
for help on using the changeset viewer.