Make WordPress Core

Ticket #57069: 57069.diff

File 57069.diff, 1.5 KB (added by viralsampat, 22 months ago)

I have found one another file and added comments for the same.

  • src/wp-admin/edit.php

    diff --git a/src/wp-admin/edit.php b/src/wp-admin/edit.php
    index f56beabae8..9527b9cee5 100644
    a b  
    44 *
    55 * @package WordPress
    66 * @subpackage Administration
     7 * @global wpdb $wpdb WordPress database abstraction object.
    78 */
    89
    910/** WordPress Administration Bootstrap */
    if ( $doaction ) { 
    9293                $post_status = preg_replace( '/[^a-z0-9_-]+/i', '', $_REQUEST['post_status'] );
    9394                // Validate the post status exists.
    9495                if ( get_post_status_object( $post_status ) ) {
    95                         /**
    96                          * @global wpdb $wpdb WordPress database abstraction object.
    97                          */
     96                       
    9897                        global $wpdb;
    9998
    10099                        $post_ids = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_type=%s AND post_status = %s", $post_type, $post_status ) );
  • 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,