edit_post_link WordPress Filter Hook

The edit_post_link hook is used to display an edit link for posts, pages, and custom post types. This hook can be used in conjunction with the get_edit_post_link function to check whether the current user has permission to edit the post.

apply_filters( 'edit_post_link', string $link, int $post_id, string $text ) #

Filters the post edit link anchor tag.


Parameters

$link

(string)Anchor tag for the edit link.

$post_id

(int)Post ID.

$text

(string)Anchor text.


Top ↑

Source

File: wp-includes/link-template.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
2.3.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More