Make WordPress Core

Ticket #26369: 26369.4.patch

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

     
    19091909        height: 34px;
    19101910}
    19111911
     1912/* No @font-face support */
     1913.no-font-face #adminmenu .wp-menu-image {
     1914        display: none;
     1915}
     1916
     1917.no-font-face #adminmenu div.wp-menu-name {
     1918        padding: 8px 12px;
     1919}
     1920
     1921.no-font-face.auto-fold #adminmenu .wp-menu-name {
     1922        margin-left: 0;
     1923}
     1924/* End no @font-face support */
     1925
    19121926/* Sticky admin menu */
    19131927
    19141928.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

     
    353353                                $class .= ' ie9';
    354354                } elseif ( wp_is_mobile() ) {
    355355                        $class .= ' mobile';
     356
     357                        if ( ! _font_face_support() )
     358                                $class .= ' no-font-face';
    356359                }
    357360
    358361                ?>
     
    449452
    450453                        echo $node->title;
    451454
     455                        if ( ! empty( $node->meta['title'] ) ) {
     456                                ?><span class="ab-label-hidden"><?php echo esc_html( $node->meta['title'] ); ?></span><?php
     457                        }
     458
    452459                        if ( $has_link ) :
    453460                                ?></a><?php
    454461                        else:
  • src/wp-includes/css/admin-bar.css

     
    679679        background-image: none;
    680680}
    681681
     682/* No @font-face support */
     683#wpadminbar span.ab-label-hidden {
     684        display: none;
     685}
    682686
     687#wpadminbar.no-font-face span.ab-label-hidden {
     688        display: inline;
     689}
     690
     691#wpadminbar.no-font-face ul.ab-top-menu > li > a.ab-item {
     692        display: block;
     693        width: 45px;
     694        text-align: center;
     695        overflow: hidden;
     696        margin: 0 3px;
     697}
     698
     699#wpadminbar.no-font-face #wp-admin-bar-my-sites > .ab-item,
     700#wpadminbar.no-font-face #wp-admin-bar-site-name > .ab-item,
     701#wpadminbar.no-font-face #wp-admin-bar-edit > .ab-item {
     702        text-indent: 0;
     703}
     704
     705#wpadminbar.no-font-face .ab-icon,
     706#wpadminbar.no-font-face .ab-icon:before,
     707#wpadminbar.no-font-face a.ab-item:before {
     708        display: none !important;
     709}
     710
     711#wpadminbar.no-font-face ul.ab-top-menu > li > a > span.ab-label {
     712        display: none;
     713}
     714
    683715@media screen and ( max-width: 782px ) {
    684716        /* Toolbar Touchification*/
    685717        html #wpadminbar {
     
    963995                left: auto;
    964996        }
    965997
    966 
    967 
    968998        .network-admin #wpadminbar ul#wp-admin-bar-top-secondary > li#wp-admin-bar-my-account {
    969999                margin-right: 0;
    9701000        }
     
    10211051        #wpadminbar li#wp-admin-bar-updates {
    10221052                display: none;
    10231053        }
    1024 }
    1025  No newline at end of file
     1054}
  • 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}