get_delete_post_link [ WordPress Function ]
get_delete_post_link ( $id = 0, $deprecated = '', $force_delete = false )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Benzer Fonksiyonlar: get_edit_post_link, get_next_posts_link, edit_post_link, get_adjacent_post_rel_link, get_parent_post_rel_link
Retrieve delete posts link for post.
Can be used within the WordPress loop or outside of it, with any post type.
Source
<?php
function get_delete_post_link( $id = 0, $deprecated = '', $force_delete = false ) {
if ( ! empty( $deprecated ) )
_deprecated_argument( __FUNCTION__, '3.0' );
if ( !$post = &get_post( $id ) )
return;
$post_type_object = get_post_type_object( $post->post_type );
if ( !$post_type_object )
return;
if ( !current_user_can( $post_type_object->cap->delete_post, $post->ID ) )
return;
$action = ( $force_delete || !EMPTY_TRASH_DAYS ) ? 'delete' : 'trash';
$delete_link = add_query_arg( 'action', $action, admin_url( sprintf( $post_type_object->_edit_link, $post->ID ) ) );
return apply_filters( 'get_delete_post_link', wp_nonce_url( $delete_link, "$action-{$post->post_type}_{$post->ID}" ), $post->ID, $force_delete );
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- Function Reference/get delete post link « WordPress Codex
Description. Returns URL to move a post to the trash as string value. Can be used within the WordPress loop or outside of it. Can be used with pages, posts, ...
codex.wordpress.org - get_delete_post_link Wordpress hook details -- Adam Brown, BYU ...
WordPress version history for get_delete_post_link ... We find related hooks using word stems. get_delete_post_link has 3 significant word stem(s): delete , post ...
adambrown.info - get_delete_post_link | A HitchHackers guide through WordPress
Feb 12, 2011 ... function get_delete_post_link( $id = 0, $deprecated = '', $force_delete = false ) { if ( ! empty( $deprecated ) ) _deprecated_argument( ...
hitchhackerguide.com - filters - Custom Post Row Actions - WordPress
Feb 3, 2011 ... I figured out that you use the get_delete_post_link filter to create a new url for my actions (or a similar function -- In any case, I'm using that one ...
wordpress.stackexchange.com