WordPress.org

Make WordPress Core

Changeset 8396


Ignore:
Timestamp:
07/22/2008 04:09:37 AM (10 years ago)
Author:
azaozz
Message:

Gears integration update in anticipation of Safari support. Fixes #7371

Location:
branches/2.6
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/2.6/wp-admin/admin-header.php

    r8249 r8396  
    7575
    7676<?php
    77 $gears_compat = false;
    78 
    79 if ( ($is_gecko || $is_winIE) && strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'webkit') === false ) {
    80     $gears_compat = true;
     77if ( ! $is_opera ) {
    8178?>
    8279    <div id="gears-info-box" class="info-box" style="display:none;">
     
    111108<?php } ?>
    112109
    113 <div id="user_info"><p><?php printf(__('Howdy, <a href="%1$s">%2$s</a>!'), 'profile.php', $user_identity) ?> | <a href="<?php echo site_url('wp-login.php?action=logout', 'login') ?>" title="<?php _e('Log Out') ?>"><?php _e('Log Out'); ?></a> | <?php _e('<a href="http://codex.wordpress.org/">Help</a>') ?> | <?php _e('<a href="http://wordpress.org/support/">Forums</a>'); if ( $gears_compat ) { ?> | <span id="gears-menu"><a href="#" onclick="wpGears.message(1);return false;"><?php _e('Turbo') ?></a></span><?php } ?></p></div>
     110<div id="user_info"><p><?php printf(__('Howdy, <a href="%1$s">%2$s</a>!'), 'profile.php', $user_identity) ?> | <a href="<?php echo site_url('wp-login.php?action=logout', 'login') ?>" title="<?php _e('Log Out') ?>"><?php _e('Log Out'); ?></a> | <?php _e('<a href="http://codex.wordpress.org/">Help</a>') ?> | <?php _e('<a href="http://wordpress.org/support/">Forums</a>'); if ( ! $is_opera ) { ?> | <span id="gears-menu"><a href="#" onclick="wpGears.message(1);return false;"><?php _e('Turbo') ?></a></span><?php } ?></p></div>
    114111
    115112<?php
  • branches/2.6/wp-admin/js/wp-gears.js

    r7951 r8396  
    2626
    2727    storeName : function() {
    28       var name = window.location.protocol + window.location.host;
     28        var name = window.location.protocol + window.location.host;
    2929
    30       name = name.replace(/[\/\\:*"?<>|;,]+/g, '_'); // gears beta doesn't allow certain chars in the store name
    31       name = 'wp_' + name.substring(0, 60); // max length of name is 64 chars
     30        name = name.replace(/[\/\\:*"?<>|;,]+/g, '_'); // gears beta doesn't allow certain chars in the store name
     31        name = 'wp_' + name.substring(0, 60); // max length of name is 64 chars
    3232
    33       return name;
    34     },
     33        return name;
     34    },
    3535
    36     message : function(show) {
     36    message : function(show) {
    3737        var t = this, msg1 = t.I('gears-msg1'), msg2 = t.I('gears-msg2'), msg3 = t.I('gears-msg3'), num = t.I('gears-upd-number'), wait = t.I('gears-wait');
    3838
     
    6262        return document.getElementById(id);
    6363    }
    64 }
     64};
    6565
    66 function gearsInit() {
     66(function() {
    6767    if ( 'undefined' != typeof google && google.gears ) return;
    6868
    6969    var gf = false;
    70     if ( 'undefined' != typeof GearsFactory ) { // Firefox
     70    if ( 'undefined' != typeof GearsFactory ) {
    7171        gf = new GearsFactory();
    72     } else { // IE
     72    } else {
    7373        try {
    7474            gf = new ActiveXObject('Gears.Factory');
    75         } catch (e) {}
     75            if ( factory.getBuildInfo().indexOf('ie_mobile') != -1 )
     76                gf.privateSetGlobalObject(this);
     77        } catch (e) {
     78            if ( ( 'undefined' != typeof navigator.mimeTypes ) && navigator.mimeTypes['application/x-googlegears'] ) {
     79                gf = document.createElement("object");
     80                gf.style.display = "none";
     81                gf.width = 0;
     82                gf.height = 0;
     83                gf.type = "application/x-googlegears";
     84                document.documentElement.appendChild(gf);
     85            }
     86        }
    7687    }
    7788
     
    7990    if ( 'undefined' == typeof google ) google = {};
    8091    if ( ! google.gears ) google.gears = { factory : gf };
    81 }
    82 
    83 gearsInit();
     92})();
  • branches/2.6/wp-includes/script-loader.php

    r8348 r8396  
    195195        ));
    196196       
    197         $scripts->add( 'wp-gears', '/wp-admin/js/wp-gears.js', false, '20080511' );
     197        $scripts->add( 'wp-gears', '/wp-admin/js/wp-gears.js', false, '20080721' );
    198198        $scripts->localize( 'wp-gears', 'wpGearsL10n', array(
    199199            'updateCompleted' => __('Update completed.'),
Note: See TracChangeset for help on using the changeset viewer.