Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




get_post_to_edit [ WordPress Function ]

get_post_to_edit ( $id )
Parameters:
  • (unknown_type) $id
Returns:
  • (unknown)
Defined at:



Get an existing post and format it for editing.

Source


<?php
function get_post_to_edit$id ) {

    
$post get_post$idOBJECT'edit' );

    if ( 
$post->post_type == 'page' )
        
$post->page_template get_post_meta$id'_wp_page_template'true );

    return 
$post;
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics