Make WordPress Core

Opened 20 months ago

Closed 20 months ago

Last modified 19 months 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.


20 months 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
20 months 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
20 months ago

  • Milestone changed from Awaiting Review to 6.1

TimothyBJacobs commented on PR #3169:


20 months ago
#4

Committed in b80ba269f6cf0b0600be49b89b9a926421af88ee.

#5 @TimothyBlynJacobs
20 months 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
19 months ago

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

Note: See TracTickets for help on using tickets.