WordPress开发者和主题制作者的搜索引擎



delete_post_meta_by_key ›

Since2.3.0
已弃用n/a
delete_post_meta_by_key ( $post_meta_key )
参数:
  • (string) $post_meta_key Key to search for when deleting.
    Required: Yes
返回:
  • (bool) Whether the post meta key was deleted from the database.
定义在:
文档:

Deletes everything from post meta matching the given meta key.



源码

function delete_post_meta_by_key( $post_meta_key ) {
	return delete_metadata( 'post', null, $post_meta_key, '', true );
}