get_edit_post_link
Filter HookDescription
Filters the post edit link.Hook Information
File Location |
wp-includes/link-template.php
View on GitHub
|
Hook Type | Filter |
Line Number | 1499 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$link
|
The edit link. |
int
|
$post_id
|
Post ID. |
string
|
$context
|
The link context. If set to 'display' then ampersands are encoded. |
Usage Examples
Basic Usage
<?php
// Hook into get_edit_post_link
add_filter('get_edit_post_link', 'my_custom_filter', 10, 3);
function my_custom_filter($link, $post_id, $context) {
// Your custom filtering logic here
return $link;
}
Source Code Context
wp-includes/link-template.php:1499
- How this hook is used in WordPress core
<?php
1494 * @param string $link The edit link.
1495 * @param int $post_id Post ID.
1496 * @param string $context The link context. If set to 'display' then ampersands
1497 * are encoded.
1498 */
1499 return apply_filters( 'get_edit_post_link', $link, $post->ID, $context );
1500 }
1501
1502 /**
1503 * Displays the edit post link for post.
1504 *
PHP Documentation
<?php
/**
* Filters the post edit link.
*
* @since 2.3.0
*
* @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.
*/
Quick Info
- Hook Type: Filter
- Parameters: 3
- File: wp-includes/link-template.php
Related Hooks
Related hooks will be displayed here in future updates.