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

来自站长百科
跳转至: 导航、​ 搜索
(新页面: ==Description== This function deletes an attachment ==Usage== %%% <?php wp_delete_attachment( $postid ); ?> %%% ==Example== To delete an attachment with an ID of '76': <?php delete_post...)
 
无编辑摘要
第1行: 第1行:
==Description==
==Description==
==描述==
This function deletes an attachment
This function deletes an attachment
这个函数删除配属
==Usage==
==Usage==
==用法==
%%% <?php wp_delete_attachment( $postid ); ?> %%%
%%% <?php wp_delete_attachment( $postid ); ?> %%%
%%% <?php wp_delete_attachment( $postid ); ?> %%%


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


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




==Related==
==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月19日 (六) 14:43的版本

Description

描述

This function deletes an attachment 这个函数删除配属

Usage

用法

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

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

Example

例子

To delete an attachment with an ID of '76': 删除ID是'76'的配属:

<?php delete_post_meta( 76 ); ?>

<?php delete_post_meta( 76 ); ?>

Parameters

参数

Related

相关的

wp_get_attachment_url() wp_get_attachment_url()