mennake / thematic

Automatically exported from code.google.com/p/thematic
0 stars 0 forks source link

thematic_is_custom_post_type() returns true on attachment pages #144

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Attachment pages are treated like custom post types since 
thematic_is_custom_post_type() is only checking whether the post is of type 
'post' or 'page'.

This might be intentional but I would suggest to instead check if the post type 
is builtin or not (which means also excluding 'nav_menu_item', 'revision', and 
'attachment' post types). In addition, this would be future proof for any post 
types that might make it into wordpress core in the future.

Original issue reported on code.google.com by invistr...@gmail.com on 11 Feb 2012 at 2:31

Attachments:

GoogleCodeExporter commented 9 years ago
Totally correct. I've only been holding off on committing this because this 
function may be deprecated.

It is currently only used in thematic_body_class() if that goes filter this is 
no longer needed.

Original comment by eugene.m...@gmail.com on 17 Feb 2012 at 12:14

GoogleCodeExporter commented 9 years ago
r842 

we may still  deprecate that function later

Original comment by eugene.m...@gmail.com on 17 Feb 2012 at 1:56

GoogleCodeExporter commented 9 years ago
FWIW, it's also used in thematic_postfooter for determining the post type 
archive link, in thematic_postmeta_authorlink that is brought up in issue 143, 
and in thematic_page_title for compatibility with WP < 3.1.  

I would consider keeping it, even if body classes goes the filter route.

Original comment by invistr...@gmail.com on 17 Feb 2012 at 10:07

GoogleCodeExporter commented 9 years ago
Of course... Face Palm

Original comment by g...@emhr.info on 17 Feb 2012 at 5:35