Make WordPress Core


Ignore:
Timestamp:
08/28/2012 07:08:28 PM (12 years ago)
Author:
ryan
Message:

Add tags_input, page_template, and post_category get magic to WP_Post.
Deprecate get_post_to_edit() and wp_get_single_post().
Props scribu
see #21309

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/post.php

    r21598 r21651  
    465465
    466466/**
    467  * Get an existing post and format it for editing.
    468  *
    469  * @since 2.0.0
    470  *
    471  * @param int $id
    472  * @return WP_Post
    473  */
    474 function get_post_to_edit( $id ) {
    475 
    476     $post = get_post( $id, OBJECT, 'edit' );
    477 
    478     if ( $post->post_type == 'page' )
    479         $post->page_template = get_post_meta( $id, '_wp_page_template', true );
    480 
    481     return $post;
    482 }
    483 
    484 /**
    485467 * Determine if a post exists based on title, content, and date
    486468 *
     
    929911 * Executes a query for attachments. An array of WP_Query arguments
    930912 * can be passed in, which will override the arguments set by this function.
    931  * 
     913 *
    932914 * @since 2.5.0
    933915 * @uses apply_filters() Calls 'upload_per_page' on posts_per_page argument
Note: See TracChangeset for help on using the changeset viewer.