Switch language

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




wp_ajax_set_post_thumbnail [ WordPress Function ]

wp_ajax_set_post_thumbnail ( No parameters )
Defined at:



No description yet.

Source


<?php
function wp_ajax_set_post_thumbnail() {
    
$post_ID intval$_POST['post_id'] );
    if ( !
current_user_can'edit_post'$post_ID ) )
        
wp_die( -);
    
$thumbnail_id intval$_POST['thumbnail_id'] );

    
check_ajax_referer"set_post_thumbnail-$post_ID);

    if ( 
$thumbnail_id == '-1' ) {
        if ( 
delete_post_thumbnail$post_ID ) )
            
wp_die_wp_post_thumbnail_htmlnull$post_ID ) );
        else
            
wp_die);
    }

    if ( 
set_post_thumbnail$post_ID$thumbnail_id ) )
        
wp_die_wp_post_thumbnail_html$thumbnail_id$post_ID ) );
    
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