Ticket #26614: 26614.2.patch
File 26614.2.patch, 2.7 KB (added by , 7 years ago) |
---|
-
wp-admin/css/dashboard.css
664 664 padding: 8px 12px 4px; 665 665 } 666 666 667 #future-posts .show-more,668 #published-posts .show-more {669 float: right;670 margin-right: 12px;671 }672 673 667 #future-posts ul, 674 668 #published-posts ul { 675 669 clear: both; -
wp-admin/includes/dashboard.php
530 530 echo '<div id="activity-widget">'; 531 531 532 532 $future_posts = wp_dashboard_recent_posts( array( 533 'display' => 2,534 533 'max' => 5, 535 534 'status' => 'future', 536 535 'order' => 'ASC', … … 538 537 'id' => 'future-posts', 539 538 ) ); 540 539 $recent_posts = wp_dashboard_recent_posts( array( 541 'display' => 2,542 540 'max' => 5, 543 541 'status' => 'publish', 544 542 'order' => 'DESC', … … 566 564 * @param array $args { 567 565 * An array of query and display arguments. 568 566 * 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. 571 568 * @type string $status Post status. 572 569 * @type string $order Designates ascending ('ASC') or descending ('DESC') order. 573 570 * @type string $title Section title. … … 591 588 592 589 echo '<div id="' . $args['id'] . '" class="activity-block">'; 593 590 594 if ( $posts->post_count > $args['display'] ) {595 echo '<small class="show-more hide-if-no-js"><a href="#">' . sprintf( __( 'See %s more…'), $posts->post_count - intval( $args['display'] ) ) . '</a></small>';596 }597 598 591 echo '<h4>' . $args['title'] . '</h4>'; 599 592 600 593 echo '<ul>'; … … 625 618 _draft_or_post_title() 626 619 ); 627 620 628 $hidden = $i >= $args['display'] ? ' class="hidden"' : ''; 629 echo "<li{$hidden}>$text</li>"; 630 $i++; 621 echo "<li>$text</li>"; 631 622 } 632 623 633 624 echo '</ul>'; -
wp-admin/js/dashboard.js
123 123 124 124 $( '.meta-box-sortables' ).sortable( 'option', 'containment', 'document' ); 125 125 126 // Activity Widget127 $( '.show-more a' ).on( 'click', function(e) {128 $( this ).fadeOut().closest('.activity-block').find( 'li.hidden' ).fadeIn().removeClass( 'hidden' );129 e.preventDefault();130 });131 132 126 function autoResizeTextarea() { 133 127 // Add a hidden div. We'll copy over the text from the textarea to measure its height. 134 128 $('body').append( '<div class="quick-draft-textarea-clone" style="display: none;"></div>' );