ΪÖ÷ÌâÌí¼Óǰ̨ɾ³ýÎÄÕ¼°ÆÀÂÛ¹¦ÄÜ
Ò»°ãÇé¿öÏÂÎÒÃǶ¼ÊǵǼºǫ́½øÐÐÎÄÕ¼°ÆÀÂÛ¹ÜÀí£¬ÈçÄÜǰ̨ʵÏÖ¹ÜÀíÎÄÕ£¬ÌرðÊÇǰ̨ɾ³ýÀ¬»øÁôÑÔ£¬ÊDz»ÊǺܷ½±ã¡£ÊµÏÖ·½·¨ºÜ¼òµ¥£¬°ÑÏÂÃæÁ½¶Î´úÂë¼Óµ½Ö÷ÌâÄ£°åµÄÊʵ±Î»Öü´¿É¡£
ǰ̨ɾ³ýÎÄÕÂ
Ô´úÂëÀ´×Ô£ºhttp://wp-snippets.com/delete-post-from-front-end/
ÔËÐÐÔ´úÂëºó£¬·¢ÏÖµã»÷“Delete post”Ö»»áתµ½Ò»¸ö¾¯¸æÒ³Ã棬²¢ÇÒ²»»áɾ³ýÈÕÖ¾£¬ÉÔ΢¸Ä¶¯ÁËһϡ£
Ð޸ĺóµÄ£º
$url = get_bloginfo('url');
if (current_user_can('edit_post', $post->ID)){
echo 'ID);
echo '">Delete post';
}
?>
ǰ̨ɾ³ýÆÀÂÛ
Ô´úÂëÀ´×Ô£ºhttp://www.ninthday.net/2011/08/magement-comments-front.html
Ô´úÂëÐèÊÖ¶¯Ð޸IJ©¿ÍURLµØÖ·£¬²¢ÐèҪȷÈϺ󷽿Éɾ³ýÆÀÂÛ£¬Ð޸ĺóµÄ£º
if (is_user_logged_in() ) {
$url = get_bloginfo('url');
echo 'comment_post_ID . '&c='. $comment->comment_ID, 'delete-comment_'. $comment->comment_ID). '"">Delete';
}
?>
HotNewsÖ÷Ì⽫ÉÏÊö´úÂë¼Óµ½functions.phpÄ£°æ£º
ÍƼöÐÅÏ¢
- ¹¹½¨¸ß¿ÉÓú͵¯ÐÔÉìËõµÄKV´æ´¢ÏµÍ³
- ̸̸ÍøÕ¾¾²Ì¬»¯£¨¶þ£©
- ̸̸ÍøÕ¾¾²Ì¬»¯£¨Ò»£©
- Ðì¹úÏ飺΢²©ÊÇ·ñ»á²ÎÓëÍøÕ¾ÅÅÃû
- ApacheÔÚ±¾µØ½¨Á¢·ºÓòÃûÐéÄâÖ÷»ú¼ò·¨
- ÈçºÎ½øÐÐÍøÕ¾Õï¶Ï ΪÍøÕ¾½øÐÐÆÀ·Ö
- Ò»¸ö³É¹¦µÄÕ¾³¤Ó¦¸Ã¾ß±¸µÄËØÖÊ
- Ò»Ìõ΢²©Òý·¢µÄ·ÖÎö£ºÈçºÎÈÃ΢²©µÃµ½¹ã·º´«²¥
- ÈçºÎÈÃÒ»¸öÍøÕ¾ÓÐÇ¿´óÉúÃüÁ¦
- פ×ãIDCÃż÷³Ö±Ò¹ÛÍû Õ¾³¤Ñ¡¹º¿Õ¼ä³É¡°¼èÄѵľö¶¨¡±£¿
ÈÈÃÅÐÅÏ¢
- nohup: redirecting stderr to stdou....
- ʹÓÃlog_formatΪNginx·þÎñÆ÷ÉèÖøüÏêϸµÄÈÕÖ¾¸ñʽ
- jquery easyUI--dataGrid-Json
- [Ô´´]·ÂGoogle Reader¡¢ÐÂÀË΢²©¡¢ÌÚѶ΢²©µ....
- ÀûÓÃKeepalived+mysql¹¹½¨¸ß¿ÉÓÃMySQLË«Ö÷×Ô¶....
- Nginx+keepalivedʵÏÖ¸ºÔؾùºâºÍË«»úÈȱ¸¸ß¿ÉÓÃ
- jqueryʵÏÖÒ³Ãæ¼ÓÔؽø¶ÈÌõ
- Rolling cURL: PHP²¢·¢×î¼Ñʵ¼ù
- codeigniter ·ÓÉÖÕ¼«ÓÅ»¯(url rewrite)
- linuxÏÂÉèÖÃsshÎÞÃÜÂëµÇ¼
ÆÀÂÛ