Warning: This function has been deprecated.

image_attachment_fields_to_save() WordPress Function

The image_attachment_fields_to_save() function is used to add custom fields to an attachment page. This function gives you the ability to add custom fields to an attachment page, which can be used to store data related to the attachment.

image_attachment_fields_to_save( array $post, array $attachment ) #

Was used to filter input from media_upload_form_handler() and to assign a default post_title from the file name if none supplied.


Parameters

$post

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

$attachment

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


Top ↑

Return

(array) Attachment post object converted to an array.


Top ↑

Source

File: wp-admin/includes/deprecated.php

function image_attachment_fields_to_save( $post, $attachment ) {
	_deprecated_function( __FUNCTION__, '6.0.0' );

	return $post;
}


Top ↑

Changelog

Changelog
VersionDescription
6.0.0This function has been deprecated.
2.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More