#59921 closed defect (bug) (fixed)
Update submit_button() default values for consistency
| Reported by: | SergeyBiryukov | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.5 |
| Component: | Administration | Version: | 4.2 |
| Severity: | normal | Keywords: | good-first-bug has-patch add-to-field-guide |
| Cc: | Focuses: |
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.
3 years ago
#2
- Keywords has-patch added; needs-patch removed
@SergeyBiryukov commented on PR #5687:
3 years ago
#4
Thanks for the PR! Merged in r57128.
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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$textand$other_attributesparameters. 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