[wp-trac] [WordPress Trac] #59921: Update submit_button() default values for consistency

WordPress Trac noreply at wordpress.org
Mon Nov 20 00:06:22 UTC 2023


#59921: Update submit_button() default values for consistency
--------------------------------------+-----------------------------
 Reporter:  SergeyBiryukov            |       Owner:  SergeyBiryukov
     Type:  defect (bug)              |      Status:  closed
 Priority:  normal                    |   Milestone:  6.5
Component:  Administration            |     Version:  4.2
 Severity:  normal                    |  Resolution:  fixed
 Keywords:  good-first-bug has-patch  |     Focuses:
--------------------------------------+-----------------------------
Changes (by SergeyBiryukov):

 * owner:  (none) => SergeyBiryukov
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"57128" 57128]:
 {{{
 #!CommitTicketReference repository="" revision="57128"
 Administration: Standardize default values in `submit_button()`.

 This commit updates the `submit_button()` function to standardize the
 default values of `$text` and `$other_attributes` parameters. Previously
 set to `null`, these defaults have now been changed to an empty string
 (`''`), bringing consistency with the `get_submit_button()` function,
 which `submit_button()` wraps.

 The change maintains backward compatibility, as `get_submit_button()` does
 not perform strict type-checking on these parameters. This update aligns
 with the ongoing effort to standardize function parameters across the
 WordPress codebase, improving the readability and predictability of the
 core functions.

 Follow-up to [31446].

 Props andbalashov.
 Fixes #59921.
 }}}

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


More information about the wp-trac mailing list