Skip to content

Commit be35955

Browse files
t-hamanoclaude
andcommitted
Administration: Use the compact shorthand in submit_button() calls.
Now that `get_submit_button()` supports the `compact` shorthand, update all core callers that pass the raw `button-compact` class to use it. This keeps the callers consistent with the other shorthands (`primary`, `small`, `large`) and produces identical markup. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent cbe25fb commit be35955

7 files changed

Lines changed: 9 additions & 9 deletions

‎src/wp-admin/customize.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@
198198
<?php if ( $compatible_wp && $compatible_php ) : ?>
199199
<?php $save_text = $wp_customize->is_theme_active() ? __( 'Publish' ) : __( 'Activate &amp; Publish' ); ?>
200200
<div id="customize-save-button-wrapper" class="customize-save-button-wrapper" >
201-
<?php submit_button( $save_text, 'primary button-compact save', 'save', false ); ?>
201+
<?php submit_button( $save_text, 'primary compact save', 'save', false ); ?>
202202
<button id="publish-settings" class="publish-settings button-primary button-compact button dashicons dashicons-admin-generic" aria-label="<?php esc_attr_e( 'Publish Settings' ); ?>" aria-expanded="false" disabled></button>
203203
</div>
204204
<?php else : ?>

‎src/wp-admin/includes/class-wp-comments-list-table.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ protected function extra_tablenav( $which ) {
442442

443443
if ( ! empty( $output ) && $this->has_items() ) {
444444
echo $output;
445-
submit_button( __( 'Filter' ), 'button-compact', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
445+
submit_button( __( 'Filter' ), 'compact', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
446446
}
447447
}
448448

‎src/wp-admin/includes/class-wp-links-list-table.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ protected function extra_tablenav( $which ) {
123123

124124
wp_dropdown_categories( $dropdown_options );
125125

126-
submit_button( __( 'Filter' ), 'button-compact', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
126+
submit_button( __( 'Filter' ), 'compact', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
127127
?>
128128
</div>
129129
<?php

‎src/wp-admin/includes/class-wp-list-table.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ public function search_box( $text, $input_id ) {
416416
<p class="search-box">
417417
<label class="screen-reader-text" for="<?php echo esc_attr( $input_id ); ?>"><?php echo $text; ?>:</label>
418418
<input type="search" id="<?php echo esc_attr( $input_id ); ?>" name="s" value="<?php _admin_search_query(); ?>" />
419-
<?php submit_button( $text, 'button-compact', '', false, array( 'id' => 'search-submit' ) ); ?>
419+
<?php submit_button( $text, 'compact', '', false, array( 'id' => 'search-submit' ) ); ?>
420420
</p>
421421
<?php
422422
}
@@ -632,7 +632,7 @@ protected function bulk_actions( $which = '' ) {
632632

633633
echo "</select>\n";
634634

635-
submit_button( __( 'Apply' ), 'action button-compact', 'bulk_action', false, array( 'id' => "doaction$two" ) );
635+
submit_button( __( 'Apply' ), 'action compact', 'bulk_action', false, array( 'id' => "doaction$two" ) );
636636
echo "\n";
637637
}
638638

‎src/wp-admin/includes/class-wp-media-list-table.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,12 +242,12 @@ protected function extra_tablenav( $which ) {
242242
/** This action is documented in wp-admin/includes/class-wp-posts-list-table.php */
243243
do_action( 'restrict_manage_posts', $this->screen->post_type, $which );
244244

245-
submit_button( __( 'Filter' ), 'button-compact', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
245+
submit_button( __( 'Filter' ), 'compact', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
246246

247247
if ( $this->is_trash && $this->has_items()
248248
&& current_user_can( 'edit_others_posts' )
249249
) {
250-
submit_button( __( 'Empty Trash' ), 'apply button-compact', 'delete_all', false );
250+
submit_button( __( 'Empty Trash' ), 'apply compact', 'delete_all', false );
251251
}
252252
?>
253253
</div>

‎src/wp-admin/includes/class-wp-posts-list-table.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ protected function extra_tablenav( $which ) {
596596

597597
if ( ! empty( $output ) ) {
598598
echo $output;
599-
submit_button( __( 'Filter' ), 'button-compact', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
599+
submit_button( __( 'Filter' ), 'compact', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
600600
}
601601
}
602602

‎src/wp-admin/includes/media.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2905,7 +2905,7 @@ function media_upload_library_form( $errors ) {
29052905
</select>
29062906
<?php } ?>
29072907

2908-
<?php submit_button( __( 'Filter &#187;' ), 'button-compact', 'post-query-submit', false ); ?>
2908+
<?php submit_button( __( 'Filter &#187;' ), 'compact', 'post-query-submit', false ); ?>
29092909

29102910
</div>
29112911

0 commit comments

Comments
 (0)