Changeset 19593 for trunk/wp-includes/post.php
- Timestamp:
- 12/13/2011 11:45:31 PM (14 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/post.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post.php
r19444 r19593 494 494 * @param int|object $post A post 495 495 * 496 * @return mixed The format if successful. False if no format is set. WP_Error if errors.496 * @return mixed The format if successful. False if no format is set. WP_Error if errors. 497 497 */ 498 498 function get_post_format( $post = null ) { … … 532 532 * 533 533 * @param int|object $post The post for which to assign a format 534 * @param string $format A format to assign. Use an empty string or array to remove all formats from the post.534 * @param string $format A format to assign. Use an empty string or array to remove all formats from the post. 535 535 * @return mixed WP_Error on error. Array of affected term IDs on success. 536 536 */ … … 888 888 * for documentation. Defaults to none. 889 889 * - register_meta_box_cb - Provide a callback function that will be called when setting up the 890 * meta boxes for the edit form. Do remove_meta_box() and add_meta_box() calls in the callback.890 * meta boxes for the edit form. Do remove_meta_box() and add_meta_box() calls in the callback. 891 891 * - taxonomies - An array of taxonomy identifiers that will be registered for the post type. 892 892 * Default is no taxonomies. Taxonomies can be registered later with register_taxonomy() or … … 953 953 $args->show_in_admin_bar = true === $args->show_in_menu; 954 954 955 // Whether to show this type in nav-menus.php. Defaults to the setting for public.955 // Whether to show this type in nav-menus.php. Defaults to the setting for public. 956 956 if ( null === $args->show_in_nav_menus ) 957 957 $args->show_in_nav_menus = $args->public; … … 2006 2006 } 2007 2007 2008 // Do raw query. wp_get_post_revisions() is filtered2008 // Do raw query. wp_get_post_revisions() is filtered 2009 2009 $revision_ids = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_parent = %d AND post_type = 'revision'", $postid ) ); 2010 // Use wp_delete_post (via wp_delete_post_revision) again. Ensures any meta/misplaced data gets cleaned up.2010 // Use wp_delete_post (via wp_delete_post_revision) again. Ensures any meta/misplaced data gets cleaned up. 2011 2011 foreach ( $revision_ids as $revision_id ) 2012 2012 wp_delete_post_revision( $revision_id ); … … 2483 2483 $post_name = ''; 2484 2484 2485 // Create a valid post name. Drafts and pending posts are allowed to have an empty2485 // Create a valid post name. Drafts and pending posts are allowed to have an empty 2486 2486 // post name. 2487 2487 if ( empty($post_name) ) { … … 4151 4151 * @since 3.0.0 4152 4152 * @param string $post_type Post type. 4153 * @param bool $full Optional. Returns a full WHERE statement instead of just an 'andalso' term.4154 * @param int $post_author Optional. Query posts having a single author ID.4153 * @param bool $full Optional. Returns a full WHERE statement instead of just an 'andalso' term. 4154 * @param int $post_author Optional. Query posts having a single author ID. 4155 4155 * @return string SQL WHERE code that can be added to a query. 4156 4156 */ … … 4903 4903 * @param int|object $post Post ID or post object 4904 4904 * @param string $output Optional. OBJECT, ARRAY_A, or ARRAY_N. 4905 * @param string $filter Optional sanitation filter. @see sanitize_post()4905 * @param string $filter Optional sanitation filter. @see sanitize_post() 4906 4906 * @return mixed Null if error or post object if success 4907 4907 */ … … 5111 5111 return 0; 5112 5112 5113 // There's a loop, but it doesn't contain $post_ID. Break the loop.5113 // There's a loop, but it doesn't contain $post_ID. Break the loop. 5114 5114 foreach ( array_keys( $loop ) as $loop_member ) 5115 5115 wp_update_post( array( 'ID' => $loop_member, 'post_parent' => 0 ) );
Note: See TracChangeset
for help on using the changeset viewer.