[wp-trac] [WordPress Trac] #12914: Update the Right Now box when publishing via QuickPress

WordPress Trac wp-trac at lists.automattic.com
Thu Apr 8 08:44:18 UTC 2010


#12914: Update the Right Now box when publishing via QuickPress
-------------------------+--------------------------------------------------
 Reporter:  nacin        |       Owner:     
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  3.1
Component:  UI           |     Version:     
 Severity:  normal       |    Keywords:     
-------------------------+--------------------------------------------------

Comment(by filosofo):

 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' ) ) ); ?>';
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/12914#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list