Make WordPress Core

Ticket #60415: 60415.9.patch

File 60415.9.patch, 2.8 KB (added by viralsampat, 13 months ago)

I have added another patch

  • src/wp-includes/IXR/class-IXR-value.php

    diff --git src/wp-includes/IXR/class-IXR-value.php src/wp-includes/IXR/class-IXR-value.php
    index 0fd878bcac..2a36e95f2b 100644
    class IXR_Value { 
    1919            $type = $this->calculateType();
    2020        }
    2121        $this->type = $type;
    22         if ($type == 'struct') {
     22        if ( 'struct' === $type ) {
    2323            // Turn all the values in the array in to new IXR_Value objects
    2424            foreach ($this->data as $key => $value) {
    2525                $this->data[$key] = new IXR_Value($value);
    2626            }
    2727        }
    28         if ($type == 'array') {
     28        if ( 'array' === $type ) {
    2929            for ($i = 0, $j = count($this->data); $i < $j; $i++) {
    3030                $this->data[$i] = new IXR_Value($this->data[$i]);
    3131            }
  • src/wp-includes/deprecated.php

    diff --git src/wp-includes/deprecated.php src/wp-includes/deprecated.php
    index 45b4f89a9e..9765ac1567 100644
    function the_category_head( $before = '', $after = '' ) { 
    112112        // Grab the first cat in the list.
    113113        $categories = get_the_category();
    114114        $currentcat = $categories[0]->category_id;
    115         if ( $currentcat != $previouscat ) {
     115        if ( $currentcat !== $previouscat ) {
    116116                echo $before;
    117117                echo get_the_category_by_ID($currentcat);
    118118                echo $after;
    function previous_post($format='%', $previous='previous post: ', $title='yes', $ 
    149149                return;
    150150
    151151        $string = '<a href="'.get_permalink($post->ID).'">'.$previous;
    152         if ( 'yes' == $title )
     152        if ( 'yes' === $title )
    153153                $string .= apply_filters('the_title', $post->post_title, $post->ID);
    154154        $string .= '</a>';
    155155        $format = str_replace('%', $string, $format);
    function user_can_edit_post($user_id, $post_id, $blog_id = 1) { 
    248248        $post = get_post($post_id);
    249249        $post_author_data = get_userdata($post->post_author);
    250250
    251         if ( (($user_id == $post_author_data->ID) && !($post->post_status == 'publish' && $author_data->user_level < 2))
     251        if ( ( ( $user_id == $post_author_data->ID ) && !( $post->post_status == 'publish' && $author_data->user_level < 2 ) )
    252252                        || ($author_data->user_level > $post_author_data->user_level)
    253253                        || ($author_data->user_level >= 10) ) {
    254254                return true;
    function the_content_rss($more_link_text='(more...)', $stripteaser=0, $more_file 
    16911691        $content = apply_filters('the_content_rss', $content);
    16921692        if ( $cut && !$encode_html )
    16931693                $encode_html = 2;
    1694         if ( 1== $encode_html ) {
     1694        if ( 1 === $encode_html ) {
    16951695                $content = esc_html($content);
    16961696                $cut = 0;
    1697         } elseif ( 0 == $encode_html ) {
     1697        } elseif ( 0 === $encode_html ) {
    16981698                $content = make_url_footnote($content);
    1699         } elseif ( 2 == $encode_html ) {
     1699        } elseif ( 2 === $encode_html ) {
    17001700                $content = strip_tags($content);
    17011701        }
    17021702        if ( $cut ) {