diff options
Diffstat (limited to 'plugins/jetpack/modules/notes.php')
-rw-r--r-- | plugins/jetpack/modules/notes.php | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/plugins/jetpack/modules/notes.php b/plugins/jetpack/modules/notes.php index c103e80a..353bf6d0 100644 --- a/plugins/jetpack/modules/notes.php +++ b/plugins/jetpack/modules/notes.php @@ -1,11 +1,12 @@ <?php /** * Module Name: Notifications - * Module Description: Monitor and manage your site's activity with Notifications in your Toolbar and on WordPress.com. - * Sort Order: 1 + * Module Description: Receive notification of site activity via the admin toolbar and your Mobile devices. + * Sort Order: 13 * First Introduced: 1.9 * Requires Connection: Yes * Auto Activate: Yes + * Module Tags: Other */ if ( !defined( 'JETPACK_NOTES__CACHE_BUSTER' ) ) define( 'JETPACK_NOTES__CACHE_BUSTER', JETPACK__VERSION . '-' . gmdate( 'oW' ) ); @@ -48,9 +49,8 @@ class Jetpack_Notifications { function wpcom_static_url($file) { $i = hexdec( substr( md5( $file ), -1 ) ) % 2; - $http = is_ssl() ? 'https' : 'http'; - $url = $http . '://s' . $i . '.wp.com' . $file; - return $url; + $url = 'http://s' . $i . '.wp.com' . $file; + return set_url_scheme( $url ); } // return the major version of Internet Explorer the viewer is using or false if it's not IE @@ -60,7 +60,9 @@ class Jetpack_Notifications { return $version; } - preg_match( '/MSIE (\d+)/', $_SERVER['HTTP_USER_AGENT'], $matches ); + $user_agent = isset( $_SERVER['HTTP_USER_AGENT'] ) ? $_SERVER['HTTP_USER_AGENT'] : ''; + + preg_match( '/MSIE (\d+)/', $user_agent, $matches ); $version = empty( $matches[1] ) ? null : $matches[1]; if ( empty( $version ) || !$version ) { return false; |