From 7f547618fda554ec4ac58ae8a11dc43a7e2ee106 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 26 Nov 2020 12:32:35 +0000 Subject: [PATCH] Options, Meta APIs: Pass `$meta_type` to the `get_{$meta_type}_metadata` filter in `metadata_exists()`. This matches the main instance of the filter in `get_metadata_raw()`. Follow-up to [48505]. Props pbiron, jsmoriss, TimothyBlynJacobs. Fixes #51866. git-svn-id: https://develop.svn.wordpress.org/trunk@49699 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/meta.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/meta.php b/src/wp-includes/meta.php index fe144fcda6..3bce8281e3 100644 --- a/src/wp-includes/meta.php +++ b/src/wp-includes/meta.php @@ -673,7 +673,7 @@ function metadata_exists( $meta_type, $object_id, $meta_key ) { } /** This filter is documented in wp-includes/meta.php */ - $check = apply_filters( "get_{$meta_type}_metadata", null, $object_id, $meta_key, true ); + $check = apply_filters( "get_{$meta_type}_metadata", null, $object_id, $meta_key, true, $meta_type ); if ( null !== $check ) { return (bool) $check; }