时间:2024-03-12
WordPress函数wp_update_attachment_metadata用于更新附件Meta数据。
wp_update_attachment_metadata( int $attachment_id, array $data )
$attachment_id
整数
附件的ID
$data
数组
附件Meta数据
$attach_data = wp_generate_attachment_metadata($attachment_id, $file); wp_update_attachment_metadata($attachment_id, $attach_data);
wp_update_attachment_metadata()函数位于:wp-includes/post.php
相关函数:
wp_update_image_subsizes()
wp_create_image_subsizes()
update_post_meta()
delete_post_meta()
Copyright © 2019-2024 liangfang.net