Remove the "See more" toggle from the At a Glance dashboard widget. Fixes #26614.
Built from https://develop.svn.wordpress.org/trunk@27583 git-svn-id: http://core.svn.wordpress.org/trunk@27426 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
41c747f4c1
commit
181c2d091e
|
@ -664,12 +664,6 @@ form.initial-form.quickpress-open input#title {
|
||||||
padding: 8px 12px 4px;
|
padding: 8px 12px 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#future-posts .show-more,
|
|
||||||
#published-posts .show-more {
|
|
||||||
float: left;
|
|
||||||
margin-left: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#future-posts ul,
|
#future-posts ul,
|
||||||
#published-posts ul {
|
#published-posts ul {
|
||||||
clear: both;
|
clear: both;
|
||||||
|
|
|
@ -664,12 +664,6 @@ form.initial-form.quickpress-open input#title {
|
||||||
padding: 8px 12px 4px;
|
padding: 8px 12px 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#future-posts .show-more,
|
|
||||||
#published-posts .show-more {
|
|
||||||
float: right;
|
|
||||||
margin-right: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#future-posts ul,
|
#future-posts ul,
|
||||||
#published-posts ul {
|
#published-posts ul {
|
||||||
clear: both;
|
clear: both;
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -530,7 +530,6 @@ function wp_dashboard_site_activity() {
|
||||||
echo '<div id="activity-widget">';
|
echo '<div id="activity-widget">';
|
||||||
|
|
||||||
$future_posts = wp_dashboard_recent_posts( array(
|
$future_posts = wp_dashboard_recent_posts( array(
|
||||||
'display' => 2,
|
|
||||||
'max' => 5,
|
'max' => 5,
|
||||||
'status' => 'future',
|
'status' => 'future',
|
||||||
'order' => 'ASC',
|
'order' => 'ASC',
|
||||||
|
@ -538,7 +537,6 @@ function wp_dashboard_site_activity() {
|
||||||
'id' => 'future-posts',
|
'id' => 'future-posts',
|
||||||
) );
|
) );
|
||||||
$recent_posts = wp_dashboard_recent_posts( array(
|
$recent_posts = wp_dashboard_recent_posts( array(
|
||||||
'display' => 2,
|
|
||||||
'max' => 5,
|
'max' => 5,
|
||||||
'status' => 'publish',
|
'status' => 'publish',
|
||||||
'order' => 'DESC',
|
'order' => 'DESC',
|
||||||
|
@ -566,8 +564,7 @@ function wp_dashboard_site_activity() {
|
||||||
* @param array $args {
|
* @param array $args {
|
||||||
* An array of query and display arguments.
|
* An array of query and display arguments.
|
||||||
*
|
*
|
||||||
* @type int $display Number of posts to display.
|
* @type int $max Number of posts to display.
|
||||||
* @type int $max Maximum number of posts to query.
|
|
||||||
* @type string $status Post status.
|
* @type string $status Post status.
|
||||||
* @type string $order Designates ascending ('ASC') or descending ('DESC') order.
|
* @type string $order Designates ascending ('ASC') or descending ('DESC') order.
|
||||||
* @type string $title Section title.
|
* @type string $title Section title.
|
||||||
|
@ -591,10 +588,6 @@ function wp_dashboard_recent_posts( $args ) {
|
||||||
|
|
||||||
echo '<div id="' . $args['id'] . '" class="activity-block">';
|
echo '<div id="' . $args['id'] . '" class="activity-block">';
|
||||||
|
|
||||||
if ( $posts->post_count > $args['display'] ) {
|
|
||||||
echo '<small class="show-more hide-if-no-js"><a href="#">' . sprintf( __( 'See %s more…'), $posts->post_count - intval( $args['display'] ) ) . '</a></small>';
|
|
||||||
}
|
|
||||||
|
|
||||||
echo '<h4>' . $args['title'] . '</h4>';
|
echo '<h4>' . $args['title'] . '</h4>';
|
||||||
|
|
||||||
echo '<ul>';
|
echo '<ul>';
|
||||||
|
@ -625,9 +618,7 @@ function wp_dashboard_recent_posts( $args ) {
|
||||||
_draft_or_post_title()
|
_draft_or_post_title()
|
||||||
);
|
);
|
||||||
|
|
||||||
$hidden = $i >= $args['display'] ? ' class="hidden"' : '';
|
echo "<li>$text</li>";
|
||||||
echo "<li{$hidden}>$text</li>";
|
|
||||||
$i++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '</ul>';
|
echo '</ul>';
|
||||||
|
|
|
@ -123,12 +123,6 @@ jQuery(document).ready( function($) {
|
||||||
|
|
||||||
$( '.meta-box-sortables' ).sortable( 'option', 'containment', 'document' );
|
$( '.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() {
|
function autoResizeTextarea() {
|
||||||
// Add a hidden div. We'll copy over the text from the textarea to measure its height.
|
// Add a hidden div. We'll copy over the text from the textarea to measure its height.
|
||||||
$('body').append( '<div class="quick-draft-textarea-clone" style="display: none;"></div>' );
|
$('body').append( '<div class="quick-draft-textarea-clone" style="display: none;"></div>' );
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
var ajaxWidgets,ajaxPopulateWidgets,quickPressLoad;jQuery(document).ready(function(a){function b(){a("body").append('<div class="quick-draft-textarea-clone" style="display: none;"></div>');var b=a(".quick-draft-textarea-clone"),c=a("#content"),d=c.height(),e=a(window).height()-100;b.css({"font-family":c.css("font-family"),"font-size":c.css("font-size"),"line-height":c.css("line-height"),"padding-bottom":c.css("paddingBottom"),"padding-left":c.css("paddingLeft"),"padding-right":c.css("paddingRight"),"padding-top":c.css("paddingTop"),"white-space":"pre-wrap","word-wrap":"break-word",display:"none"}),c.on("focus input propertychange",function(){var f=a(this),g=f.val()+" ",h=b.css("width",f.css("width")).text(g).outerHeight()+2;c.css("overflow-y","auto"),h===d||h>=e&&d>=e||(d=h>e?e:h,c.css("overflow-y","hidden"),f.css("height",d+"px"))})}var c,d=a("#welcome-panel"),e=a("#wp_welcome_panel-hide");c=function(b){a.post(ajaxurl,{action:"update-welcome-panel",visible:b,welcomepanelnonce:a("#welcomepanelnonce").val()})},d.hasClass("hidden")&&e.prop("checked")&&d.removeClass("hidden"),a(".welcome-panel-close, .welcome-panel-dismiss a",d).click(function(b){b.preventDefault(),d.addClass("hidden"),c(0),a("#wp_welcome_panel-hide").prop("checked",!1)}),e.click(function(){d.toggleClass("hidden",!this.checked),c(this.checked?1:0)}),ajaxWidgets=["dashboard_primary"],ajaxPopulateWidgets=function(b){function c(b,c){var d,e=a("#"+c+" div.inside:visible").find(".widget-loading");e.length&&(d=e.parent(),setTimeout(function(){d.load(ajaxurl+"?action=dashboard-widgets&widget="+c+"&pagenow="+pagenow,"",function(){d.hide().slideDown("normal",function(){a(this).css("display","")})})},500*b))}b?(b=b.toString(),-1!==a.inArray(b,ajaxWidgets)&&c(0,b)):a.each(ajaxWidgets,c)},ajaxPopulateWidgets(),postboxes.add_postbox_toggles(pagenow,{pbshow:ajaxPopulateWidgets}),quickPressLoad=function(){var c,d=a("#quickpost-action");c=a("#quick-press").submit(function(){function b(){var b=a(".drafts ul li").first();b.css("background","#fffbe5"),setTimeout(function(){b.css("background","none")},1e3)}return a("#dashboard_quick_press #publishing-action .spinner").show(),a('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').prop("disabled",!0),a.post(c.attr("action"),c.serializeArray(),function(c){a("#dashboard_quick_press .inside").html(c),a("#quick-press").removeClass("initial-form"),quickPressLoad(),b(),a("#title").focus()}),!1}),a("#publish").click(function(){d.val("post-quickpress-publish")}),a("#title, #tags-input, #content").each(function(){var b=a(this),c=a("#"+this.id+"-prompt-text");""===this.value&&c.removeClass("screen-reader-text"),c.click(function(){a(this).addClass("screen-reader-text"),b.focus()}),b.blur(function(){""===this.value&&c.removeClass("screen-reader-text")}),b.focus(function(){c.addClass("screen-reader-text")})}),a("#quick-press").on("click focusin",function(){wpActiveEditor="content"}),b()},quickPressLoad(),a(".meta-box-sortables").sortable("option","containment","document"),a(".show-more a").on("click",function(b){a(this).fadeOut().closest(".activity-block").find("li.hidden").fadeIn().removeClass("hidden"),b.preventDefault()})});
|
var ajaxWidgets,ajaxPopulateWidgets,quickPressLoad;jQuery(document).ready(function(a){function b(){a("body").append('<div class="quick-draft-textarea-clone" style="display: none;"></div>');var b=a(".quick-draft-textarea-clone"),c=a("#content"),d=c.height(),e=a(window).height()-100;b.css({"font-family":c.css("font-family"),"font-size":c.css("font-size"),"line-height":c.css("line-height"),"padding-bottom":c.css("paddingBottom"),"padding-left":c.css("paddingLeft"),"padding-right":c.css("paddingRight"),"padding-top":c.css("paddingTop"),"white-space":"pre-wrap","word-wrap":"break-word",display:"none"}),c.on("focus input propertychange",function(){var f=a(this),g=f.val()+" ",h=b.css("width",f.css("width")).text(g).outerHeight()+2;c.css("overflow-y","auto"),h===d||h>=e&&d>=e||(d=h>e?e:h,c.css("overflow-y","hidden"),f.css("height",d+"px"))})}var c,d=a("#welcome-panel"),e=a("#wp_welcome_panel-hide");c=function(b){a.post(ajaxurl,{action:"update-welcome-panel",visible:b,welcomepanelnonce:a("#welcomepanelnonce").val()})},d.hasClass("hidden")&&e.prop("checked")&&d.removeClass("hidden"),a(".welcome-panel-close, .welcome-panel-dismiss a",d).click(function(b){b.preventDefault(),d.addClass("hidden"),c(0),a("#wp_welcome_panel-hide").prop("checked",!1)}),e.click(function(){d.toggleClass("hidden",!this.checked),c(this.checked?1:0)}),ajaxWidgets=["dashboard_primary"],ajaxPopulateWidgets=function(b){function c(b,c){var d,e=a("#"+c+" div.inside:visible").find(".widget-loading");e.length&&(d=e.parent(),setTimeout(function(){d.load(ajaxurl+"?action=dashboard-widgets&widget="+c+"&pagenow="+pagenow,"",function(){d.hide().slideDown("normal",function(){a(this).css("display","")})})},500*b))}b?(b=b.toString(),-1!==a.inArray(b,ajaxWidgets)&&c(0,b)):a.each(ajaxWidgets,c)},ajaxPopulateWidgets(),postboxes.add_postbox_toggles(pagenow,{pbshow:ajaxPopulateWidgets}),quickPressLoad=function(){var c,d=a("#quickpost-action");c=a("#quick-press").submit(function(){function b(){var b=a(".drafts ul li").first();b.css("background","#fffbe5"),setTimeout(function(){b.css("background","none")},1e3)}return a("#dashboard_quick_press #publishing-action .spinner").show(),a('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').prop("disabled",!0),a.post(c.attr("action"),c.serializeArray(),function(c){a("#dashboard_quick_press .inside").html(c),a("#quick-press").removeClass("initial-form"),quickPressLoad(),b(),a("#title").focus()}),!1}),a("#publish").click(function(){d.val("post-quickpress-publish")}),a("#title, #tags-input, #content").each(function(){var b=a(this),c=a("#"+this.id+"-prompt-text");""===this.value&&c.removeClass("screen-reader-text"),c.click(function(){a(this).addClass("screen-reader-text"),b.focus()}),b.blur(function(){""===this.value&&c.removeClass("screen-reader-text")}),b.focus(function(){c.addClass("screen-reader-text")})}),a("#quick-press").on("click focusin",function(){wpActiveEditor="content"}),b()},quickPressLoad(),a(".meta-box-sortables").sortable("option","containment","document")});
|
Loading…
Reference in New Issue