From c6f6d66df73b5c266d8143c51dd8caf84ffb7503 Mon Sep 17 00:00:00 2001 From: Nirav sherasiya Date: Thu, 19 Mar 2026 17:01:47 +0530 Subject: [PATCH 1/2] Add compact button variation in variation list --- src/wp-admin/includes/template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-admin/includes/template.php b/src/wp-admin/includes/template.php index 6680bca89691a..5023703fd5580 100644 --- a/src/wp-admin/includes/template.php +++ b/src/wp-admin/includes/template.php @@ -2604,7 +2604,7 @@ function get_submit_button( $text = '', $type = 'primary large', $name = 'submit $type = explode( ' ', $type ); } - $button_shorthand = array( 'primary', 'small', 'large' ); + $button_shorthand = array( 'primary', 'small', 'large', 'compact' ); $classes = array( 'button' ); foreach ( $type as $t ) { From 53aa07658b58a768f54379324982fd2db2c02e01 Mon Sep 17 00:00:00 2001 From: Nirav sherasiya Date: Mon, 23 Mar 2026 12:48:45 +0530 Subject: [PATCH 2/2] Update function docs --- src/wp-admin/includes/template.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-admin/includes/template.php b/src/wp-admin/includes/template.php index 5023703fd5580..6bfdf9f90c9a4 100644 --- a/src/wp-admin/includes/template.php +++ b/src/wp-admin/includes/template.php @@ -2561,7 +2561,7 @@ function compression_test() { * * @param string $text Optional. The text of the button. Defaults to 'Save Changes'. * @param string $type Optional. The type and CSS class(es) of the button. Core values - * include 'primary', 'small', and 'large'. Default 'primary'. + * include 'primary', 'small', 'compact' and 'large'. Default 'primary'. * @param string $name Optional. The HTML name of the submit button. If no `id` attribute * is given in the `$other_attributes` parameter, `$name` will be used * as the button's `id`. Default 'submit'. @@ -2585,7 +2585,7 @@ function submit_button( $text = '', $type = 'primary', $name = 'submit', $wrap = * * @param string $text Optional. The text of the button. Defaults to 'Save Changes'. * @param string $type Optional. The type and CSS class(es) of the button. Core values - * include 'primary', 'small', and 'large'. Default 'primary large'. + * include 'primary', 'small', 'compact' and 'large'. Default 'primary large'. * @param string $name Optional. The HTML name of the submit button. If no `id` attribute * is given in the `$other_attributes` parameter, `$name` will be used * as the button's `id`. Default 'submit'.