wp_get_post_autosave [ WordPress Function ]
wp_get_post_autosave ( $post_id )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Soorgelijke functies: wp_create_post_autosave, wp_is_post_autosave, _wp_get_post_autosave_hack, wp_get_post_cats, wp_get_post_tags
Retrieve the autosaved data of the specified post.
Returns a post object containing the information that was autosaved for the specified post.
Source
<?php
function wp_get_post_autosave( $post_id ) {
if ( !$post = get_post( $post_id ) )
return false;
$q = array(
'name' => "{$post->ID}-autosave",
'post_parent' => $post->ID,
'post_type' => 'revision',
'post_status' => 'inherit'
);
// Use WP_Query so that the result gets cached
$autosave_query = new WP_Query;
add_action( 'parse_query', '_wp_get_post_autosave_hack' );
$autosave = $autosave_query->query( $q );
remove_action( 'parse_query', '_wp_get_post_autosave_hack' );
if ( $autosave && is_array($autosave) && is_object($autosave[0]) )
return $autosave[0];
return false;
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- wp_get_post_autosave (WordPress Function) - WPSeek.com
WordPress lookup for wp_get_post_autosave, a WordPress Function. wpseek. com is a WordPress-centric search tool for developers and theme authors.
wpseek.com - wp_get_post_autosave
Function and Method Cross Reference. wp_get_post_autosave(). Defined at: /wp -includes/post.php -> line 4758. Referenced 4 times: /wp-includes/post.php ...
phpxref.ftwr.co.uk - WordPress › Support » Tags — wp_get_post_autosave
Forums. Username or Email Address Password (forgot?) Register · WordPress › Support » wp_get_post_autosave. Tag: wp_get_post_autosave Add New » ...
wordpress.org - post.php
Jul 16, 2009 ... wp_get_post_autosave(), Retrieve the autosaved data of the specified post. wp_get_post_categories(), Retrieve the list of categories for a post.
www.tig12.net