edit_post_link( string $text = null, string $before = '', string $after = '', int|WP_Post $post, string $css_class = 'post-edit-link' )
Displays the edit post link for post.
Parameters
- $text
-
(Optional) Anchor text. If null, default is 'Edit This'.
Default value: null
- $before
-
(Optional) Display before edit link.
Default value: ''
- $after
-
(Optional) Display after edit link.
Default value: ''
- $post
-
(Optional) Post ID or post object. Default is the global
$post
. - $css_class
-
(Optional) Add custom class to link. Default 'post-edit-link'.
Default value: 'post-edit-link'
Source
File: wp-includes/link-template.php
Changelog
Version | Description |
---|---|
4.4.0 | The $css_class argument was added. |
1.0.0 | Introduced. |