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 { |
| 19 | 19 | $type = $this->calculateType(); |
| 20 | 20 | } |
| 21 | 21 | $this->type = $type; |
| 22 | | if ($type == 'struct') { |
| | 22 | if ( 'struct' === $type ) { |
| 23 | 23 | // Turn all the values in the array in to new IXR_Value objects |
| 24 | 24 | foreach ($this->data as $key => $value) { |
| 25 | 25 | $this->data[$key] = new IXR_Value($value); |
| 26 | 26 | } |
| 27 | 27 | } |
| 28 | | if ($type == 'array') { |
| | 28 | if ( 'array' === $type ) { |
| 29 | 29 | for ($i = 0, $j = count($this->data); $i < $j; $i++) { |
| 30 | 30 | $this->data[$i] = new IXR_Value($this->data[$i]); |
| 31 | 31 | } |
diff --git src/wp-includes/deprecated.php src/wp-includes/deprecated.php
index 45b4f89a9e..9765ac1567 100644
|
|
|
function the_category_head( $before = '', $after = '' ) { |
| 112 | 112 | // Grab the first cat in the list. |
| 113 | 113 | $categories = get_the_category(); |
| 114 | 114 | $currentcat = $categories[0]->category_id; |
| 115 | | if ( $currentcat != $previouscat ) { |
| | 115 | if ( $currentcat !== $previouscat ) { |
| 116 | 116 | echo $before; |
| 117 | 117 | echo get_the_category_by_ID($currentcat); |
| 118 | 118 | echo $after; |
| … |
… |
function previous_post($format='%', $previous='previous post: ', $title='yes', $ |
| 149 | 149 | return; |
| 150 | 150 | |
| 151 | 151 | $string = '<a href="'.get_permalink($post->ID).'">'.$previous; |
| 152 | | if ( 'yes' == $title ) |
| | 152 | if ( 'yes' === $title ) |
| 153 | 153 | $string .= apply_filters('the_title', $post->post_title, $post->ID); |
| 154 | 154 | $string .= '</a>'; |
| 155 | 155 | $format = str_replace('%', $string, $format); |
| … |
… |
function user_can_edit_post($user_id, $post_id, $blog_id = 1) { |
| 248 | 248 | $post = get_post($post_id); |
| 249 | 249 | $post_author_data = get_userdata($post->post_author); |
| 250 | 250 | |
| 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 ) ) |
| 252 | 252 | || ($author_data->user_level > $post_author_data->user_level) |
| 253 | 253 | || ($author_data->user_level >= 10) ) { |
| 254 | 254 | return true; |
| … |
… |
function the_content_rss($more_link_text='(more...)', $stripteaser=0, $more_file |
| 1691 | 1691 | $content = apply_filters('the_content_rss', $content); |
| 1692 | 1692 | if ( $cut && !$encode_html ) |
| 1693 | 1693 | $encode_html = 2; |
| 1694 | | if ( 1== $encode_html ) { |
| | 1694 | if ( 1 === $encode_html ) { |
| 1695 | 1695 | $content = esc_html($content); |
| 1696 | 1696 | $cut = 0; |
| 1697 | | } elseif ( 0 == $encode_html ) { |
| | 1697 | } elseif ( 0 === $encode_html ) { |
| 1698 | 1698 | $content = make_url_footnote($content); |
| 1699 | | } elseif ( 2 == $encode_html ) { |
| | 1699 | } elseif ( 2 === $encode_html ) { |
| 1700 | 1700 | $content = strip_tags($content); |
| 1701 | 1701 | } |
| 1702 | 1702 | if ( $cut ) { |