From 0475a61f8a44f7f4081a008fe49383ff88b07b24 Mon Sep 17 00:00:00 2001 From: Joe McGill Date: Tue, 19 Sep 2023 17:05:21 +0000 Subject: [PATCH] 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. Built from https://develop.svn.wordpress.org/trunk@56623 git-svn-id: http://core.svn.wordpress.org/trunk@56135 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index 7100e7c3ac..696e74ed2c 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -7888,7 +7888,7 @@ function get_available_post_mime_types( $type = 'attachment' ) { * @param string[]|null $mime_types An array of MIME types. Default null. * @param string $type The post type name. Usually 'attachment' but can be any post type. */ - $mime_types = apply_filters( 'get_available_post_mime_types', null, $type ); + $mime_types = apply_filters( 'pre_get_available_post_mime_types', null, $type ); if ( ! is_array( $mime_types ) ) { $mime_types = $wpdb->get_col( $wpdb->prepare( "SELECT DISTINCT post_mime_type FROM $wpdb->posts WHERE post_type = %s", $type ) ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 733b015723..8a2e7eaf1e 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.4-alpha-56622'; +$wp_version = '6.4-alpha-56623'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.