WordPress.org

Make WordPress Core


Ignore:
Timestamp:
12/03/2013 05:31:33 PM (6 years ago)
Author:
helen
Message:

Better Dashboard treatment when in no-JS, especially Quick Draft. props georgestephanis, helen. fixes #26376.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/dashboard.php

    r26394 r26563  
    4949
    5050    // QuickPress Widget
    51     if ( is_blog_admin() && current_user_can( 'edit_posts' ) )
    52         wp_add_dashboard_widget( 'dashboard_quick_press', __( 'Quick Draft' ), 'wp_dashboard_quick_press' );
     51    if ( is_blog_admin() && current_user_can( 'edit_posts' ) ) {
     52        $quick_draft_title = sprintf( '<span class="hide-if-no-js">%1$s</span> <span class="hide-if-js">%2$s</span>', __( 'Quick Draft' ), __( 'Drafts' ) );
     53        wp_add_dashboard_widget( 'dashboard_quick_press', $quick_draft_title, 'wp_dashboard_quick_press' );
     54    }
    5355
    5456    // WordPress News
     
    312314?>
    313315
    314     <form name="post" action="<?php echo esc_url( admin_url( 'post.php' ) ); ?>" method="post" id="quick-press" class="initial-form">
     316    <form name="post" action="<?php echo esc_url( admin_url( 'post.php' ) ); ?>" method="post" id="quick-press" class="initial-form hide-if-no-js">
    315317
    316318        <?php if ( $error_msg ) : ?>
     
    356358        echo '<p class="view-all"><a href="' . esc_url( admin_url( 'edit.php?post_status=draft' ) ) . '">' . _x( 'View all', 'drafts' ) . "</a></p>\n";
    357359    }
    358     echo '<h4>' . __( 'Drafts' ) . "</h4>\n<ul>";
     360    echo '<h4 class="hide-if-no-js">' . __( 'Drafts' ) . "</h4>\n<ul>";
    359361
    360362    $drafts = array_slice( $drafts, 0, 3 );
     
    536538
    537539        if ( $posts->post_count > $args['display'] ) {
    538             echo '<small class="show-more"><a href="#">' . sprintf( __( 'See %s more&hellip;'), $posts->post_count - intval( $args['display'] ) ) . '</a></small>';
     540            echo '<small class="show-more hide-if-no-js"><a href="#">' . sprintf( __( 'See %s more&hellip;'), $posts->post_count - intval( $args['display'] ) ) . '</a></small>';
    539541        }
    540542
Note: See TracChangeset for help on using the changeset viewer.