edit_post_link

Advertisement

Summery Summery

Displays the edit post link for post.

Syntax Syntax

edit_post_link( string $text = null, string $before = '', string $after = '', int|WP_Post $id, string $class = 'post-edit-link' )

Parameters Parameters

$text

(string) (Optional) Anchor text. If null, default is 'Edit This'.

Default value: null

$before

(string) (Optional) Display before edit link.

Default value: ''

$after

(string) (Optional) Display after edit link.

Default value: ''

$id

(int|WP_Post) (Optional) Post ID or post object. Default is the global $post.

$class

(string) (Optional) Add custom class to link.

Default value: 'post-edit-link'

Source Source

File: wp-includes/link-template.php


			

Advertisement

Changelog Changelog

Changelog
Version Description
4.4.0 The $class argument was added.
1.0.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.