Changeset 5700 for trunk/wp-includes/post.php
- Timestamp:
- 06/14/2007 02:25:30 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/post.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post.php
r5685 r5700 28 28 function &get_children($args = '', $output = OBJECT) { 29 29 global $post_cache, $wpdb, $blog_id; 30 30 31 31 if ( empty( $args ) ) { 32 32 if ( isset( $GLOBALS['post'] ) ) { … … 40 40 $args = 'post_parent=' . (int) $args; 41 41 } 42 42 43 43 $defaults = array( 44 44 'numberposts' => -1, 'post_type' => '', 45 45 'post_status' => '', 'post_parent' => 0 46 46 ); 47 47 48 48 $r = wp_parse_args( $args, $defaults ); 49 49 … … 175 175 function get_posts($args) { 176 176 global $wpdb; 177 177 178 178 $defaults = array( 179 179 'numberposts' => 5, 'offset' => 0, … … 184 184 'post_status' => 'publish', 'post_parent' => 0 185 185 ); 186 186 187 187 $r = wp_parse_args( $args, $defaults ); 188 188 extract( $r ); 189 189 190 190 $numberposts = (int) $numberposts; 191 191 $offset = (int) $offset; … … 431 431 432 432 do_action('deleted_post', $postid); 433 433 434 434 return $post; 435 435 } … … 450 450 $defaults = array('fields' => 'all'); 451 451 $args = wp_parse_args( $args, $defaults ); 452 452 453 453 $tags = get_object_terms($post_id, 'post_tag', $args); 454 454 … … 778 778 /* $append - true = don't delete existing tags, just add on, false = replace the tags with the new tags */ 779 779 global $wpdb; 780 780 781 781 $post_id = (int) $post_id; 782 782 783 783 if ( !$post_id ) 784 784 return false; … … 1041 1041 function &get_pages($args = '') { 1042 1042 global $wpdb; 1043 1043 1044 1044 $defaults = array( 1045 1045 'child_of' => 0, 'sort_order' => 'ASC', … … 1049 1049 'authors' => '' 1050 1050 ); 1051 1051 1052 1052 $r = wp_parse_args( $args, $defaults ); 1053 1053 extract( $r );
Note: See TracChangeset
for help on using the changeset viewer.