From 6722f3aefb22dd9f91cbcfa5ee26669a2ba760eb Mon Sep 17 00:00:00 2001 From: Timothy Jacobs Date: Sat, 24 Oct 2020 04:25:22 +0000 Subject: [PATCH] REST API: Deprecate `WP_REST_Meta_Fields::register_field()`. This method never worked properly and cannot be fixed due to incompatible method signatures. Props flixos90, kadamwhite, jnylen0, TimothyBlynJacobs. Fixes #39959. git-svn-id: https://develop.svn.wordpress.org/trunk@49295 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php b/src/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php index 2d69e9e903..f7a47483a4 100644 --- a/src/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php +++ b/src/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php @@ -48,10 +48,13 @@ abstract class WP_REST_Meta_Fields { * Registers the meta field. * * @since 4.7.0 + * @deprecated 5.6.0 * * @see register_rest_field() */ public function register_field() { + _deprecated_function( __METHOD__, '5.6.0' ); + register_rest_field( $this->get_rest_field_type(), 'meta',