[wp-trac] [WordPress Trac] #4177: new conditional tag: has_excerpt

WordPress Trac wp-trac at lists.automattic.com
Sun Apr 22 01:42:13 GMT 2007


#4177: new conditional tag: has_excerpt
----------------------------+-----------------------------------------------
 Reporter:  FekketCantenel  |       Owner:  anonymous
     Type:  enhancement     |      Status:  new      
 Priority:  normal          |   Milestone:           
Component:  Template        |     Version:           
 Severity:  trivial         |    Keywords:           
----------------------------+-----------------------------------------------
 Here is a short suggestion for a new conditional tag in query.php. Before
 this is added, or in case it never is,
 [http://codex.wordpress.org/Conditional_Tags#Has_An_Excerpt I've added a
 short help to the Conditional Tags documentation].

 {{{
 function has_excerpt () {
         global $post;
         if (empty($post->post_excerpt)) { return false; }
         else { return true; }
 }
 }}}

 I know that this appears very simple, but PHP newbies (like myself)
 wouldn't think of it without help. The function it serves doesn't seem
 ''that'' obscure, so I hope it's worthy of inclusion.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/4177>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list