WordPress: Function Reference/wp delete attachment:修订间差异

来自站长百科
跳转至: 导航、​ 搜索
无编辑摘要
无编辑摘要
 
第1行: 第1行:
==Description==
==描述==
==描述==


This function deletes an attachment
这个函数删除配属
这个函数删除配属
==Usage==
==用法==
==用法==


%%% <?php wp_delete_attachment( $postid ); ?> %%%
%%% <?php wp_delete_attachment( $postid ); ?> %%%
%%% <?php wp_delete_attachment( $postid ); ?> %%%
==Example==
==例子==
==例子==


To delete an attachment with an ID of '76':
删除ID是'76'的配属:
删除ID是'76'的配属:
<?php delete_post_meta( 76 ); ?>


<?php delete_post_meta( 76 ); ?>
<?php delete_post_meta( 76 ); ?>
==Parameters==


==参数==
==参数==
{{Parameter|$postid|integer|The ID of the attachment you would like to delete.}}
{{Parameter|$postid|integer|你想要删除的配属的ID。}}
{{Parameter|$postid|integer|你想要删除的配属的ID。}}
==Related==


==相关的==
==相关的==


[[WordPress:Function Reference/wp get attachment url|wp_get_attachment_url()]]
[[WordPress:Function Reference/wp get attachment url|wp_get_attachment_url()]]
[[WordPress:Function Reference/wp get attachment url|wp_get_attachment_url()]]

2008年7月24日 (四) 16:14的最新版本

描述[ ]

这个函数删除配属

用法[ ]

%%% <?php wp_delete_attachment( $postid ); ?> %%%

例子[ ]

删除ID是'76'的配属:

<?php delete_post_meta( 76 ); ?>

参数[ ]

相关的[ ]

wp_get_attachment_url()