wp_get_post_revisions [ WordPress Function ]
wp_get_post_revisions ( $post_id = 0, $args = null )
| Parameters: |
|
| Uses: | |
| Returns: |
|
| Defined at: |
|
Soorgelijke functies: wp_get_post_revision, wp_list_post_revisions, wp_delete_post_revision, _wp_put_post_revision, wp_save_post_revision
Returns all revisions of specified post.
Source
<?php
function wp_get_post_revisions( $post_id = 0, $args = null ) {
if ( ! WP_POST_REVISIONS )
return array();
if ( ( !$post = get_post( $post_id ) ) || empty( $post->ID ) )
return array();
$defaults = array( 'order' => 'DESC', 'orderby' => 'date' );
$args = wp_parse_args( $args, $defaults );
$args = array_merge( $args, array( 'post_parent' => $post->ID, 'post_type' => 'revision', 'post_status' => 'inherit' ) );
if ( !$revisions = get_children( $args ) )
return array();
return $revisions;
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- WordPress › Support » Displaying post revisions as seperate posts
wp_get_post_revisions() looks like a good starting place. That will return you a list of the revisions of a post as an array of post objects. You should then be able ...
wordpress.org - wp_get_post_revisions (WordPress Function) - WPSeek.com
WordPress lookup for wp_get_post_revisions, a WordPress Function. wpseek. com is a WordPress-centric search tool for developers and theme authors.
wpseek.com - wp_get_post_revisions
Function and Method Cross Reference. wp_get_post_revisions(). Defined at: /wp -includes/post.php -> line 4988. Referenced 3 times: /wp-includes/post.php ...
phpxref.ftwr.co.uk - post.php
Jul 16, 2009 ... wp_get_post_revision(), Gets a post revision. wp_get_post_revisions(), Returns all revisions of specified post. wp_get_post_tags(), Retrieve the ...
www.tig12.net