Make WordPress Core

Ticket #26369: 26369.5.patch

File 26369.5.patch, 14.0 KB (added by azaozz, 10 years ago)
  • src/wp-admin/css/wp-admin.css

     
    19041904        height: 34px;
    19051905}
    19061906
     1907/* No @font-face support */
     1908.no-font-face #adminmenu .wp-menu-image {
     1909        display: none;
     1910}
     1911
     1912.no-font-face #adminmenu div.wp-menu-name {
     1913        padding: 8px 12px;
     1914}
     1915
     1916.no-font-face.auto-fold #adminmenu .wp-menu-name {
     1917        margin-left: 0;
     1918}
     1919/* End no @font-face support */
     1920
    19071921/* Sticky admin menu */
    19081922
    19091923.sticky-menu #adminmenuwrap {
  • src/wp-admin/includes/misc.php

     
    645645}
    646646add_action('admin_head', '_ipad_meta');
    647647
     648function _admin_font_face_test( $body_class ) {
     649        if ( wp_is_mobile() && ! _font_face_support() ) {
     650                if ( ! empty( $body_class ) )
     651                        $body_class .= ' ';
     652
     653                $body_class .= 'no-font-face';
     654        }
     655
     656        return $body_class;
     657}
     658add_filter( 'admin_body_class', '_admin_font_face_test' );
     659
    648660/**
    649661 * Check lock status for posts displayed on the Posts screen
    650662 *
  • src/wp-includes/class-wp-admin-bar.php

     
    351351                                $class .= ' ie8';
    352352                        elseif ( strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE 9' ) )
    353353                                $class .= ' ie9';
    354                 } elseif ( wp_is_mobile() ) {
     354                }
     355
     356                if ( wp_is_mobile() ) {
    355357                        $class .= ' mobile';
     358
     359                        if ( ! _font_face_support() ) {
     360                                $class .= ' no-font-face';
     361                        }
    356362                }
    357363
    358364                ?>
     
    449455
    450456                        echo $node->title;
    451457
     458                        if ( ! empty( $node->meta['title'] ) ) {
     459                                ?><span class="ab-label-hidden"><?php echo esc_html( $node->meta['title'] ); ?></span><?php
     460                        }
     461
    452462                        if ( $has_link ) :
    453463                                ?></a><?php
    454464                        else:
  • src/wp-includes/css/admin-bar.css

     
    697697        background-image: none;
    698698}
    699699
     700/* No @font-face support */
     701#wpadminbar span.ab-label-hidden {
     702        display: none;
     703}
    700704
     705#wpadminbar.no-font-face span.ab-label-hidden {
     706        display: inline;
     707}
     708
     709#wpadminbar.no-font-face ul.ab-top-menu > li > a.ab-item {
     710        display: block;
     711        width: 45px;
     712        text-align: center;
     713        overflow: hidden;
     714        margin: 0 3px;
     715}
     716
     717#wpadminbar.no-font-face #wp-admin-bar-my-sites > .ab-item,
     718#wpadminbar.no-font-face #wp-admin-bar-site-name > .ab-item,
     719#wpadminbar.no-font-face #wp-admin-bar-edit > .ab-item {
     720        text-indent: 0;
     721}
     722
     723#wpadminbar.no-font-face .ab-icon,
     724#wpadminbar.no-font-face .ab-icon:before,
     725#wpadminbar.no-font-face a.ab-item:before {
     726        display: none !important;
     727}
     728
     729#wpadminbar.no-font-face ul.ab-top-menu > li > a > span.ab-label {
     730        display: none;
     731}
     732
    701733@media screen and ( max-width: 782px ) {
    702734        /* Toolbar Touchification*/
    703735        html #wpadminbar {
     
    9861018                left: auto;
    9871019        }
    9881020
    989 
    990 
    9911021        .network-admin #wpadminbar ul#wp-admin-bar-top-secondary > li#wp-admin-bar-my-account {
    9921022                margin-right: 0;
    9931023        }
     
    10431073        #wpadminbar li#wp-admin-bar-updates {
    10441074                display: none;
    10451075        }
    1046 }
    1047  No newline at end of file
     1076}
  • src/wp-includes/css/editor.css

     
    9999        background: url("../js/tinymce/themes/advanced/img/icons.gif") no-repeat 20px 20px;
    100100}
    101101
     102/* No @font-face support */
     103.no-font-face .wp_themeSkin span.mce_undo,
     104.no-font-face .wp_themeSkin span.mce_redo,
     105.no-font-face .wp_themeSkin span.mce_bullist,
     106.no-font-face .wp_themeSkin span.mce_numlist,
     107.no-font-face .wp_themeSkin span.mce_blockquote,
     108.no-font-face .wp_themeSkin span.mce_charmap,
     109.no-font-face .wp_themeSkin span.mce_bold,
     110.no-font-face .wp_themeSkin span.mce_italic,
     111.no-font-face .wp_themeSkin span.mce_underline,
     112.no-font-face .wp_themeSkin span.mce_justifyleft,
     113.no-font-face .wp_themeSkin span.mce_justifyright,
     114.no-font-face .wp_themeSkin span.mce_justifycenter,
     115.no-font-face .wp_themeSkin span.mce_justifyfull,
     116.no-font-face .wp_themeSkin span.mce_indent,
     117.no-font-face .wp_themeSkin span.mce_outdent,
     118.no-font-face .wp_themeSkin span.mce_link,
     119.no-font-face .wp_themeSkin span.mce_unlink,
     120.no-font-face .wp_themeSkin span.mce_help,
     121.no-font-face .wp_themeSkin span.mce_removeformat,
     122.no-font-face .wp_themeSkin span.mce_fullscreen,
     123.no-font-face .wp_themeSkin span.mce_wp_fullscreen,
     124.no-font-face .wp_themeSkin span.mce_media,
     125.no-font-face .wp_themeSkin span.mce_pastetext,
     126.no-font-face .wp_themeSkin span.mce_pasteword,
     127.no-font-face .wp_themeSkin span.mce_wp_help,
     128.no-font-face .wp_themeSkin span.mce_wp_adv,
     129.no-font-face .wp_themeSkin span.mce_wp_more,
     130.no-font-face .wp_themeSkin span.mce_strikethrough,
     131.no-font-face .wp_themeSkin span.mce_spellchecker,
     132.no-font-face .wp_themeSkin span.mce_forecolor,
     133.no-font-face .wp_themeSkin .mce_forecolorpicker,
     134.no-font-face .wp_themeSkin .mceSplitButton .mce_spellchecker span.mce_spellchecker,
     135.no-font-face .wp_themeSkin .mceSplitButton .mce_forecolor span.mce_forecolor,
     136.no-font-face .wp_themeSkin .mceSplitButton span.mce_numlist,
     137.no-font-face .wp_themeSkin .mceSplitButton span.mce_bullist {
     138        -moz-transition: none;
     139        -webkit-transition: none;
     140        transition: none;
     141        background-image: url('../images/wpicons.png?ver=20120720');
     142}
    102143
     144/* Theme */
     145.no-font-face .wp_themeSkin span.mce_undo {background-position:-500px -20px}
     146.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_undo,
     147.no-font-face .wp_themeSkin .mceButtonActive span.mce_undo {background-position:-500px 0}
     148
     149.no-font-face .wp_themeSkin span.mce_redo {background-position:-480px -20px}
     150.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_redo,
     151.no-font-face .wp_themeSkin .mceButtonActive span.mce_redo {background-position:-480px 0}
     152
     153.no-font-face .wp_themeSkin span.mce_bullist {background-position:-40px -20px}
     154.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_bullist,
     155.no-font-face .wp_themeSkin .mceButtonActive span.mce_bullist,
     156.no-font-face .wp_themeSkin .mceSplitButton:hover span.mce_bullist {background-position:-40px 0}
     157
     158.no-font-face .wp_themeSkin span.mce_numlist {background-position:-60px -20px}
     159.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_numlist,
     160.no-font-face .wp_themeSkin .mceButtonActive span.mce_numlist,
     161.no-font-face .wp_themeSkin .mceSplitButton:hover span.mce_numlist {background-position:-60px 0}
     162
     163.no-font-face .wp_themeSkin span.mce_blockquote {background-position:-80px -20px}
     164.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_blockquote,
     165.no-font-face .wp_themeSkin .mceButtonActive span.mce_blockquote {background-position:-80px 0}
     166
     167.no-font-face .wp_themeSkin span.mce_charmap {background-position:-420px -20px}
     168.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_charmap,
     169.no-font-face .wp_themeSkin .mceButtonActive span.mce_charmap {background-position:-420px 0}
     170
     171.no-font-face .wp_themeSkin span.mce_bold {background-position:0 -20px}
     172.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_bold,
     173.no-font-face .wp_themeSkin .mceButtonActive span.mce_bold {background-position:0 0}
     174
     175.no-font-face .wp_themeSkin span.mce_italic {background-position:-20px -20px}
     176.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_italic,
     177.no-font-face .wp_themeSkin .mceButtonActive span.mce_italic {background-position:-20px 0}
     178
     179.no-font-face .wp_themeSkin span.mce_underline {background-position:-280px -20px}
     180.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_underline,
     181.no-font-face .wp_themeSkin .mceButtonActive span.mce_underline {background-position:-280px 0}
     182
     183.no-font-face .wp_themeSkin span.mce_justifyleft {background-position:-100px -20px}
     184.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_justifyleft,
     185.no-font-face .wp_themeSkin .mceButtonActive span.mce_justifyleft {background-position:-100px 0}
     186
     187.no-font-face .wp_themeSkin span.mce_justifyright {background-position:-140px -20px}
     188.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_justifyright,
     189.no-font-face .wp_themeSkin .mceButtonActive span.mce_justifyright {background-position:-140px 0}
     190
     191.no-font-face .wp_themeSkin span.mce_justifycenter {background-position:-120px -20px}
     192.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_justifycenter,
     193.no-font-face .wp_themeSkin .mceButtonActive span.mce_justifycenter {background-position:-120px 0}
     194
     195.no-font-face .wp_themeSkin span.mce_justifyfull {background-position:-300px -20px}
     196.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_justifyfull,
     197.no-font-face .wp_themeSkin .mceButtonActive span.mce_justifyfull {background-position:-300px 0}
     198
     199.no-font-face .wp_themeSkin span.mce_indent {background-position:-460px -20px}
     200.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_indent,
     201.no-font-face .wp_themeSkin .mceButtonActive span.mce_indent {background-position:-460px 0}
     202
     203.no-font-face .wp_themeSkin span.mce_outdent {background-position:-440px -20px}
     204.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_outdent,
     205.no-font-face .wp_themeSkin .mceButtonActive span.mce_outdent {background-position:-440px 0}
     206
     207.no-font-face .wp_themeSkin span.mce_link {background-position:-160px -20px}
     208.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_link,
     209.no-font-face .wp_themeSkin .mceButtonActive span.mce_link {background-position:-160px 0}
     210
     211.no-font-face .wp_themeSkin span.mce_unlink {background-position:-180px -20px}
     212.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_unlink,
     213.no-font-face .wp_themeSkin .mceButtonActive span.mce_unlink {background-position:-180px 0}
     214
     215.no-font-face .wp_themeSkin span.mce_help {background-position:-520px -20px}
     216.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_help,
     217.no-font-face .wp_themeSkin .mceButtonActive span.mce_help {background-position:-520px 0}
     218
     219.no-font-face .wp_themeSkin span.mce_removeformat {background-position:-380px -20px}
     220.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_removeformat,
     221.no-font-face .wp_themeSkin .mceButtonActive span.mce_removeformat {background-position:-380px 0}
     222
     223.no-font-face .wp_themeSkin span.mce_strikethrough {background-position:-540px -20px;}
     224.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_strikethrough,
     225.no-font-face .wp_themeSkin .mceButtonActive span.mce_strikethrough {background-position:-540px 0}
     226
     227.no-font-face .wp_themeSkin .mceSplitButton .mce_forecolor span.mce_forecolor {background-position:-320px -20px}
     228.no-font-face .wp_themeSkin .mceSplitButtonEnabled:hover span.mce_forecolor,
     229.no-font-face .wp_themeSkin .mceSplitButtonSelected span.mce_forecolor {background-position:-320px 0}
     230
     231.no-font-face .wp_themeSkin .mce_forecolorpicker {background-position:-320px -20px}
     232
     233/* Plugins in WP */
     234.no-font-face .wp_themeSkin span.mce_fullscreen {background-position:-240px -20px}
     235.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_fullscreen,
     236.no-font-face .wp_themeSkin .mceButtonActive span.mce_fullscreen {background-position:-240px 0}
     237
     238.no-font-face .wp_themeSkin span.mce_wp_fullscreen {background-position:-240px -20px}
     239.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_wp_fullscreen,
     240.no-font-face .wp_themeSkin .mceButtonActive span.mce_wp_fullscreen {background-position:-240px 0}
     241
     242.no-font-face .wp_themeSkin span.mce_media {background-position:-400px -20px}
     243.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_media,
     244.no-font-face .wp_themeSkin .mceButtonActive span.mce_media {background-position:-400px 0}
     245
     246.no-font-face .wp_themeSkin span.mce_pastetext {background-position:-340px -20px}
     247.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_pastetext,
     248.no-font-face .wp_themeSkin .mceButtonActive span.mce_pastetext {background-position:-340px 0}
     249
     250.no-font-face .wp_themeSkin span.mce_pasteword {background-position:-360px -20px}
     251.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_pasteword,
     252.no-font-face .wp_themeSkin .mceButtonActive span.mce_pasteword {background-position:-360px 0}
     253
     254.no-font-face .wp_themeSkin span.mce_spellchecker {background-position:-220px -20px}
     255.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_spellchecker,
     256.no-font-face .wp_themeSkin .mceSplitButtonEnabled:hover span.mce_spellchecker,
     257.no-font-face .wp_themeSkin .mceButtonActive span.mce_spellchecker,
     258.no-font-face .wp_themeSkin .mceSplitButtonSelected span.mce_spellchecker {background-position:-220px 0}
     259
     260.no-font-face .wp_themeSkin span.mce_wp_help {background-position:-520px -20px}
     261.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_wp_help,
     262.no-font-face .wp_themeSkin .mceButtonActive span.mce_wp_help {background-position:-520px 0}
     263
     264.no-font-face .wp_themeSkin span.mce_wp_adv {background-position:-260px -20px}
     265.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_wp_adv,
     266.no-font-face .wp_themeSkin .mceButtonActive span.mce_wp_adv {background-position:-260px 0}
     267
     268.no-font-face .wp_themeSkin span.mce_wp_more {background-position:-200px -20px}
     269.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_wp_more,
     270.no-font-face .wp_themeSkin .mceButtonActive span.mce_wp_more {background-position:-200px 0}
     271
     272.no-font-face .mceIcon:before {
     273        display: none !important;
     274}
     275/* End no @font-face */
     276
    103277/* Containers */
    104278.wp_themeSkin table {}
    105279
  • src/wp-includes/vars.php

     
    139139
    140140        return $is_mobile;
    141141}
     142
     143function _font_face_support() {
     144        $pattern = '/Android (1.0|1.1|1.5|1.6|2.0|2.1)|Nokia|Opera Mini|' .
     145                'w(eb)?OSBrowser|webOS|UCWEB|Windows Phone OS 7|XBLWP7|ZuneWP7/';
     146
     147        if ( preg_match( $pattern, $_SERVER['HTTP_USER_AGENT'] ) )
     148                return false;
     149
     150        return true;
     151}