[wp-trac] [WordPress Trac] #35487: Update has_excerpt()

WordPress Trac noreply at wordpress.org
Sat Jan 16 10:16:52 UTC 2016


#35487: Update has_excerpt()
-------------------------------+------------------------------
 Reporter:  sebastian.pisula   |       Owner:
     Type:  enhancement        |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Posts, Post Types  |     Version:
 Severity:  normal             |  Resolution:
 Keywords:                     |     Focuses:
-------------------------------+------------------------------
Changes (by sebastian.pisula):

 * keywords:  close =>


Comment:

 Replying to [comment:1 swissspidy]:
 > Hmm this could lead to false positives where the excerpt has been
 filtered or when it is a private post.
 >
 > For example, `get_the_excerpt()` returns `'There is no excerpt because
 this is a protected post.'` for private posts, but `has_excerpt()` returns
 `false`. With this patch, it would return `true`.
 >
 > Sounds like a wontfix because of BC issues.

 I think that this work good. Because for private post the excerpt is
 `'There is no excerpt because this is a protected post.'`. Maybe add new
 param - `$private_excerpt = true` and in has_exceprt function `
 get_the_excerpt($post_id, false)` ? Example in patch.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35487#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list