From d91dd88edcd8a27ad7043220fc1aa3ca8cdbe68a Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Tue, 18 Mar 2014 12:55:42 +0000 Subject: [PATCH] Remove the "See more" toggle from the At a Glance dashboard widget. Fixes #26614. git-svn-id: https://develop.svn.wordpress.org/trunk@27583 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/css/dashboard.css | 6 ------ src/wp-admin/includes/dashboard.php | 13 ++----------- src/wp-admin/js/dashboard.js | 6 ------ 3 files changed, 2 insertions(+), 23 deletions(-) diff --git a/src/wp-admin/css/dashboard.css b/src/wp-admin/css/dashboard.css index 866793a0ed..612c45e30b 100644 --- a/src/wp-admin/css/dashboard.css +++ b/src/wp-admin/css/dashboard.css @@ -664,12 +664,6 @@ form.initial-form.quickpress-open input#title { padding: 8px 12px 4px; } -#future-posts .show-more, -#published-posts .show-more { - float: right; - margin-right: 12px; -} - #future-posts ul, #published-posts ul { clear: both; diff --git a/src/wp-admin/includes/dashboard.php b/src/wp-admin/includes/dashboard.php index ebafa393ce..0586299d03 100644 --- a/src/wp-admin/includes/dashboard.php +++ b/src/wp-admin/includes/dashboard.php @@ -530,7 +530,6 @@ function wp_dashboard_site_activity() { echo '
'; $future_posts = wp_dashboard_recent_posts( array( - 'display' => 2, 'max' => 5, 'status' => 'future', 'order' => 'ASC', @@ -538,7 +537,6 @@ function wp_dashboard_site_activity() { 'id' => 'future-posts', ) ); $recent_posts = wp_dashboard_recent_posts( array( - 'display' => 2, 'max' => 5, 'status' => 'publish', 'order' => 'DESC', @@ -566,8 +564,7 @@ function wp_dashboard_site_activity() { * @param array $args { * An array of query and display arguments. * - * @type int $display Number of posts to display. - * @type int $max Maximum number of posts to query. + * @type int $max Number of posts to display. * @type string $status Post status. * @type string $order Designates ascending ('ASC') or descending ('DESC') order. * @type string $title Section title. @@ -591,10 +588,6 @@ function wp_dashboard_recent_posts( $args ) { echo '
'; - if ( $posts->post_count > $args['display'] ) { - echo '' . sprintf( __( 'See %s more…'), $posts->post_count - intval( $args['display'] ) ) . ''; - } - echo '

' . $args['title'] . '

'; echo '
    '; @@ -625,9 +618,7 @@ function wp_dashboard_recent_posts( $args ) { _draft_or_post_title() ); - $hidden = $i >= $args['display'] ? ' class="hidden"' : ''; - echo "$text"; - $i++; + echo "
  • $text
  • "; } echo '
'; diff --git a/src/wp-admin/js/dashboard.js b/src/wp-admin/js/dashboard.js index 4d4eb50d0c..47bc4481d2 100644 --- a/src/wp-admin/js/dashboard.js +++ b/src/wp-admin/js/dashboard.js @@ -123,12 +123,6 @@ jQuery(document).ready( function($) { $( '.meta-box-sortables' ).sortable( 'option', 'containment', 'document' ); - // Activity Widget - $( '.show-more a' ).on( 'click', function(e) { - $( this ).fadeOut().closest('.activity-block').find( 'li.hidden' ).fadeIn().removeClass( 'hidden' ); - e.preventDefault(); - }); - function autoResizeTextarea() { // Add a hidden div. We'll copy over the text from the textarea to measure its height. $('body').append( '' );