WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/wp get post revisions

Contents

Description

Returns all revisions of specified post.

Usage

<?php wp_get_post_revisions$post_id$args ); ?>

Parameters

$post_id
(mixed) (required) Post ID or post object.
Default: 0
$args
(array) (optional) Query arguments
Default: None

See the parameters section of the WP_Query documentation for a list of parameters that the parameter $args accepts.

Return Values

(array) 
An array of revision objects, or an empty array if none.

Change Log

Since: 2.6

Source File

wp_get_post_revisions() is located in wp-includes/revision.php

Related

See also index of Function Reference and index of Template Tags.
This article is marked as in need of editing. You can help Codex by editing it.