Switch language

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




wp_ajax_trash_post [ WordPress Function ]

wp_ajax_trash_post ( $action )
Defined at:



No description yet.

Source


<?php
function wp_ajax_trash_post$action ) {
    
$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 ( 
'trash-post' == $action )
        
$done wp_trash_post$id );
    else
        
$done wp_untrash_post$id );

    if ( 
$done )
        
wp_die);

    
wp_die);
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



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