[wp-trac] [WordPress Trac] #23930: Screen option for post formats UI

WordPress Trac noreply at wordpress.org
Wed Apr 3 21:05:54 UTC 2013


#23930: Screen option for post formats UI
-----------------------------+--------------------
 Reporter:  johnbillion      |       Owner:
     Type:  feature request  |      Status:  new
 Priority:  normal           |   Milestone:  3.6
Component:  Administration   |     Version:  trunk
 Severity:  normal           |  Resolution:
 Keywords:                   |
-----------------------------+--------------------
Changes (by nacin):

 * milestone:  Awaiting Review => 3.6


Comment:

 To check if there is a format in use, it's pretty easy: `if ( get_terms(
 'post_format', array( 'number' => 1 ) ) )`. Note that 'number' is a LIMIT.
 get_terms() also has a default hide_empty = true, to hide terms without
 any posts (based on the cached count). So if one term gets returned, we
 know at least one post has a format.

 We can also check if formats have ever been used, even for a second, even
 if no posts currently use them. Just set hide_empty = false.

 MarkJaquith seems to also be on the same page re: when to hide the UI by
 default, per IRC.

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


More information about the wp-trac mailing list