Opened 18 years ago
Closed 16 years ago
#4531 closed enhancement (fixed)
Add limit parameter to get_pages
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 2.8 | Priority: | normal |
Severity: | minor | Version: | |
Component: | Template | Keywords: | has-patch tested commit |
Focuses: | Cc: |
Description
add 'numberposts' and 'offset' to get_pages() to allow for limiting of returned posts.
Attachments (3)
Change History (18)
#2
@
18 years ago
- Component changed from Administration to Template
- Keywords get_pages has-patch added
#5
in reply to:
↑ 4
;
follow-up:
↓ 8
@
18 years ago
Replying to rob1n:
Why is it 'numberposts'? Why not 'numberpages'?
DD32 commented on wp-hackers about that typo that is in the ticket, but not in the patch.
#6
@
18 years ago
I think we use "number" in other places. Let's keep it consistent.
The number needs to be cast to an int for security. See how number is used in get_terms().
#7
@
18 years ago
- Keywords needs-testing added
Patch 4531-add-limit-parameters-to-get_pages.diff adds offset and number parameters to get_pages().
#8
in reply to:
↑ 5
@
18 years ago
Replying to foolswisdom:
Replying to rob1n:
Why is it 'numberposts'? Why not 'numberpages'?
DD32 commented on wp-hackers about that typo that is in the ticket, but not in the patch.
See comment 1:
DD32:
'Doh! Sorry, I meant "adds 'numberpages'" in the Description :)
If we want to standarise on 'number' and 'offset' for all functions, then it might be an idea to depreciate "numberposts" in get_posts too:
function get_posts($args) { global $wpdb; $defaults = array( 'numberposts' => 5, 'offset' => 0,
#10
@
17 years ago
- Milestone changed from 2.5 to 2.6
- Owner changed from anonymous to westi
- Status changed from new to assigned
- Type changed from defect to enhancement
Adds numberpages and offset to get_pages