Make WordPress Core


Ignore:
Timestamp:
05/05/2013 02:46:59 AM (12 years ago)
Author:
azaozz
Message:

Clean up revision.php docblocks, props DrewAPicture, fixes #24265

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/revision.php

    r24034 r24177  
    1414 * an array whose keys are the post fields to be saved for post revisions.
    1515 *
    16  * @package WordPress
    17  * @subpackage Post_Revisions
    18  * @since 2.6.0
    19  * @access private
     16 * @since 2.6.0
     17 * @access private
     18 *
    2019 * @uses apply_filters() Calls '_wp_post_revision_fields' on 'title', 'content' and 'excerpt' fields.
    2120 *
     
    6564 * @since 3.6
    6665 * @access private
     66 *
    6767 * @return array An array of meta keys that should be revisioned.
    6868 */
     
    8686 * Adds a copy of the current post as a revision, so latest revision always matches current post
    8787 *
    88  * @package WordPress
    89  * @subpackage Post_Revisions
    9088 * @since 2.6.0
    9189 *
     
    185183 * otherwise returns the latest autosave.
    186184 *
    187  * @package WordPress
    188  * @subpackage Post_Revisions
    189  * @since 2.6.0
     185 * @since 2.6.0
     186 *
    190187 * @uses wp_get_post_revisions()
    191188 *
     
    213210 * Determines if the specified post is a revision.
    214211 *
    215  * @package WordPress
    216  * @subpackage Post_Revisions
    217212 * @since 2.6.0
    218213 *
     
    230225 * Determines if the specified post is an autosave.
    231226 *
    232  * @package WordPress
    233  * @subpackage Post_Revisions
    234227 * @since 2.6.0
    235228 *
     
    250243 * Inserts post data into the posts table as a post revision.
    251244 *
    252  * @package WordPress
    253  * @subpackage Post_Revisions
    254  * @since 2.6.0
     245 * @since 2.6.0
     246 * @access private
    255247 *
    256248 * @uses wp_insert_post()
     
    304296 * Gets a post revision.
    305297 *
    306  * @package WordPress
    307  * @subpackage Post_Revisions
    308298 * @since 2.6.0
    309299 *
    310300 * @uses get_post()
    311301 *
    312  * @param int|object $post Post ID or post object
     302 * @param int|object $post The post ID or object.
    313303 * @param string $output Optional. OBJECT, ARRAY_A, or ARRAY_N.
    314  * @param string $filter Optional sanitation filter. @see sanitize_post()
    315  * @return mixed Null if error or post object if success
     304 * @param string $filter Optional sanitation filter. @see sanitize_post().
     305 * @return mixed Null if error or post object if success.
    316306 */
    317307function wp_get_post_revision(&$post, $output = OBJECT, $filter = 'raw') {
     
    340330 * Can restore a past revision using all fields of the post revision, or only selected fields.
    341331 *
    342  * @package WordPress
    343  * @subpackage Post_Revisions
    344332 * @since 2.6.0
    345333 *
     
    406394 * Deletes the row from the posts table corresponding to the specified revision.
    407395 *
    408  * @package WordPress
    409  * @subpackage Post_Revisions
    410396 * @since 2.6.0
    411397 *
     
    433419 * Returns all revisions of specified post.
    434420 *
    435  * @package WordPress
    436  * @subpackage Post_Revisions
    437421 * @since 2.6.0
    438422 *
     
    440424 *
    441425 * @param int|object $post_id Post ID or post object
    442  * @return array empty if no revisions
     426 * @return array An array of revisions, or an empty array if none.
    443427 */
    444428function wp_get_post_revisions( $post_id = 0, $args = null ) {
     
    464448 * @uses wp_revisions_to_keep()
    465449 *
    466  * @param object $post
    467  * @return bool
     450 * @param object $post The post object.
     451 * @return bool True if number of revisions to keep isn't zero, false otherwise.
    468452 */
    469453function wp_revisions_enabled( $post ) {
     
    480464 * @uses apply_filters() Calls 'wp_revisions_to_keep' hook on the number of revisions.
    481465 *
    482  * @param object $post
    483  * @return int
     466 * @param object $post The post object.
     467 * @return int The number of revisions to keep.
    484468 */
    485469function wp_revisions_to_keep( $post ) {
     
    497481}
    498482
     483/**
     484 * Sets up the post object for preview based on the post autosave.
     485 *
     486 * @since 2.7.0
     487 * @access private
     488 */
    499489function _set_preview($post) {
    500490
     
    519509}
    520510
     511/**
     512 * Filters the latest content for preview from the post autosave.
     513 *
     514 * @since 2.7.0
     515 * @access private
     516 */
    521517function _show_post_preview() {
    522518
     
    574570}
    575571
     572/**
     573 * Gets the post revision version.
     574 *
     575 * @since 3.6.0
     576 * @access private
     577*/
    576578function _wp_get_post_revision_version( $revision ) {
    577579    if ( is_object( $revision ) )
     
    589591 * Upgrade the revisions author, add the current post as a revision and set the revisions version to 1
    590592 *
    591  * @package WordPress
    592  * @subpackage Post_Revisions
    593593 * @since 3.6.0
     594 * @access private
    594595 *
    595596 * @uses wp_get_post_revisions()
     
    684685 *
    685686 * @since 3.6.0
     687 *
    686688 * @see wp_parse_args() Used to change defaults to user defined settings.
    687689 * @uses Text_Diff
Note: See TracChangeset for help on using the changeset viewer.