Make WordPress Core

Opened 16 years ago

Closed 11 years ago

#12914 closed enhancement (invalid)

Update the Right Now box when publishing via QuickDraft

Reported by: nacin Owned by:
Priority: normal Milestone:
Component: Administration Version: 3.0
Severity: normal Keywords: has-patch
Cc: Focuses: ui

Description

When you publish a new post via QuickPress, it'd be cool for the Right Now box to then ++ the number of published posts.

Quick proof of concept patch attached.

Attachments (1)

12914.diff (1.4 KB ) - added by nacin 16 years ago.

Download all attachments as: .zip

Change History (8)

@nacin
16 years ago

#1 @nacin
16 years ago

Other thoughts:

  1. Updating the tags count would be cool too, but it'd require some more tricks and re-engineering.
  1. The selector I used in the POC patch for the actual '# Posts' link is janky. Additionally, someone without edit_posts wouldn't have a link there, so we would need to account for that. (But, someone without edit_posts wouldn't have QuickPress by default either...)

#2 @filosofo
16 years ago

There's already inline JavaScript in the markup printed by that widget. Why not add some more and have it update the post count with the actual number as determined by number_format_i18n()?

And may as well give those count wrappers some ids instead of a particular response message. Then it's really simple:

var pCount = document.getElementById('post-count-link');
if ( pCount ) 
   pCount.innerHTML = '<?php echo esc_js( number_format_i18n( wp_count_posts( 'post' ) ) ); ?>';

#3 @nacin
16 years ago

There's already inline JavaScript in the markup printed by that widget. Why not add some more and have it update the post count with the actual number as determined by number_format_i18n()?

Sounds like a good idea to me. And yeah, we'd need to supply an ID. Hence why I insulted my selector. (Patch was just a quick POC.)

#4 @nacin
16 years ago

  • Keywords has-patch needs-refresh added
  • Milestone Awaiting Triage3.1
  • Priority normallowest
  • Severity normaltrivial

Patch here, but it needs an update. Also if QuickPress is changed in the 3.1 cycle then we will need to take that/this into account.

#5 @jane
16 years ago

  • Milestone 3.1Future Release
  • Version3.0

Punting as we are entering beta. Can reconsider with 3.2 and updated patch.

#6 @sabreuse
14 years ago

  • Component UIAdministration
  • Keywords ui-focus added

#7 @chriscct7
11 years ago

  • Keywords needs-refresh removed
  • Milestone Future Release
  • Priority lowestnormal
  • Resolutioninvalid
  • Severity trivialnormal
  • Status newclosed
  • Summary Update the Right Now box when publishing via QuickPressUpdate the Right Now box when publishing via QuickDraft

This is now QuickDraft. As such the RightNow only counts published posts not draft ones. Therefore it works as intended now. Closing as invalid

Note: See TracTickets for help on using tickets.