Changeset 54483 for trunk/src/wp-includes/blocks/search.php
- Timestamp:
- 10/11/2022 03:24:12 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks/search.php
r54257 r54483 382 382 383 383 // Get typography styles to be shared across inner elements. 384 $typography_styles = get_typography_styles_for_block_core_search( $attributes);384 $typography_styles = esc_attr( get_typography_styles_for_block_core_search( $attributes ) ); 385 385 if ( ! empty( $typography_styles ) ) { 386 386 $label_styles [] = $typography_styles; … … 443 443 // Add typography styles. 444 444 if ( ! empty( $attributes['style']['typography']['fontSize'] ) ) { 445 $typography_styles[] = sprintf( 'font-size: %s;', esc_attr( $attributes['style']['typography']['fontSize'] ) ); 445 $typography_styles[] = sprintf( 446 'font-size: %s;', 447 gutenberg_get_typography_font_size_value( 448 array( 449 'size' => $attributes['style']['typography']['fontSize'], 450 ) 451 ) 452 ); 453 446 454 } 447 455 448 456 if ( ! empty( $attributes['style']['typography']['fontFamily'] ) ) { 449 $typography_styles[] = sprintf( 'font-family: %s;', esc_attr( $attributes['style']['typography']['fontFamily'] ));457 $typography_styles[] = sprintf( 'font-family: %s;', $attributes['style']['typography']['fontFamily'] ); 450 458 } 451 459 452 460 if ( ! empty( $attributes['style']['typography']['letterSpacing'] ) ) { 453 $typography_styles[] = sprintf( 'letter-spacing: %s;', esc_attr( $attributes['style']['typography']['letterSpacing'] ));461 $typography_styles[] = sprintf( 'letter-spacing: %s;', $attributes['style']['typography']['letterSpacing'] ); 454 462 } 455 463 456 464 if ( ! empty( $attributes['style']['typography']['fontWeight'] ) ) { 457 $typography_styles[] = sprintf( 'font-weight: %s;', esc_attr( $attributes['style']['typography']['fontWeight'] ));465 $typography_styles[] = sprintf( 'font-weight: %s;', $attributes['style']['typography']['fontWeight'] ); 458 466 } 459 467 460 468 if ( ! empty( $attributes['style']['typography']['fontStyle'] ) ) { 461 $typography_styles[] = sprintf( 'font-style: %s;', esc_attr( $attributes['style']['typography']['fontStyle'] ));469 $typography_styles[] = sprintf( 'font-style: %s;', $attributes['style']['typography']['fontStyle'] ); 462 470 } 463 471 464 472 if ( ! empty( $attributes['style']['typography']['lineHeight'] ) ) { 465 $typography_styles[] = sprintf( 'line-height: %s;', esc_attr( $attributes['style']['typography']['lineHeight'] ));473 $typography_styles[] = sprintf( 'line-height: %s;', $attributes['style']['typography']['lineHeight'] ); 466 474 } 467 475 468 476 if ( ! empty( $attributes['style']['typography']['textTransform'] ) ) { 469 $typography_styles[] = sprintf( 'text-transform: %s;', esc_attr( $attributes['style']['typography']['textTransform'] ));477 $typography_styles[] = sprintf( 'text-transform: %s;', $attributes['style']['typography']['textTransform'] ); 470 478 } 471 479
Note: See TracChangeset
for help on using the changeset viewer.