diff --git a/wp-includes/class-wp-query.php b/wp-includes/class-wp-query.php
index baefec7..a72e7c1 100644
a
|
b
|
class WP_Query { |
1765 | 1765 | } |
1766 | 1766 | if ( (isset($q['posts_per_archive_page']) && $q['posts_per_archive_page'] != 0) && ($this->is_archive || $this->is_search) ) |
1767 | 1767 | $q['posts_per_page'] = $q['posts_per_archive_page']; |
1768 | | if ( !isset($q['nopaging']) ) { |
1769 | | if ( $q['posts_per_page'] == -1 ) { |
1770 | | $q['nopaging'] = true; |
1771 | | } else { |
1772 | | $q['nopaging'] = false; |
1773 | | } |
1774 | | } |
1775 | 1768 | |
1776 | 1769 | if ( $this->is_feed ) { |
1777 | 1770 | // This overrides posts_per_page. |
… |
… |
class WP_Query { |
1788 | 1781 | elseif ( $q['posts_per_page'] == 0 ) |
1789 | 1782 | $q['posts_per_page'] = 1; |
1790 | 1783 | |
| 1784 | if ( !isset($q['nopaging']) ) { |
| 1785 | if ( $q['posts_per_page'] <= -1 ) { |
| 1786 | $q['nopaging'] = true; |
| 1787 | } else { |
| 1788 | $q['nopaging'] = false; |
| 1789 | } |
| 1790 | } |
| 1791 | |
1791 | 1792 | if ( !isset($q['comments_per_page']) || $q['comments_per_page'] == 0 ) |
1792 | 1793 | $q['comments_per_page'] = get_option('comments_per_page'); |
1793 | 1794 | |