WordPress.org

Make WordPress Core

Changeset 8406


Ignore:
Timestamp:
07/23/08 05:12:57 (6 years ago)
Author:
azaozz
Message:

Small update to Gears info messages and simple Safari detection. Fixes #7380 for 2.7

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-header.php

    r8395 r8406  
    7676<?php 
    7777if ( ! $is_opera ) {  
     78    $gears_menu = $is_safari ? __('the Safari menu') : __('your browser Tools menu'); 
    7879?> 
    7980    <div id="gears-info-box" class="info-box" style="display:none;"> 
     
    9192    <h3 class="info-box-title"><?php _e('Gears Status'); ?></h3> 
    9293    <p><?php _e('Gears is installed on this computer but is not enabled for use with WordPress.'); ?></p>  
    93     <p><?php _e('To enable it, make sure this web site is not on the denied list in Gears Settings under your browser\'s Tools menu, then click the button below.'); ?></p> 
     94    <p><?php echo __('To enable it, make sure this web site is not on the denied list in Gears Settings under').' '.$gears_menu.__(', then click the button below.'); ?></p> 
    9495    <p><strong><?php _e('However if this is a public or shared computer, Gears should not be enabled.'); ?></strong></p> 
    9596    <div class="submit"><button class="button" onclick="wpGears.getPermission();"><?php _e('Enable Gears'); ?></button> 
     
    99100    <div id="gears-msg3" style="display:none;"> 
    100101    <h3 class="info-box-title"><?php _e('Gears Status'); ?></h3> 
    101     <p><?php _e('Gears is installed and enabled on this computer. You can disable it from your browser Tools menu.'); ?></p> 
     102    <p><?php echo __('Gears is installed and enabled on this computer. You can disable it from').' '.$gears_menu; ?>.</p> 
    102103    <p><?php _e('If there are any errors, try disabling Gears, then reload the page and enable it again.'); ?></p> 
    103104    <p><?php _e('Local storage status:'); ?> <span id="gears-wait"><span style="color:#f00;"><?php _e('Please wait! Updating files:'); ?></span> <span id="gears-upd-number"></span></span></p> 
     
    105106    </div> 
    106107    </div> 
    107  
    108108<?php } ?> 
    109109 
  • trunk/wp-includes/vars.php

    r6554 r8406  
    3535 
    3636// Simple browser detection 
    37 $is_lynx = $is_gecko = $is_winIE = $is_macIE = $is_opera = $is_NS4 = false; 
     37$is_lynx = $is_gecko = $is_winIE = $is_macIE = $is_opera = $is_NS4 = $is_safari = false; 
    3838 
    3939if (strpos($_SERVER['HTTP_USER_AGENT'], 'Lynx') !== false) { 
    4040    $is_lynx = true; 
     41} elseif ( strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'webkit') !== false ) { 
     42    $is_safari = true; 
    4143} elseif (strpos($_SERVER['HTTP_USER_AGENT'], 'Gecko') !== false) { 
    4244    $is_gecko = true; 
Note: See TracChangeset for help on using the changeset viewer.