Make WordPress Core

Ticket #24795: 24795.4.diff

File 24795.4.diff, 2.3 KB (added by technosailor, 13 years ago)

No JS compatible and reintroduce is_osx() function

  • wp-includes/pluggable.php

     
    17481748}
    17491749endif;
    17501750
     1751/**
     1752 * Determines if the User Operating System is Mac OS X or not
     1753 *
     1754 * Uses User Agent sniffing
     1755 * @since  3.6
     1756 * @return  boolean Returns true if the operating system is a Mac and false otherwise
     1757 */
     1758if( !function_exists( 'is_osx' ) ) :
     1759function is_osx() {
     1760        if( strpos( $_SERVER['HTTP_USER_AGENT'], 'Macintosh; Intel Mac OS X' ) !== false )
     1761                return true;
     1762       
     1763        return false;
     1764}
     1765endif;
  • wp-admin/options-permalink.php

     
    6464        jQuery('#permalink_structure').focus(function() {
    6565                jQuery("#custom_selection").attr('checked', 'checked');
    6666        });
     67        jQuery('#rules').on('focus',function(ev){
     68                jQuery(this).select();
     69                jQuery(this).on('mouseup', function(ev){
     70                        jQuery(this).unbind('mouseup');
     71                        return false;
     72                });
     73        });
    6774});
    6875//]]>
    6976</script>
     
    271278        <?php endif; ?>
    272279<?php else :
    273280        if ( $permalink_structure && ! $usingpi && ! $writable ) : ?>
    274 <p><?php _e('If your <code>.htaccess</code> file were <a href="http://codex.wordpress.org/Changing_File_Permissions">writable</a>, we could do this automatically, but it isn&#8217;t so these are the mod_rewrite rules you should have in your <code>.htaccess</code> file. Click in the field and press <kbd>CTRL + a</kbd> to select all.') ?></p>
     281<p><?php _e( sprintf( 'If your <code>.htaccess</code> file were <a href="http://codex.wordpress.org/Changing_File_Permissions">writable</a>, we could do this automatically, but it isn&#8217;t so these are the mod_rewrite rules you should have in your <code>.htaccess</code> file. Click in the field <span class="hide-if-js">and press <kbd>%s + A</kbd></span> to select all.', is_osx() ? 'Command (⌘)' : 'CTRL' ) ) ?></p>
    275282<form action="options-permalink.php" method="post">
    276283<?php wp_nonce_field('update-permalink') ?>
    277284        <p><textarea rows="6" class="large-text readonly" name="rules" id="rules" readonly="readonly"><?php echo esc_textarea( $wp_rewrite->mod_rewrite_rules() ); ?></textarea></p>