Make WordPress Core

Changeset 27583


Ignore:
Timestamp:
03/18/2014 12:55:42 PM (13 years ago)
Author:
johnbillion
Message:

Remove the "See more" toggle from the At a Glance dashboard widget. Fixes #26614.

Location:
trunk/src/wp-admin
Files:
3 edited

Legend:

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

    r27564 r27583  
    665665}
    666666
    667 #future-posts .show-more,
    668 #published-posts .show-more {
    669         float: right;
    670         margin-right: 12px;
    671 }
    672 
    673667#future-posts ul,
    674668#published-posts ul {
  • trunk/src/wp-admin/includes/dashboard.php

    r27563 r27583  
    531531
    532532        $future_posts = wp_dashboard_recent_posts( array(
    533                 'display' => 2,
    534533                'max'     => 5,
    535534                'status'  => 'future',
    … …  
    539538        ) );
    540539        $recent_posts = wp_dashboard_recent_posts( array(
    541                 'display' => 2,
    542540                'max'     => 5,
    543541                'status'  => 'publish',
    … …  
    567565 *     An array of query and display arguments.
    568566 *
    569  *     @type int    $display Number of posts to display.
    570  *     @type int    $max     Maximum number of posts to query.
     567 *     @type int    $max     Number of posts to display.
    571568 *     @type string $status  Post status.
    572569 *     @type string $order   Designates ascending ('ASC') or descending ('DESC') order.
    … …  
    592589                echo '<div id="' . $args['id'] . '" class="activity-block">';
    593590
    594                 if ( $posts->post_count > $args['display'] ) {
    595                         echo '<small class="show-more hide-if-no-js"><a href="#">' . sprintf( __( 'See %s more&hellip;'), $posts->post_count - intval( $args['display'] ) ) . '</a></small>';
    596                 }
    597 
    598591                echo '<h4>' . $args['title'] . '</h4>';
    599592
    … …  
    626619                        );
    627620
    628                         $hidden = $i >= $args['display'] ? ' class="hidden"' : '';
    629                         echo "<li{$hidden}>$text</li>";
    630                         $i++;
     621                        echo "<li>$text</li>";
    631622                }
    632623
  • trunk/src/wp-admin/js/dashboard.js

    r27021 r27583  
    124124        $( '.meta-box-sortables' ).sortable( 'option', 'containment', 'document' );
    125125
    126         // Activity Widget
    127         $( '.show-more a' ).on( 'click', function(e) {
    128                 $( this ).fadeOut().closest('.activity-block').find( 'li.hidden' ).fadeIn().removeClass( 'hidden' );
    129                 e.preventDefault();
    130         });
    131 
    132126        function autoResizeTextarea() {
    133127                // Add a hidden div. We'll copy over the text from the textarea to measure its height.
Note: See TracChangeset for help on using the changeset viewer.