Changeset 24191
- Timestamp:
- 05/07/2013 06:44:22 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post-template.php
r24175 r24191 1276 1276 * @since 3.4.0 1277 1277 * 1278 * @param int $post_id The page ID to check. Defaults to the current post, when used in the loop.1278 * @param int $post_id Optional. The page ID to check. Defaults to the current post, when used in the loop. 1279 1279 * @return string|bool Page template filename. Returns an empty string when the default page template 1280 1280 * is in use. Returns false if the post is not a page. … … 1282 1282 function get_page_template_slug( $post_id = null ) { 1283 1283 $post = get_post( $post_id ); 1284 if ( 'page' != $post->post_type )1284 if ( ! $post || 'page' != $post->post_type ) 1285 1285 return false; 1286 1286 $template = get_post_meta( $post->ID, '_wp_page_template', true );
Note: See TracChangeset
for help on using the changeset viewer.