#59921 closed defect (bug) (fixed)
Update submit_button() default values for consistency
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.5 | Priority: | normal |
Severity: | normal | Version: | 4.2 |
Component: | Administration | Keywords: | good-first-bug has-patch add-to-field-guide |
Focuses: | Cc: |
Description
Background: #31308.
In [31446], default values for $text
and $other_attributes
parameters in get_submit_button()
were changed from null
to an empty string.
For consistency, the same change should be done in submit_button()
too. Since it is just a wrapper for get_submit_button()
, which does not do any strict type checking on these parameters, backward compatibility should not be a concern here.
Change History (5)
This ticket was mentioned in PR #5687 on WordPress/wordpress-develop by andbalashov.
10 months ago
#2
- Keywords has-patch added; needs-patch removed
#3
@
10 months ago
- Owner set to SergeyBiryukov
- Resolution set to fixed
- Status changed from new to closed
In 57128:
@SergeyBiryukov commented on PR #5687:
10 months ago
#4
Thanks for the PR! Merged in r57128.
Note: See
TracTickets for help on using
tickets.
In alignment with ticket #59921 and following the precedent set in changeset [31446], this commit updates the
submit_button()
function in the Administration component to standardize the default values of$text
and$other_attributes
parameters. Previously set tonull
, these defaults have now been changed to an empty string (''
). This modification ensures consistency with theget_submit_button()
function, whichsubmit_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.Trac ticket: https://core.trac.wordpress.org/ticket/59921