Changeset 30155 for trunk/src/wp-includes/revision.php
- Timestamp:
- 11/01/2014 08:19:26 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/revision.php
r30119 r30155 71 71 72 72 /** 73 * Saves an already existing post as a post revision.74 * 75 * Typically used immediately after post updates.76 * Adds a copy of the current post as a revision, so latest revision always matches current post77 * 78 * @since 2.6.0 79 * 80 * @param int$post_id The ID of the post to save as a revision.73 * Creates a revision for the current version of a post. 74 * 75 * Typically used immediately after a post update, as every update is a revision, 76 * and the most recent revision always matches the current post. 77 * 78 * @since 2.6.0 79 * 80 * @param int $post_id The ID of the post to save as a revision. 81 81 * @return mixed Null or 0 if error, new revision ID, if success. 82 82 */ … … 157 157 $return = _wp_put_post_revision( $post ); 158 158 159 // If a limit for the number of revisions to keep has been set, 160 // delete the oldest ones. 159 161 $revisions_to_keep = wp_revisions_to_keep( $post ); 160 162 … … 162 164 return $return; 163 165 164 // all revisions and autosaves165 166 $revisions = wp_get_post_revisions( $post_id, array( 'order' => 'ASC' ) ); 166 167 … … 447 448 /** 448 449 * Determine how many revisions to retain for a given post. 449 * By default, an infinite number of revisions are stored if a post type supports revisions. 450 * 451 * By default, an infinite number of revisions are kept. 452 * 453 * The constant WP_POST_REVISIONS can be set in wp-config to specify the limit 454 * of revisions to keep. 450 455 * 451 456 * @since 3.6.0 452 457 * 453 * @param object $post The post object.458 * @param object $post The post object. 454 459 * @return int The number of revisions to keep. 455 460 */
Note: See TracChangeset
for help on using the changeset viewer.