Make WordPress Core

Ticket #57132: 57132.patch

File 57132.patch, 706 bytes (added by viralsampat, 2 years ago)

I have resolved the issue and added the patch.

  • src/wp-includes/blocks/search.php

    diff --git a/src/wp-includes/blocks/search.php b/src/wp-includes/blocks/search.php
    index 26b6a7585c..ff8b07feb6 100644
    a b function render_block_core_search( $attributes ) { 
    7272                if ( ! empty( $typography_classes ) ) {
    7373                        $input_classes[] = $typography_classes;
    7474                }
     75       
     76                // Check array attributes place holder value isset or not
     77                if( empty( $attributes['placeholder'] ) ) {
     78                        $attributes['placeholder'] = 'Optional placeholder…';
     79                }
     80               
    7581                $input_markup = sprintf(
    7682                        '<input type="search" id="%s" class="wp-block-search__input %s" name="s" value="%s" placeholder="%s" %s required />',
    7783                        $input_id,