[wp-trac] [WordPress Trac] #27137: Remove required user context from `get_edit_post_link()`

WordPress Trac noreply at wordpress.org
Thu May 8 13:59:25 UTC 2014


#27137: Remove required user context from `get_edit_post_link()`
-------------------------------+-----------------------
 Reporter:  danielbachhuber    |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  low                |   Milestone:  4.0
Component:  Posts, Post Types  |     Version:
 Severity:  minor              |  Resolution:
 Keywords:  has-patch commit   |     Focuses:  template
-------------------------------+-----------------------
Changes (by danielbachhuber):

 * keywords:  has-patch dev-feedback => has-patch commit


Comment:

 Replying to [comment:3 knutsp]:
 > This would be ok, as long as the behaviour of `edit_post_link()` is not
 changed. But, looking at wp-includes/link-template.php, it seems the
 capabilities check is only done in `get_edit_post_link()`.
 >
 > Unless the capabilities check is moved over to `edit_post_link()` this
 change will pollute sites with unnecessary Edit links, even for anonymous
 users.
 >
 > Or am I missing something?

 You are correct. I've updated the patch to move the capability check from
 `get_edit_post_link()` to `edit_post_link()`

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


More information about the wp-trac mailing list