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 ) {
    if ( empty( 
$action ) )
        
$action 'trash-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 ( 
'trash-post' == $action )
        
$done wp_trash_post$id );
    else
        
$done wp_untrash_post$id );

    if ( 
$done )
        
wp_die);

    
wp_die);
}
?>

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

Kullanýcý Tartýþmalarý [ wordpress.org ]

- Bulunamadý -

Yeni bir konu yaz ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



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