Codex

Template Tags/get edit post link

Contents

Description

Returns edit post url as string value.

Can be used within the WordPress loop or outside of it. Can be used with pages, posts, attachments, and revisions.

Usage

 <?php echo get_edit_post_link$id$context ); ?> 

Parameters

id
(integer) (optional) The post ID
Default: None
context
(string) (optional) default to display. How to write the '&', defaults to '&amp;'.

Possible values:
'display' => '&amp;'
          '' => '&'

Default: display

Return

admin_url() (string) 
admin_url() to edit the post or post_type.

Changelog

  • Since: 2.3.0

Source File

get_edit_post_link() is located in wp-includes/link-template.php

Related

Edit Link: edit_post_link(), edit_comment_link(), edit_tag_link(), edit_bookmark_link()

See also index of Function Reference and index of Template Tags.