From 2d5d7a2aaab2df0bce6a38c2ab24520b6bd47769 Mon Sep 17 00:00:00 2001 From: TimothyBlynJacobs Date: Sat, 24 Oct 2020 04:27:09 +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. Built from https://develop.svn.wordpress.org/trunk@49295 git-svn-id: http://core.svn.wordpress.org/trunk@49057 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/rest-api/fields/class-wp-rest-meta-fields.php | 3 +++ wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php b/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php index 2d69e9e903..f7a47483a4 100644 --- a/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php +++ b/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', diff --git a/wp-includes/version.php b/wp-includes/version.php index 9791b94ffc..123ec167ab 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.6-beta1-49294'; +$wp_version = '5.6-beta1-49295'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.