WordPress.org

Make WordPress Core

Changeset 22948


Ignore:
Timestamp:
11/30/2012 01:40:59 PM (5 years ago)
Author:
ryan
Message:

Scope button classes so they can be used on the frontend without interfering with theme styles.

Props helenyhou, koopersmith
fixes #22644

Location:
trunk
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-header.php

    r22730 r22948  
    9898?>
    9999</head>
    100 <body class="wp-admin no-js <?php echo apply_filters( 'admin_body_class', '' ) . " $admin_body_class"; ?>">
     100<body class="wp-admin wp-core-ui no-js <?php echo apply_filters( 'admin_body_class', '' ) . " $admin_body_class"; ?>">
    101101<script type="text/javascript">
    102102    document.body.className = document.body.className.replace('no-js','js');
  • trunk/wp-admin/css/ie.css

    r22799 r22948  
    2626}
    2727
    28 .welcome-panel .welcome-button {
    29     padding: 0 16px;
    30 }
    31  
    3228#wp-fullscreen-title {
    3329    width: 97%;
  • trunk/wp-admin/css/wp-admin.css

    r22906 r22948  
    227227.js .closed .inside,
    228228.js .hide-if-js,
    229 .no-js .hide-if-no-js {
     229.no-js .hide-if-no-js,
     230.js.wp-core-ui .hide-if-js,
     231.js .wp-core-ui .hide-if-js,
     232.no-js.wp-core-ui .hide-if-no-js,
     233.no-js .wp-core-ui .hide-if-no-js {
    230234    display: none;
    231235}
     
    22942298}
    22952299
    2296 .welcome-panel .welcome-button {
    2297     font: normal 15px sans-serif;
    2298     height: 46px;
    2299     line-height: 44px;
     2300.wp-core-ui .welcome-panel .button.button-hero {
    23002301    margin: 15px 0 3px;
    2301     padding: 0 36px;
    23022302}
    23032303
     
    23782378
    23792379@media screen and (max-width: 870px) {
    2380     .welcome-button {
    2381         font-size: 14px;
    2382         padding: 1em 2.3em;
    2383     }
    2384 
    23852380    .welcome-panel .welcome-panel-column,
    23862381    .welcome-panel .welcome-panel-column:first-child {
     
    56845679
    56855680.no-customize-support .hide-if-no-customize,
    5686 .customize-support .hide-if-customize {
     5681.customize-support .hide-if-customize,
     5682.no-customize-support.wp-core-ui .hide-if-no-customize,
     5683.no-customize-support .wp-core-ui .hide-if-no-customize,
     5684.customize-support.wp-core-ui .hide-if-customize,
     5685.customize-support .wp-core-ui .hide-if-customize {
    56875686    display: none;
    56885687}
  • trunk/wp-admin/customize.php

    r22798 r22948  
    4545_wp_admin_html_begin();
    4646
    47 $body_class = '';
     47$body_class = 'wp-core-ui';
    4848
    4949if ( wp_is_mobile() ) :
  • trunk/wp-admin/includes/dashboard.php

    r22930 r22948  
    12451245    <div class="welcome-panel-column">
    12461246        <h4><?php _e( 'Get Started' ); ?></h4>
    1247         <a class="button-primary welcome-button load-customize hide-if-no-customize" href="<?php echo wp_customize_url(); ?>"><?php _e( 'Customize Your Site' ); ?></a>
    1248         <a class="button-primary welcome-button hide-if-customize" href="<?php echo admin_url( 'themes.php' ); ?>"><?php _e( 'Customize Your Site' ); ?></a>
     1247        <a class="button button-primary button-hero load-customize hide-if-no-customize" href="<?php echo wp_customize_url(); ?>"><?php _e( 'Customize Your Site' ); ?></a>
     1248        <a class="button button-primary button-hero hide-if-customize" href="<?php echo admin_url( 'themes.php' ); ?>"><?php _e( 'Customize Your Site' ); ?></a>
    12491249        <?php if ( current_user_can( 'install_themes' ) || ( current_user_can( 'switch_themes' ) && count( wp_get_themes( array( 'allowed' => true ) ) ) > 1 ) ) : ?>
    12501250            <p class="hide-if-no-customize"><?php printf( __( 'or, <a href="%s">change your theme completely</a>' ), admin_url( 'themes.php' ) ); ?></p>
  • trunk/wp-admin/includes/media.php

    r22929 r22948  
    359359?>
    360360</head>
    361 <body<?php if ( isset($GLOBALS['body_id']) ) echo ' id="' . $GLOBALS['body_id'] . '"'; ?> class="no-js">
     361<body<?php if ( isset($GLOBALS['body_id']) ) echo ' id="' . $GLOBALS['body_id'] . '"'; ?> class="wp-core-ui no-js">
    362362<script type="text/javascript">
    363363document.body.className = document.body.className.replace('no-js', 'js');
  • trunk/wp-admin/includes/template.php

    r22874 r22948  
    13901390?>
    13911391</head>
    1392 <body<?php if ( isset($GLOBALS['body_id']) ) echo ' id="' . $GLOBALS['body_id'] . '"'; ?> class="wp-admin no-js iframe <?php echo apply_filters( 'admin_body_class', '' ) . ' ' . $admin_body_class; ?>">
     1392<body<?php if ( isset($GLOBALS['body_id']) ) echo ' id="' . $GLOBALS['body_id'] . '"'; ?> class="wp-admin wp-core-ui no-js iframe <?php echo apply_filters( 'admin_body_class', '' ) . ' ' . $admin_body_class; ?>">
    13931393<script type="text/javascript">
    13941394//<![CDATA[
  • trunk/wp-admin/install.php

    r22634 r22948  
    1616    <title>Error: PHP is not running</title>
    1717</head>
    18 <body>
     18<body class="wp-core-ui">
    1919    <h1 id="logo"><a href="http://wordpress.org/">WordPress</a></h1>
    2020    <h2>Error: PHP is not running</h2>
     
    6363    ?>
    6464</head>
    65 <body<?php if ( is_rtl() ) echo ' class="rtl"'; ?>>
     65<body class="wp-core-ui<?php if ( is_rtl() ) echo ' rtl'; ?>">
    6666<h1 id="logo"><a href="<?php esc_attr_e( 'http://wordpress.org/' ); ?>"><?php _e( 'WordPress' ); ?></a></h1>
    6767
  • trunk/wp-admin/maint/repair.php

    r22419 r22948  
    1717    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    1818    <title><?php _e( 'WordPress &rsaquo; Database Repair' ); ?></title>
    19     <?php 
     19    <?php
    2020    wp_admin_css( 'install', true );
    2121    ?>
    2222</head>
    23 <body>
     23<body class="wp-core-ui">
    2424<h1 id="logo"><a href="<?php esc_attr_e( 'http://wordpress.org/' ); ?>"><?php _e( 'WordPress' ); ?></a></h1>
    2525
  • trunk/wp-admin/network/sites.php

    r22419 r22948  
    5454    if ( 'confirm' === $_GET['action'] ) {
    5555        check_admin_referer( 'confirm' );
    56        
     56
    5757        if ( ! headers_sent() ) {
    5858            nocache_headers();
     
    7373                ?>
    7474            </head>
    75             <body>
     75            <body class="wp-core-ui">
    7676                <h1 id="logo"><a href="<?php esc_attr_e( 'http://wordpress.org/' ); ?>"><?php _e( 'WordPress' ); ?></a></h1>
    7777                <form action="sites.php?action=<?php echo esc_attr( $_GET['action2'] ) ?>" method="post">
     
    8686        </html>
    8787        <?php
    88         exit(); 
    89     }
    90    
     88        exit();
     89    }
     90
    9191    $updated_action = '';
    92    
     92
    9393    $manage_actions = array( 'deleteblog', 'allblogs', 'archiveblog', 'unarchiveblog', 'activateblog', 'deactivateblog', 'unspamblog', 'spamblog', 'unmatureblog', 'matureblog' );
    94     if ( in_array( $_GET['action'], $manage_actions ) ) {       
     94    if ( in_array( $_GET['action'], $manage_actions ) ) {
    9595        $action = $_GET['action'];
    9696        if ( 'allblogs' === $action )
     
    9898
    9999        check_admin_referer( $action );
    100     } 
    101        
     100    }
     101
    102102    switch ( $_GET['action'] ) {
    103103
     
    109109            if ( $id != '0' && $id != $current_site->blog_id && current_user_can( 'delete_site', $id ) ) {
    110110                wpmu_delete_blog( $id, true );
    111                 $updated_action = 'delete'; 
     111                $updated_action = 'delete';
    112112            }
    113113        break;
     
    116116            if ( ( isset( $_POST['action'] ) || isset( $_POST['action2'] ) ) && isset( $_POST['allblogs'] ) ) {
    117117                $doaction = $_POST['action'] != -1 ? $_POST['action'] : $_POST['action2'];
    118                
     118
    119119                foreach ( (array) $_POST['allblogs'] as $key => $val ) {
    120120                    if ( $val != '0' && $val != $current_site->blog_id ) {
     
    123123                                if ( ! current_user_can( 'delete_site', $val ) )
    124124                                    wp_die( __( 'You are not allowed to delete the site.' ) );
    125                                
     125
    126126                                $updated_action = 'all_delete';
    127127                                wpmu_delete_blog( $val, true );
     
    163163            update_blog_status( $id, 'spam', ( 'spamblog' === $_GET['action'] ) ? '1' : '0' );
    164164        break;
    165    
     165
    166166        case 'unmatureblog':
    167167        case 'matureblog':
     
    169169        break;
    170170    }
    171    
     171
    172172    if ( empty( $updated_action ) && in_array( $_GET['action'], $manage_actions ) )
    173173        $updated_action = $_GET['action'];
    174    
     174
    175175    if ( ! empty( $updated_action ) ) {
    176176        wp_safe_redirect( add_query_arg( array( 'updated' => $updated_action ), wp_get_referer() ) );
     
    219219        break;
    220220    }
    221    
     221
    222222    if ( ! empty( $msg ) )
    223223        $msg = '<div class="updated" id="message"><p>' . $msg . '</p></div>';
     
    232232<?php screen_icon( 'ms-admin' ); ?>
    233233<h2><?php _e( 'Sites' ) ?>
    234    
     234
    235235<?php if ( current_user_can( 'create_sites') ) : ?>
    236236    <a href="<?php echo network_admin_url('site-new.php'); ?>" class="add-new-h2"><?php echo esc_html_x( 'Add New', 'site' ); ?></a>
     
    242242</h2>
    243243
    244 <?php echo $msg; ?> 
    245    
     244<?php echo $msg; ?>
     245
    246246<form action="" method="get" id="ms-search">
    247247<?php $wp_list_table->search_box( __( 'Search Sites' ), 'site' ); ?>
  • trunk/wp-admin/press-this.php

    r22908 r22948  
    440440$admin_body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_locale() ) ) );
    441441?>
    442 <body class="press-this wp-admin <?php echo $admin_body_class; ?>">
     442<body class="press-this wp-admin wp-core-ui <?php echo $admin_body_class; ?>">
    443443<form action="press-this.php?action=post" method="post">
    444444<div id="poststuff" class="metabox-holder">
  • trunk/wp-admin/setup-config.php

    r22419 r22948  
    100100
    101101</head>
    102 <body<?php if ( is_rtl() ) echo ' class="rtl"'; ?>>
     102<body class="wp-core-ui<?php if ( is_rtl() ) echo ' rtl'; ?>">
    103103<h1 id="logo"><a href="<?php esc_attr_e( 'http://wordpress.org/' ); ?>"><?php _e( 'WordPress' ); ?></a></h1>
    104104<?php
  • trunk/wp-admin/upgrade.php

    r22424 r22948  
    5858    ?>
    5959</head>
    60 <body>
     60<body class="wp-core-ui">
    6161<h1 id="logo"><a href="<?php esc_attr_e( 'http://wordpress.org/' ); ?>"><?php _e( 'WordPress' ); ?></a></h1>
    6262
  • trunk/wp-includes/class-wp-editor.php

    r22719 r22948  
    114114        }
    115115
    116         echo '<div id="wp-' . $editor_id . '-wrap" class="wp-editor-wrap ' . $switch_class . '">';
     116        echo '<div id="wp-' . $editor_id . '-wrap" class="wp-core-ui wp-editor-wrap ' . $switch_class . '">';
    117117
    118118        if ( self::$editor_buttons_css ) {
  • trunk/wp-includes/css/admin-bar.css

    r22941 r22948  
    601601 */
    602602.no-customize-support .hide-if-no-customize,
    603 .customize-support .hide-if-customize {
     603.customize-support .hide-if-customize,
     604.no-customize-support.wp-core-ui .hide-if-no-customize,
     605.no-customize-support .wp-core-ui .hide-if-no-customize,
     606.customize-support.wp-core-ui .hide-if-customize,
     607.customize-support .wp-core-ui .hide-if-customize {
    604608    display: none;
    605609}
  • trunk/wp-includes/css/buttons.css

    r22707 r22948  
    3535---------------------------------------------------------------------------- */
    3636
    37 .button,
    38 .button-primary,
    39 .button-secondary {
     37.wp-core-ui .button,
     38.wp-core-ui .button-primary,
     39.wp-core-ui .button-secondary {
    4040    display: inline-block;
    4141    text-decoration: none;
     
    5858
    5959/* Remove the dotted border on :focus and the extra padding in Firefox */
    60 button::-moz-focus-inner,
    61 input[type="reset"]::-moz-focus-inner,
    62 input[type="button"]::-moz-focus-inner,
    63 input[type="submit"]::-moz-focus-inner {
     60.wp-core-ui button::-moz-focus-inner,
     61.wp-core-ui input[type="reset"]::-moz-focus-inner,
     62.wp-core-ui input[type="button"]::-moz-focus-inner,
     63.wp-core-ui input[type="submit"]::-moz-focus-inner {
    6464    border-width: 1px 0;
    6565    border-style: solid none;
     
    6868}
    6969
    70 .button.button-large,
    71 .button-group.button-large .button {
     70.wp-core-ui .button.button-large,
     71.wp-core-ui .button-group.button-large .button {
    7272    height: 30px;
    7373    line-height: 28px;
     
    7575}
    7676
    77 .button.button-small,
    78 .button-group.button-small .button {
     77.wp-core-ui .button.button-small,
     78.wp-core-ui .button-group.button-small .button {
    7979    height: 21px;
    8080    line-height: 20px;
     
    8282}
    8383
    84 .button.button-hero,
    85 .button-group.button-hero .button {
     84.wp-core-ui .button.button-hero,
     85.wp-core-ui .button-group.button-hero .button {
    8686    font-size: 14px;
    8787    height: 46px;
     
    9090}
    9191
    92 .button:active {
     92.wp-core-ui .button:active {
    9393    outline: none;
    9494}
    9595
    96 .button.hidden {
     96.wp-core-ui .button.hidden {
    9797    display: none;
    9898}
     
    102102---------------------------------------------------------------------------- */
    103103
    104 .button,
    105 .button-secondary {
     104.wp-core-ui .button,
     105.wp-core-ui .button-secondary {
    106106    background: #f3f3f3;
    107107    background-image: -webkit-gradient(linear, left top, left bottom, from(#fefefe), to(#f4f4f4));
     
    115115}
    116116
    117 .button.hover,
    118 .button:hover,
    119 .button-secondary:hover,
    120 .button.focus,
    121 .button:focus,
    122 .button-secondary:focus {
     117.wp-core-ui .button.hover,
     118.wp-core-ui .button:hover,
     119.wp-core-ui .button-secondary:hover,
     120.wp-core-ui .button.focus,
     121.wp-core-ui .button:focus,
     122.wp-core-ui .button-secondary:focus {
    123123    background: #f3f3f3;
    124124    background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#f3f3f3));
     
    132132}
    133133
    134 .button.focus,
    135 .button:focus,
    136 .button-secondary:focus {
     134.wp-core-ui .button.focus,
     135.wp-core-ui .button:focus,
     136.wp-core-ui .button-secondary:focus {
    137137    -webkit-box-shadow: 1px 1px 1px rgba(0,0,0,.2);
    138138    box-shadow: 1px 1px 1px rgba(0,0,0,.2);
    139139}
    140140
    141 .button.active,
    142 .button.active:hover,
    143 .button.active:focus,
    144 .button:active,
    145 .button-secondary:active {
     141.wp-core-ui .button.active,
     142.wp-core-ui .button.active:hover,
     143.wp-core-ui .button.active:focus,
     144.wp-core-ui .button:active,
     145.wp-core-ui .button-secondary:active {
    146146    background: #eee;
    147147    background-image: -webkit-gradient(linear, left top, left bottom, from(#f4f4f4), to(#fefefe));
     
    158158}
    159159
    160 .button[disabled],
    161 .button:disabled,
    162 .button-secondary[disabled],
    163 .button-secondary:disabled,
    164 .button-disabled {
     160.wp-core-ui .button[disabled],
     161.wp-core-ui .button:disabled,
     162.wp-core-ui .button-secondary[disabled],
     163.wp-core-ui .button-secondary:disabled,
     164.wp-core-ui .button-disabled {
    165165    color: #aaa !important;
    166166    border-color: #ddd !important;
     
    181181---------------------------------------------------------------------------- */
    182182
    183 .button-primary {
     183.wp-core-ui .button-primary {
    184184    background-color: #21759b;
    185185    background-image: -webkit-gradient(linear, left top, left bottom, from(#2a95c5), to(#21759b));
     
    198198}
    199199
    200 .button-primary.hover,
    201 .button-primary:hover,
    202 .button-primary.focus,
    203 .button-primary:focus {
     200.wp-core-ui .button-primary.hover,
     201.wp-core-ui .button-primary:hover,
     202.wp-core-ui .button-primary.focus,
     203.wp-core-ui .button-primary:focus {
    204204    background-color: #278ab7;
    205205    background-image: -webkit-gradient(linear, left top, left bottom, from(#2e9fd2), to(#21759b));
     
    216216}
    217217
    218 .button-primary.focus,
    219 .button-primary:focus {
     218.wp-core-ui .button-primary.focus,
     219.wp-core-ui .button-primary:focus {
    220220    border-color: #0e3950;
    221221    -webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.6), 1px 1px 2px rgba(0,0,0,0.4);
     
    223223}
    224224
    225 .button-primary.active,
    226 .button-primary.active:hover,
    227 .button-primary.active:focus,
    228 .button-primary:active {
     225.wp-core-ui .button-primary.active,
     226.wp-core-ui .button-primary.active:hover,
     227.wp-core-ui .button-primary.active:focus,
     228.wp-core-ui .button-primary:active {
    229229    background: #1b607f;
    230230    background-image: -webkit-gradient(linear, left top, left bottom, from(#21759b), to(#278ab7));
     
    241241}
    242242
    243 .button-primary[disabled],
    244 .button-primary:disabled,
    245 .button-primary-disabled {
     243.wp-core-ui .button-primary[disabled],
     244.wp-core-ui .button-primary:disabled,
     245.wp-core-ui .button-primary-disabled {
    246246    color: #94cde7 !important;
    247247    background: #298cba !important;
     
    257257---------------------------------------------------------------------------- */
    258258
    259 .button-group {
     259.wp-core-ui .button-group {
    260260    position: relative;
    261261    display: inline-block;
     
    265265}
    266266
    267 .button-group > .button {
     267.wp-core-ui .button-group > .button {
    268268    display: inline-block;
    269269    border-radius: 0;
     
    272272}
    273273
    274 .button-group > .button-primary {
     274.wp-core-ui .button-group > .button-primary {
    275275    z-index: 100;
    276276}
    277277
    278 .button-group > .button:hover {
     278.wp-core-ui .button-group > .button:hover {
    279279    z-index: 20;
    280280}
    281281
    282 .button-group > .button:first-child {
     282.wp-core-ui .button-group > .button:first-child {
    283283    border-radius: 3px 0 0 3px;
    284284}
    285285
    286 .button-group > .button:last-child {
     286.wp-core-ui .button-group > .button:last-child {
    287287    border-radius: 0 3px 3px 0;
    288288}
  • trunk/wp-includes/js/media-views.js

    r22946 r22948  
    10661066                uploader: true
    10671067            });
     1068
     1069            // Ensure core UI is enabled.
     1070            this.$el.addClass('wp-core-ui');
    10681071
    10691072            // Initialize modal container view.
  • trunk/wp-includes/js/tinymce/plugins/wpeditimage/editimage.html

    r22942 r22948  
    1212</head>
    1313
    14 <body id="media-upload" style="display:none;">
     14<body id="media-upload" class="wp-core-ui" style="display:none;">
    1515<script type="text/javascript">
    1616if ( 'rtl' == tinyMCEPopup.editor.getParam('directionality','') )
  • trunk/wp-includes/js/tinymce/wp-mce-help.php

    r22550 r22948  
    153153<?php endif; ?>
    154154</head>
    155 <body class="windows">
     155<body class="windows wp-core-ui">
    156156<script type="text/javascript">
    157157if ( tinymce.isMac )
  • trunk/wp-includes/media.php

    r22929 r22948  
    15061506
    15071507    <script type="text/html" id="tmpl-media-modal">
    1508         <div class="media-modal">
     1508        <div class="media-modal wp-core-ui">
    15091509            <h3 class="media-modal-title">{{ data.title }}</h3>
    15101510            <a class="media-modal-close media-modal-icon" href="#" title="<?php esc_attr_e('Close'); ?>"></a>
  • trunk/wp-login.php

    r22413 r22948  
    8787        $login_header_url = '#';
    8888
    89     $classes = array( 'login-action-' . $action );
     89    $classes = array( 'login-action-' . $action, 'wp-core-ui' );
    9090    if ( wp_is_mobile() )
    9191        $classes[] = 'mobile';
Note: See TracChangeset for help on using the changeset viewer.