Changeset 11850
- Timestamp:
- 08/20/2009 04:26:34 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/xmlrpc.php
r11846 r11850 602 602 $username = $args[1]; 603 603 $password = $args[2]; 604 $num_pages = (int) $args[3];604 $num_pages = isset($args[3]) ? (int) $args[3] : 10; 605 605 606 606 if ( !$user = $this->login($username, $password) ) { … … 613 613 do_action('xmlrpc_call', 'wp.getPages'); 614 614 615 $page_limit = 10; 616 if( isset( $num_pages ) ) { 617 $page_limit = $num_pages; 618 } 619 620 $pages = get_posts( array('post_type' => 'page', 'post_status' => 'all', 'numberposts' => $page_limit) ); 615 $pages = get_posts( array('post_type' => 'page', 'post_status' => 'all', 'numberposts' => $num_pages) ); 621 616 $num_pages = count($pages); 622 617
Note: See TracChangeset
for help on using the changeset viewer.