mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-01 03:04:34 +00:00
Renaming. object and subpost are now attachment. post_type is post_mime_type.
git-svn-id: https://develop.svn.wordpress.org/trunk@3092 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1397,10 +1397,10 @@ function is_page ($page = '') {
|
||||
return false;
|
||||
}
|
||||
|
||||
function is_subpost () {
|
||||
function is_attachment () {
|
||||
global $wp_query;
|
||||
|
||||
return $wp_query->is_subpost;
|
||||
return $wp_query->is_attachment;
|
||||
}
|
||||
|
||||
function is_preview() {
|
||||
@@ -1894,9 +1894,9 @@ function get_single_template() {
|
||||
return get_query_template('single');
|
||||
}
|
||||
|
||||
function get_subpost_template() {
|
||||
function get_attachment_template() {
|
||||
global $posts;
|
||||
$type = explode('/', $posts[0]->post_type);
|
||||
$type = explode('/', $posts[0]->post_mime_type);
|
||||
if ( $template = get_query_template($type[0]) )
|
||||
return $template;
|
||||
elseif ( $template = get_query_template($type[1]) )
|
||||
@@ -1904,7 +1904,7 @@ function get_subpost_template() {
|
||||
elseif ( $template = get_query_template("$type[0]_$type[1]") )
|
||||
return $template;
|
||||
else
|
||||
return get_query_template('subpost');
|
||||
return get_query_template('attachment');
|
||||
}
|
||||
|
||||
function get_comments_popup_template() {
|
||||
|
||||
Reference in New Issue
Block a user