Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#56493 closed enhancement (fixed)

REST API (settings): Switch to rest_default_additional_properties_to_false

Reported by: anna.bansaghi Owned by: TimothyBlynJacobs
Priority: normal Milestone: 6.1
Component: REST API Version: 4.9
Severity: normal Keywords: has-patch
Cc: Focuses:

Description

Switch to rest_default_additional_properties_to_false() function, and deprecate the WP_REST_Settings_Controller::set_additional_properties_to_false() method.

Similar changeset: #49308

Change History (6)

This ticket was mentioned in ​PR #3169 on ​WordPress/wordpress-develop by ​annaghi.


4 years ago
#1

This PR:

  • switches to rest_default_additional_properties_to_false() function
  • deprecates the WP_REST_Settings_Controller::set_additional_properties_to_false() method.

Trac ticket: https://core.trac.wordpress.org/ticket/56493#ticket

#2 @TimothyBlynJacobs
4 years ago

  • Owner set to TimothyBlynJacobs
  • Resolution → fixed
  • Status new → closed

In 54131:

REST API: Add support for settings to specify their own additionalProperties.

This switches the Settings Controller to use rest_default_additional_properties_to_false and deprecates its own method.

Props anna.bansaghi.
Fixes #56493.

#3 @TimothyBlynJacobs
4 years ago

  • Milestone Awaiting Review → 6.1

​TimothyBJacobs commented on ​PR #3169:


4 years ago
#4

Committed in b80ba269f6cf0b0600be49b89b9a926421af88ee.

#5 @TimothyBlynJacobs
4 years ago

  • Version 6.0.2 → 4.9

Thank you for the patch @annabansaghi and welcome to trac! I've committed your patch. It will be released in WordPress 6.1 later this year.

#6 @anna.bansaghi
4 years ago

Hi @TimothyBlynJacobs, I am glad it was useful!
Thank you for adding a test.

Note: See TracTickets for help on using tickets.