# This patch file was generated by NetBeans IDE
# Following Index: paths are relative to: C:\xampp\htdocs\wordtrunk\wp-includes
# This patch can be applied using context Tools: Patch action on respective folder.
# It uses platform neutral UTF-8 encoding and \n newlines.
# Above lines and this line are ignored by the patching process.
|
|
|
|
| 1737 | 1737 | if ( isset($struct['post_id']) ) |
| 1738 | 1738 | $post_id = absint($struct['post_id']); |
| 1739 | 1739 | |
| | 1740 | $post_type = ''; |
| | 1741 | if ( isset($struct['post_type']) ) { |
| | 1742 | $post_type_object = get_post_type_object( $struct['post_type'] ); |
| | 1743 | if ( ! ( (bool) $post_type_object ) ) |
| | 1744 | return new IXR_Error( 403, __( 'Invalid post type' ) ); |
| | 1745 | $post_type = $struct['post_type']; |
| | 1746 | } |
| | 1747 | |
| 1740 | 1748 | $offset = 0; |
| 1741 | 1749 | if ( isset($struct['offset']) ) |
| 1742 | 1750 | $offset = absint($struct['offset']); |
| … |
… |
|
| 1745 | 1753 | if ( isset($struct['number']) ) |
| 1746 | 1754 | $number = absint($struct['number']); |
| 1747 | 1755 | |
| 1748 | | $comments = get_comments( array('status' => $status, 'post_id' => $post_id, 'offset' => $offset, 'number' => $number ) ); |
| | 1756 | $comments = get_comments( array('status' => $status, 'post_id' => $post_id, 'offset' => $offset, 'number' => $number, 'post_type' => $post_type ) ); |
| 1749 | 1757 | $num_comments = count($comments); |
| 1750 | 1758 | |
| 1751 | 1759 | if ( ! $num_comments ) |