WordPress.org

Make WordPress Core

Changeset 10031


Ignore:
Timestamp:
12/04/2008 06:35:21 AM (9 years ago)
Author:
azaozz
Message:

Do not show the Turbo link in the header if Gears is already being used, props markjaquith, fixes #8276

Location:
trunk
Files:
3 edited

Legend:

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

    r10010 r10031  
    100100<div id="user_info">
    101101<p><?php printf(__('Howdy, <a href="%1$s" title="Edit your profile">%2$s</a>'), 'profile.php', $user_identity) ?>
    102 <?php if ( ! $is_opera ) { ?> | <span id="gears-menu"><a href="tools.php"><?php _e('Turbo') ?></a></span><?php } ?> |
     102<?php if ( ! $is_opera ) { ?><span class="turbo-nag hidden"> | <a href="tools.php"><?php _e('Turbo') ?></a></span><?php } ?> |
    103103<a href="<?php echo wp_logout_url() ?>" title="<?php _e('Log Out') ?>"><?php _e('Log Out'); ?></a></p>
    104104</div>
  • trunk/wp-admin/js/common.js

    r9911 r10031  
    350350
    351351})(jQuery);
     352
     353
     354jQuery(document).ready(function($){
     355    if ( 'undefined' != typeof google && google.gears ) return;
     356   
     357    var gf = false;
     358    if ( 'undefined' != typeof GearsFactory ) {
     359        gf = new GearsFactory();
     360    } else {
     361        try {
     362            gf = new ActiveXObject('Gears.Factory');
     363            if ( factory.getBuildInfo().indexOf('ie_mobile') != -1 )
     364                gf.privateSetGlobalObject(this);
     365        } catch (e) {
     366            if ( ( 'undefined' != typeof navigator.mimeTypes ) && navigator.mimeTypes['application/x-googlegears'] ) {
     367                gf = document.createElement("object");
     368                gf.style.display = "none";
     369                gf.width = 0;
     370                gf.height = 0;
     371                gf.type = "application/x-googlegears";
     372                document.documentElement.appendChild(gf);
     373            }
     374        }
     375    }
     376    if ( gf && gf.hasPermission )
     377        return;
     378       
     379    $('.turbo-nag').show();
     380});
  • trunk/wp-includes/script-loader.php

    r10030 r10031  
    4242    $scripts->default_version = get_bloginfo( 'version' );
    4343
    44     $scripts->add( 'common', '/wp-admin/js/common.js', array('jquery', 'hoverIntent'), '20081126' );
     44    $scripts->add( 'common', '/wp-admin/js/common.js', array('jquery', 'hoverIntent'), '20081203' );
    4545    $scripts->add( 'sack', '/wp-includes/js/tw-sack.js', false, '1.6.1' );
    4646
Note: See TracChangeset for help on using the changeset viewer.