[wp-trac] [WordPress Trac] #12702: Enable sticky post checkbox for custom post type Publish metabox

WordPress Trac wp-trac at lists.automattic.com
Tue Jul 13 23:40:36 UTC 2010


#12702: Enable sticky post checkbox for custom post type Publish metabox
-----------------------------+----------------------------------------------
 Reporter:  phlux0r          |       Owner:                
     Type:  feature request  |      Status:  new           
 Priority:  normal           |   Milestone:  Future Release
Component:  Post Types       |     Version:                
 Severity:  normal           |    Keywords:  needs-patch   
-----------------------------+----------------------------------------------

Comment(by dd32):

 > For each custom_post_type there will be a additional
 sticky_{custom_post_type} option.

 In doing so, you've bypassed the problem of

 > I think implementing this might cause some themes or widgets to get a
 little weird. Some themes grab get_option('sticky_posts') and send that
 right into a query via post__in, which means they might end up with posts
 of custom post types all of a sudden

 If a theme wants to display a list of sticky posts in all post types, then
 it's simple to array_merge() them all, or if a plugin wants their sticky
 posts to show in the list of sticky posts on the front end, its a simple
 filter addition {{{(if !is_admin(), add filter for
 pre_get_option_sticky_posts, array_merge in get_option('sticky_issues');
 )}}}, ie. Leave it up to the plugin to deal with that side of things..

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


More information about the wp-trac mailing list