Make WordPress Core


Ignore:
Timestamp:
04/20/2022 08:11:34 AM (23 months ago)
Author:
audrasjb
Message:

Media: Remove attachment_fields_to_save filter and deprecate image_attachment_fields_to_save().

This filter prevented removing attachment titles. This changeset removes the filter and deprecates the related function since it is no longer used.

Props dromero20, desrosj, Junaidkbr, francina, antpb, audrasjb, aadilali, etaproducto, azouamauriac, Boniu91, SergeyBiryukov.
Fixes #39108.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/deprecated.php

    r53216 r53228  
    15681568    _deprecated_function( __FUNCTION__, '5.3.0' );
    15691569}
     1570
     1571/**
     1572 * Was used to filter input from media_upload_form_handler() and to assign a default
     1573 * post_title from the file name if none supplied.
     1574 *
     1575 * @since 2.5.0
     1576 * @deprecated 6.0.0
     1577 *
     1578 * @param array $post       The WP_Post attachment object converted to an array.
     1579 * @param array $attachment An array of attachment metadata.
     1580 * @return array Attachment post object converted to an array.
     1581 */
     1582function image_attachment_fields_to_save( $post, $attachment ) {
     1583    _deprecated_function( __FUNCTION__, '6.0.0' );
     1584
     1585    return $post;
     1586}
Note: See TracChangeset for help on using the changeset viewer.