WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#30563 closed enhancement (fixed)

Add more freedom to edit_post_link

Reported by: alexmoss Owned by: wonderboymusic
Milestone: 4.4 Priority: normal
Severity: normal Version: 2.3
Component: Posts, Post Types Keywords: has-patch needs-docs
Focuses: template Cc:

Description

Please refer to this post to see what is currently available:
http://www.designnode.co.uk/blog/wordpress-manipulate-edit_post_link/

I don't want to use str_replace to do what I need, but would be great if we can edit:

Button text
String before
String after
CSS classes

Attachments (2)

30563.diff (1017 bytes) - added by voldemortensen 5 years ago.
30563.2.diff (974 bytes) - added by wonderboymusic 4 years ago.

Download all attachments as: .zip

Change History (12)

@voldemortensen
5 years ago

#1 @voldemortensen
5 years ago

  • Keywords has-patch added

Add ability to add custom class to edit_post_link

#2 @helen
5 years ago

  • Version changed from trunk to 2.3

#3 @SergeyBiryukov
5 years ago

  • Component changed from General to Posts, Post Types
  • Focuses template added

#4 @wonderboymusic
4 years ago

  • Milestone changed from Awaiting Review to 4.4

#5 @wonderboymusic
4 years ago

  • Owner set to wonderboymusic
  • Resolution set to fixed
  • Status changed from new to closed

In 34098:

In edit_post_link(), add an argument for the class attribute that defaults to post-edit-link.

Props voldemortensen.
Fixes #30563.

#6 @DrewAPicture
4 years ago

  • Keywords needs-docs added
  • Resolution fixed deleted
  • Status changed from closed to reopened

The new argument introduced in [34098] needs a changelog entry for 4.4.0.

#7 @SergeyBiryukov
4 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 34115:

Docs: Add a changelog entry for the $class argument added to edit_post_link() in [34098].

Fixes #30563.

#8 @Offereins
4 years ago

What about attribute escaping? Or doesn't it count here?

#9 @SergeyBiryukov
4 years ago

In 34117:

Escape class attribute in edit_post_link() after [34098].

Props Offereins.
See #30563.

#10 @SergeyBiryukov
4 years ago

#34076 was marked as a duplicate.

Note: See TracTickets for help on using tickets.