Make WordPress Core

Ticket #27013: 27013.4.patch

File 27013.4.patch, 1.7 KB (added by iseulde, 11 years ago)
  • src/wp-admin/admin-header.php

     
    6565        adminpage = '<?php echo $admin_body_class; ?>',
    6666        thousandsSeparator = '<?php echo addslashes( $wp_locale->number_format['thousands_sep'] ); ?>',
    6767        decimalPoint = '<?php echo addslashes( $wp_locale->number_format['decimal_point'] ); ?>',
    68         isRtl = <?php echo (int) is_rtl(); ?>;
     68        isRtl = <?php echo (int) is_rtl(); ?>,
     69        isAdmin = true;
    6970</script>
    7071<meta name="viewport" content="width=device-width,initial-scale=1.0">
    7172<?php
  • src/wp-admin/js/post.js

     
    11/* global postL10n, ajaxurl, wpAjax, setPostThumbnailL10n, postboxes, pagenow, tinymce, alert, deleteUserSetting */
    2 /* global theList:true, theExtraList:true, getUserSetting, setUserSetting */
     2/* global theList:true, theExtraList:true, getUserSetting, setUserSetting, isAdmin */
    33
    44var tagBox, commentsBox, WPSetThumbnailHTML, WPSetThumbnailID, WPRemoveThumbnail, wptitlehint, makeSlugeditClickable, editPermalink;
    55// Back-compat: prevent fatal errors
     
    10651065                });
    10661066        }
    10671067
    1068         if ( ! ( 'ontouchstart' in window ) ) {
     1068        if ( ! ( 'ontouchstart' in window ) && isAdmin ) {
    10691069                // When scrolling with mouse wheel or trackpad inside the Text editor, don't scroll the whole window
    10701070                $content = $('#content').on( 'onwheel' in $document[0] ? 'wheel.text-editor-scroll' : 'mousewheel.text-editor-scroll', function( event ) {
    10711071                        var delta, top,