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. Built from https://develop.svn.wordpress.org/trunk@57128 git-svn-id: http://core.svn.wordpress.org/trunk@56639 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
252d94b92d
commit
2f4ffff0fb
|
@ -2553,9 +2553,9 @@ function compression_test() {
|
||||||
* These key/value attribute pairs will be output as `attribute="value"`,
|
* These key/value attribute pairs will be output as `attribute="value"`,
|
||||||
* where attribute is the key. Attributes can also be provided as a string,
|
* where attribute is the key. Attributes can also be provided as a string,
|
||||||
* e.g. `id="search-submit"`, though the array format is generally preferred.
|
* e.g. `id="search-submit"`, though the array format is generally preferred.
|
||||||
* Default null.
|
* Default empty string.
|
||||||
*/
|
*/
|
||||||
function submit_button( $text = null, $type = 'primary', $name = 'submit', $wrap = true, $other_attributes = null ) {
|
function submit_button( $text = '', $type = 'primary', $name = 'submit', $wrap = true, $other_attributes = '' ) {
|
||||||
echo get_submit_button( $text, $type, $name, $wrap, $other_attributes );
|
echo get_submit_button( $text, $type, $name, $wrap, $other_attributes );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '6.5-alpha-57127';
|
$wp_version = '6.5-alpha-57128';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue