Skip to content
16 changes: 5 additions & 11 deletions src/js/_enqueues/wp/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,17 +165,11 @@ jQuery( function($) {
* @return {void}
*/
function highlightLatestPost () {
var latestPost = $( '.drafts ul li' ) .first(),
errorNotice = $( '#quick-press .notice-error' );

if ( errorNotice.length ) {
return;
}

latestPost.css( 'background', '#fffbe5' );
setTimeout( function () {
latestPost.css( 'background', 'none' );
}, 1000 );
var latestPost = $('.drafts ul li').first();
latestPost.addClass('is-highlighted');
setTimeout(function () {
latestPost.removeClass('is-highlighted');
}, 1000);
}
} );

Expand Down
9 changes: 9 additions & 0 deletions src/wp-admin/css/dashboard.css
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,15 @@ body #dashboard-widgets .postbox form .submit {

#dashboard_quick_press .drafts li {
margin-bottom: 1em;
padding: 0.5em;
margin-left: -0.5em;
margin-right: -0.5em;
transition: background-color 1s ease-out;
}

#dashboard_quick_press .drafts li.is-highlighted {
background-color: #cceebb;
transition: none;
}

#dashboard_quick_press .drafts li time {
Expand Down
Loading