[wp-trac] [WordPress Trac] #18750: specify post ID for is_page_template

WordPress Trac wp-trac at lists.automattic.com
Thu Sep 22 17:09:40 UTC 2011


#18750: specify post ID for is_page_template
------------------------------------+------------------------------
 Reporter:  billerickson            |       Owner:
     Type:  enhancement             |      Status:  new
 Priority:  normal                  |   Milestone:  Awaiting Review
Component:  General                 |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |
------------------------------------+------------------------------

Comment (by duck_):

 I don't think that this would be the best way of doing this. It seems that
 all you really require is a wrapper around:

 {{{
 get_post_meta( $id, '_wp_page_template', true );
 }}}

 A wrapper function, e.g. get_page_template( $id ), so that you don't have
 to rely on specifying a private meta key (_wp_page_template).

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18750#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list