WordPress.org

Make WordPress Core

Changeset 19724


Ignore:
Timestamp:
01/09/2012 08:08:57 PM (6 years ago)
Author:
ryan
Message:

Code cleanup in the paging block. Props kawauso. fixes #19773

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/query.php

    r19712 r19724  
    25102510        if ( empty($q['nopaging']) && !$this->is_singular ) {
    25112511            $page = absint($q['paged']);
    2512             if ( empty($page) )
     2512            if ( !$page )
    25132513                $page = 1;
    25142514
    25152515            if ( empty($q['offset']) ) {
    2516                 $pgstrt = '';
    25172516                $pgstrt = ($page - 1) * $q['posts_per_page'] . ', ';
    2518                 $limits = 'LIMIT ' . $pgstrt . $q['posts_per_page'];
    25192517            } else { // we're ignoring $page and using 'offset'
    25202518                $q['offset'] = absint($q['offset']);
    25212519                $pgstrt = $q['offset'] . ', ';
    2522                 $limits = 'LIMIT ' . $pgstrt . $q['posts_per_page'];
    2523             }
     2520            }
     2521            $limits = 'LIMIT ' . $pgstrt . $q['posts_per_page'];
    25242522        }
    25252523
Note: See TracChangeset for help on using the changeset viewer.