wp_get_post_revision [ WordPress Function ]
wp_get_post_revision ( $post, $output = OBJECT, $filter = 'raw' )
| Parameters: |
|
| Uses: |
|
| Returns: |
|
| Defined at: |
|
Benzer Fonksiyonlar: wp_get_post_revisions, wp_save_post_revision, wp_delete_post_revision, _wp_put_post_revision, wp_is_post_revision
Gets a post revision.
Source
<?php
function &wp_get_post_revision(&$post, $output = OBJECT, $filter = 'raw') {
$null = null;
if ( !$revision = get_post( $post, OBJECT, $filter ) )
return $revision;
if ( 'revision' !== $revision->post_type )
return $null;
if ( $output == OBJECT ) {
return $revision;
} elseif ( $output == ARRAY_A ) {
$_revision = get_object_vars($revision);
return $_revision;
} elseif ( $output == ARRAY_N ) {
$_revision = array_values(get_object_vars($revision));
return $_revision;
}
return $revision;
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- wp_get_post_revision (WordPress Function) - WPSeek.com
WordPress lookup for wp_get_post_revision, a WordPress Function. wpseek.com is a WordPress-centric search tool for developers and theme authors.
wpseek.com - wp_get_post_revision
Function and Method Cross Reference. wp_get_post_revision(). Defined at: /wp- includes/post.php -> line 4879. Referenced 8 times: /wp-admin/revision.php ...
phpxref.ftwr.co.uk - 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 - age WordPress * @subpackage Post_Revisions * @since 2.6.0 ...
revision = wp_get_post_revision( $revision_id, ARRAY_A ) ) return $revision; if ( ! is_array( $fields ) ) $fields = array_keys( _wp_post_revision_fields() ); $update ...
slobtostud.com