首页 WordPress函数大全 image_attachment_fields_to_save()

image_attachment_fields_to_save()

2020-05-02 / 2396阅 / 悠然

如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款

image_attachment_fields_to_save( array $post, array $attachment )

Filters input from media_upload_form_handler() and assigns a default post_title from the file name if none supplied.

描述

Illustrates the use of the ‘attachment_fields_to_save’ filter which can be used to add default values to any field before saving to DB.

参数

$post

(array)
(Required)
The WP_Post attachment object converted to an array.

$attachment

(array)
(Required)
An array of attachment metadata.

返回

(array) Filtered attachment post object.

大家谈论
    我的见解