[wp-trac] [WordPress Trac] #59453: Replace property_exists call in block api with instanceof

WordPress Trac noreply at wordpress.org
Fri Sep 29 10:18:20 UTC 2023


#59453: Replace property_exists call in block api with instanceof
---------------------------------------+-------------------------------
 Reporter:  spacedmonkey               |       Owner:  gziolo
     Type:  enhancement                |      Status:  closed
 Priority:  normal                     |   Milestone:  Future Release
Component:  Editor                     |     Version:  5.8
 Severity:  normal                     |  Resolution:  fixed
 Keywords:  has-patch gutenberg-merge  |     Focuses:  coding-standards
---------------------------------------+-------------------------------
Changes (by spacedmonkey):

 * status:  reviewing => closed
 * resolution:   => fixed


Comment:

 In [changeset:"56742" 56742]:
 {{{
 #!CommitTicketReference repository="" revision="56742"
 Editor: Replace property_exists calls in block related functions with
 instanceof

 Replace calls to `property_exists` with `instanceof WP_Block_Type` in
 block related functions. This change not only improves type safety but
 also enhances performance.

 Follow on from [56678] and [56677].

 Props gziolo, aristath, aaronrobertshaw, spacedmonkey.
 Fixes #59453
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/59453#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list