Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




wp_ajax_delete_post [ WordPress Function ]

wp_ajax_delete_post ( $action )
Defined at:



No description yet.

Source


<?php
function wp_ajax_delete_post$action ) {
    if ( empty( 
$action ) )
        
$action 'delete-post';
    
$id = isset( $_POST['id'] ) ? (int) $_POST['id'] : 0;

    
check_ajax_referer"{$action}_$id);
    if ( !
current_user_can'delete_post'$id ) )
        
wp_die( -);

    if ( !
get_post$id ) )
        
wp_die);

    if ( 
wp_delete_post$id ) )
        
wp_die);
    else
        
wp_die);
}
?>

Examples [ wp-snippets.com ]

Top Google Search Results

More ...

User discussions [ wordpress.org ]

0 User Note(s)

None yet. Be the first!

Add New ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics