Changeset 2382492
- Timestamp:
- 09/15/2020 11:04:26 PM (6 years ago)
- Location:
- browserly/trunk
- Files:
-
- 5 edited
-
browserly.php (modified) (1 diff)
-
inc/customizer.php (modified) (3 diffs)
-
inc/get-options.php (modified) (1 diff)
-
readme.txt (modified) (3 diffs)
-
uninstall.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
browserly/trunk/browserly.php
r2381564 r2382492 8 8 * Description: Easily customise the users browser, including setting the theme colour, and disabling overscroll or pull-to-refresh features. 9 9 * Author: Browserly 10 * Version: 1. 1.010 * Version: 1.2.0 11 11 */ 12 12 -
browserly/trunk/inc/customizer.php
r2381564 r2382492 17 17 ) ); 18 18 19 // add theme section19 // add theme section 20 20 $wp_customize->add_section( 'browserly_theme', array( 21 21 'title' => __( 'Theme Colour', 'browserly' ), 22 'description' => __( 'Allow your branding to flow throughout the users browser on mobile devices, by adjusting the theme colour of the address and notifications bar. ' ),22 'description' => __( 'Allow your branding to flow throughout the users browser on mobile devices, by adjusting the theme colour of the address and notifications bar. <br><br>This applies to Chrome, Firefox, Opera, and Windows mobile devices. ' ), 23 23 'priority' => 10, 24 24 'panel' => 'browserly', … … 33 33 ) ); 34 34 35 // primary color control35 // primary color control 36 36 $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'browserly_primary_color', array( 37 'label' => 'Address & Notification Bar Colour',38 'description' => __( 'This applies to Chrome, Firefox, Opera, and Windows mobile devices.', 'browserly' ),39 37 'section' => 'browserly_theme', 40 38 'settings' => 'browserly_primary_color', … … 111 109 ) ); 112 110 111 // add outdated browser section 112 $wp_customize->add_section( 'browserly_outdatedbrowser', array( 113 'title' => __( 'Outdated Browser', 'browserly' ), 114 'description' => __( 'Don\'t let visitors using outdated browsers miss out! Enable this option to display a message to visitors using an out-of-date browser version, recommending they upgrade. <br><br>Further details on this can be found here: https://browser-update.org/' ), 115 'priority' => 30, 116 'panel' => 'browserly', 117 ) ); 118 119 // outdated browser setting 120 $wp_customize->add_setting( 'browserly_outdatedbrowser' , array( 121 'type' => 'option', 122 'capability' => 'manage_options', 123 'sanitize_callback' => 'browserly_sanitize_checkbox' 124 ) ); 125 126 // outdated browser control 127 $wp_customize->add_control( 'browserly_outdatedbrowser', array( 128 'label' => 'Enable out-of-date browser message', 'browserly', 129 'type' => 'checkbox', 130 'default' => '0', 131 'section' => 'browserly_outdatedbrowser', 132 ) ); 133 113 134 function browserly_sanitize_checkbox( $checked ) { 114 135 // Boolean check. -
browserly/trunk/inc/get-options.php
r2381564 r2382492 70 70 71 71 add_action( 'wp_head', 'browserly_overscroll_styles' ); 72 73 74 // Out-of-date browser message 75 function browserly_outdatedbrowser() { 76 77 $browserly_outdatedbrowser = get_option( 'browserly_outdatedbrowser', __('0') ); 78 if ( $browserly_outdatedbrowser != '0' ) : 79 ?> 80 <script> 81 var $buoop = {required:{e:-4,f:-3,o:-3,s:-1,c:-3},insecure:true,unsupported:true,mobile:false,api:2020.09 }; 82 function $buo_f(){ 83 var e = document.createElement("script"); 84 e.src = "//browser-update.org/update.min.js"; 85 document.body.appendChild(e); 86 }; 87 try {document.addEventListener("DOMContentLoaded", $buo_f,false)} 88 catch(e){window.attachEvent("onload", $buo_f)} 89 </script> 90 <?php 91 endif; 92 93 } 94 95 add_action( 'wp_footer', 'browserly_outdatedbrowser' ); -
browserly/trunk/readme.txt
r2381564 r2382492 1 1 === Browserly === 2 Tags: Chrome,Theme Color, meta name, Color,Theme,Overscroll,Pull to refresh, Browser,Safari,Firefox 2 Contributors: chrisb10 3 Tags: theme color, meta name, pull to refresh, overscroll, out of date, outdated browser, color, theme, browser, chrome, safari, firefox 3 4 Requires at least: 4.0 4 5 Tested up to: 5.5 … … 34 35 == Installation == 35 36 36 1. Upload the plugin files to the `/wp-content/plugins/browserly` directory, or install the plugin through the WordPress plugins screen directly37 1. Upload the plugin to the `/wp-content/plugins` directory, or install the plugin through the WordPress plugins screen directly 37 38 2. Activate the plugin through the 'Plugins' screen in WordPress 38 39 3. The plugin options can be found within the WordPress Customizer > Browserly … … 44 45 The options are available within the WordPress Customizer > Browserly. 45 46 46 = Does your plugin cleanupdata upon uninstall? =47 = Does Browserly cleanup its data upon uninstall? = 47 48 48 Yes, when you uninstall Browserly, we remove any saved data. It will be like it was never installed. :) 49 Yes, when you uninstall Browserly, any saved data is automatically removed. It will be like it was never installed. :) 50 51 = How can I get support? = 52 53 The support forum is best! We'll follow with any questions/issues there - https://wordpress.org/support/plugin/browserly/ 49 54 50 55 == Changelog == 51 56 1.0.0 57 10th September 2020 52 58 Initial release 53 59 1.1.0 60 14th September 2020 54 61 Feature: Safari Specific Styling 62 1.2.0 63 15th September 2020 64 Feature: Outdated browser message -
browserly/trunk/uninstall.php
r2381564 r2382492 17 17 $wpdb->query( "DELETE FROM {$wpdb->options} WHERE option_name LIKE 'browserly_overscroll'" ); 18 18 $wpdb->query( "DELETE FROM {$wpdb->options} WHERE option_name LIKE 'browserly_safari_notification'" ); 19 $wpdb->query( "DELETE FROM {$wpdb->options} WHERE option_name LIKE 'browserly_outdatedbrowser'" );
Note: See TracChangeset
for help on using the changeset viewer.