get_edit_post_link filter-hookWP 2.3.0

Filters the post edit link.

Usage

add_filter( 'get_edit_post_link', 'wp_kama_get_edit_post_link_filter', 10, 3 );

/**
 * Function for `get_edit_post_link` filter-hook.
 * 
 * @param string $link    The edit link.
 * @param int    $post_id Post ID.
 * @param string $context The link context. If set to 'display' then ampersands are encoded.
 *
 * @return string
 */
function wp_kama_get_edit_post_link_filter( $link, $post_id, $context ){

	// filter...
	return $link;
}
$link(string)
The edit link.
$post_id(int)
Post ID.
$context(string)
The link context. If set to 'display' then ampersands are encoded.

Changelog

Since 2.3.0 Introduced.

Where the hook is called

get_edit_post_link()
get_edit_post_link
wp-includes/link-template.php 1483
return apply_filters( 'get_edit_post_link', $link, $post->ID, $context );

Where the hook is used in WordPress

wp-includes/class-wp-customize-manager.php 1935
add_filter( 'get_edit_post_link', '__return_empty_string' );