Skip to content

Commit

Permalink
Search Block: Apply border color correctly when button is outside or …
Browse files Browse the repository at this point in the history
…absent (#47067)
  • Loading branch information
t-hamano authored Jan 12, 2023
1 parent 108e342 commit 8698d84
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/block-library/src/search/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@ function render_block_core_search( $attributes ) {

if ( $show_input ) {
$input_classes = array( 'wp-block-search__input' );
if ( $is_button_inside ) {
if ( ! $is_button_inside && ! empty( $border_color_classes ) ) {
$input_classes[] = $border_color_classes;
}
if ( ! empty( $typography_classes ) ) {
$input_classes[] = $typography_classes;
}
$input_markup = sprintf(
'<input type="search" id="%s" class="wp-block-search__input %s" name="s" value="%s" placeholder="%s" %s required />',
'<input type="search" id="%s" class="%s" name="s" value="%s" placeholder="%s" %s required />',
$input_id,
esc_attr( implode( ' ', $input_classes ) ),
get_search_query(),
Expand Down

0 comments on commit 8698d84

Please sign in to comment.