Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#60447 closed defect (bug) (fixed)

Block Bindings API: Create WP_Block_Bindings_Source class

Reported by: czapla Owned by: gziolo
Priority: normal Milestone: 6.5
Component: Editor Version:
Severity: normal Keywords: has-patch has-unit-tests
Cc: Focuses:

Description

This change refactors the array of Block Binding sources into its own class.

Change History (3)

This ticket was mentioned in PR #6042 on WordPress/wordpress-develop by @czapla.


3 years ago
#1

This PR refactors the array of Block Binding sources into its own WP_Block_Bindings_Source class.

This change was previously discussed in https://github.com/WordPress/gutenberg/issues/53300#issuecomment-1926572096

### Reasons for this change

  • Having a well-defined class for the sources makes it clearer what types are expected to be passed.
  • It makes the implementation more flexible for future changes.

#2 @gziolo
3 years ago

  • Owner set to gziolo
  • Resolutionfixed
  • Status newclosed

In 57562:

Editor: Introduce WP_Block_Bindings_Source class

Abstracts the block bindings source array into a well-defined object.

Fixes #60447.
See #60282.
Follow-up [57373].
Props czapla, santosguillamot, gziolo.

Note: See TracTickets for help on using tickets.