WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
This hook occurs 2 times in this file.
| Line | Code |
|---|---|
| 771 | case 'revision' : |
| 772 | if ( !current_user_can( 'delete_post', $post->ID ) ) |
| 773 | return; |
| 774 | $file = 'revision'; |
| 775 | $var = 'revision'; |
| 776 | $action = ''; |
| 777 | break; |
| 778 | default : |
| 779 | if ( !current_user_can( 'edit_post', $post->ID ) ) |
| 780 | return apply_filters( 'get_delete_post_link', '', $post->ID, $context );; |
| 781 | $file = 'post'; |
| 782 | $var = 'post'; |
| 783 | break; |
| 784 | endswitch; |
| 785 | |
| 786 | return apply_filters( 'get_delete_post_link', wp_nonce_url( admin_url("$file.php?{$action}$var=$post->ID"), "trash-{$file}_" . $post->ID ), $context ); |
| 787 | } |
| 788 | |
| 789 | /** |
| 790 | * Retrieve edit comment link. |
| 791 | * |
| 792 | * @since 2.3.0 |
| 793 | * |
| 794 | * @param int $comment_id Optional. Comment ID. |
| 795 | * @return string |