WPDev.one
Core Function
View Source on Trac ↗

get_edit_post_link()

get_edit_post_link( mixed $post = 0, mixed $context = 'display' )

Retrieves the edit post link for post.

Parameters 1 required

Name / Type Description
(int

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

Required
$context
string

Optional. How to output the '&' character. Default '&'.

Return Value

((string)
(string | null) The edit post link for the given post. Null if the post type does not exist or does not allow an editing UI.

Function Information

Since Version
2.3.0
Source File
wp-includes/link-template.php
Advertisement