[wp-trac] [WordPress Trac] #17276: custom post type problems needs addressed

WordPress Trac wp-trac at lists.automattic.com
Wed May 4 19:39:36 UTC 2011


#17276: custom post type problems needs addressed
-------------------------+------------------------------
 Reporter:  squeeky      |       Owner:  squeeky
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Post Types   |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  needs-patch  |
-------------------------+------------------------------

Comment (by squeeky):

 so i'm back enhancing some more widgets when i notice this.....

 RE: wp-includes/default-widgets.php

 in '''WP_Widget_Recent_Posts'''
 - ''' 'widget_recent_entries' '''only appears in 4 lines...

 line 513 :
 {{{
                 $widget_ops = array('classname' =>
 'widget_recent_entries', [ ... snip ... ]
 }}}

 line 515 :
 {{{
                 $this->alt_option_name = 'widget_recent_entries';
 }}}

 and line 568, line 569 :
 {{{
                 if ( isset($alloptions['widget_recent_entries']) )
                         delete_option('widget_recent_entries');
 }}}


 - and''' 'widget_recent_posts' '''only appears in 3 lines...

 line 523 :
 {{{
                 $cache = wp_cache_get('widget_recent_posts', 'widget');
 }}}

 line 558 :
 {{{
                 wp_cache_set('widget_recent_posts', $cache, 'widget');
 }}}

 line 575 :
 {{{
                 wp_cache_delete('widget_recent_posts', 'widget');
 }}}



 '''this is in direct contrast to WP_Widget_Recent_Comments'''
 - where all 7 appearances use the same''' 'widget_recent_comments' '''

 line 599 :
 {{{
                 $widget_ops = array('classname' =>
 'widget_recent_comments', [ ... snip ... ]
 }}}

 line 601 :
 {{{
                 $this->alt_option_name = 'widget_recent_comments';
 }}}

 line 620 :
 {{{
                 wp_cache_delete('widget_recent_comments', 'widget');
 }}}

 line 626 :
 {{{
                 $cache = wp_cache_get('widget_recent_comments', 'widget');
 }}}

 line 659 :
 {{{
                 wp_cache_set('widget_recent_comments', $cache, 'widget');
 }}}

 line 669, and line 670 :
 {{{
                 if ( isset($alloptions['widget_recent_comments']) )
                         delete_option('widget_recent_comments');
 }}}


 Just wondered if it SHOULD be that way, does not matter, or if it is a
 slip up

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


More information about the wp-trac mailing list