Make WordPress Core

Changeset 56623


Ignore:
Timestamp:
09/19/2023 05:03:23 PM (9 months ago)
Author:
joemcgill
Message:

Media: Edit new hook name in get_available_post_mime_types().

This is a follow-up to [56452] in which a new filter hook was added to get_available_post_mime_types() to override a potentially slow query. This renames the previous hook from get_available_post_mime_types to pre_get_available_post_mime_types for clarity.

Props rcorrales, emrikol, johnbillion, joemcgill, mukesh27.
Fixes #52759.

File:
1 edited

Legend:

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

    r56577 r56623  
    78897889     * @param string        $type       The post type name. Usually 'attachment' but can be any post type.
    78907890     */
    7891     $mime_types = apply_filters( 'get_available_post_mime_types', null, $type );
     7891    $mime_types = apply_filters( 'pre_get_available_post_mime_types', null, $type );
    78927892
    78937893    if ( ! is_array( $mime_types ) ) {
Note: See TracChangeset for help on using the changeset viewer.