Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#56493 closed enhancement (fixed)

REST API (settings): Switch to rest_default_additional_properties_to_false

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

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.


2 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
2 years ago

  • Owner set to TimothyBlynJacobs
  • Resolution set to fixed
  • Status changed from new to 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
2 years ago

  • Milestone changed from Awaiting Review to 6.1

TimothyBJacobs commented on PR #3169:


2 years ago
#4

Committed in b80ba269f6cf0b0600be49b89b9a926421af88ee.

#5 @TimothyBlynJacobs
2 years ago

  • Version changed from 6.0.2 to 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
2 years ago

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

Note: See TracTickets for help on using tickets.