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

WordPress Trac wp-trac at lists.automattic.com
Thu May 5 02:34:04 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):

 hmmm --- did you see my examples ? did you test my examples ?

 the latest examples ? > in cpt-tax-widgets.php

 NO new flag in register_post_type() is needed / at least not in my
 examples...

 - each widget simply runs a SIMPLE test to see if, depending on widget's
 function, any custom post types''' ''OR'' '''custom taxonomies are
 registered

 - if custom post types''' ''OR'' '''custom taxonomies are registered, an
 '''OPTION''' is provided to use the widget for such (where widget's
 current default functionality is also OPTION'S default)

 - if '''NO''' custom post types''' ''OR'' '''custom taxonomies are
 registered, widget acts exactly as it does in default mode / as they do
 now

 no flag needed in register_post_type() - this added functionality is
 provided with only a few lines of code '''AND''' NEVER gets in the way of
 widget's default operations

 ----

 '''Custom Post Types and Taxonomy Widgets''' : '''cpt-tax-widgets'''

 http://mywebwizards.com/wp-content/uploads/2011/05/cpt-tax-widgets.zip

 you should give it a spin > i've changed the naming conventions so it does
 not interfere with the default widgets.

 ----

 I'm ''not'' saying such would ''not'' be better to introduced a new flag
 for widgets to register_post_type(), something like 'show_in_widgets' /
 that's up to you - i'm just saying my examples fully illustrate how you do
 ''NOT'' HAVE TO introduce a new flag like that...

 I actually think for some things i have in mind perhaps a new
 argument/flag might be the way to go / but not necessarily for widgets

 but for widget enhancements, i think the most involved would be Archives
 and Calendar - i believe the functions they call would need modifications
 to optionally handle custom post types

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


More information about the wp-trac mailing list