Changeset 49226 for trunk/src/wp-includes/blocks/search.php
- Timestamp:
- 10/20/2020 01:33:02 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks/search.php
r49135 r49226 66 66 if ( $show_button ) { 67 67 $button_internal_markup = ''; 68 $button_classes = ''; 68 69 69 70 if ( ! $use_icon_button ) { … … 72 73 } 73 74 } else { 75 $button_classes .= 'has-icon'; 74 76 $button_internal_markup = 75 '<svg id="search-icon" class="search-icon" viewBox="0 0 24 24" >77 '<svg id="search-icon" class="search-icon" viewBox="0 0 24 24" width="24" height="24"> 76 78 <path d="M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"></path> 77 79 </svg>'; … … 79 81 80 82 $button_markup = sprintf( 81 '<button type="submit" class="wp-block-search__button">%s</button>',83 '<button type="submit"class="wp-block-search__button ' . $button_classes . '">%s</button>', 82 84 $button_internal_markup 83 85 ); … … 90 92 } 91 93 92 $field_markup = sprintf(94 $field_markup = sprintf( 93 95 '<div class="wp-block-search__inside-wrapper"%s>%s</div>', 94 96 $width_styles, 95 97 $input_markup . $button_markup 96 98 ); 99 $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classnames ) ); 97 100 98 101 return sprintf( 99 '<form role="search" method="get" action="%s" class="%s">%s</form>',102 '<form role="search" method="get" action="%s" %s>%s</form>', 100 103 esc_url( home_url( '/' ) ), 101 $ classnames,104 $wrapper_attributes, 102 105 $label_markup . $field_markup 103 106 );
Note: See TracChangeset
for help on using the changeset viewer.