Custom Post Type Archives – v1.5
Hi and my apologies for not fixing this in time. If you update your WordPress install to version 3.1 and you use the Custom Post Type Archives plugin then you would see the “Cannot redeclare is_post_type_archive()” fatal error and your WordPress install wouldn’t work. I’ve pushed the newest update live and that should fix this problem. The plugin version that fixes it is v1.5 and it should be available on plugins WordPress page.
To fix this I had to change the ‘is_post_type_archive’ function name in this plugin to ‘pta_is_post_type_archive’. This means that if you use this function somewhere in your theme (or in some of your plugins where you rely on Custom Post Type Archives plugin), then you should change those function calls to call the correct function -> ‘pta_is_post_type_archive’. Basically just prefix the function name with ‘pta_’. If you don’t do this then something won’t work as expected, because, WordPress’s implemented function won’t return correct results if you use this plugin.
If you have a WordPress install before v3.1 then ‘is_post_type_archive’ function will still be available and it will just redirect every call to ‘pta_is_post_type_archive’.
The reason why this huge bug happened was because WordPress 3.1 introduces it’s own custom post type archives and they use the same function name which I used in my plugin -> ‘is_post_type_archive’.
Since WordPress v3.1 can create custom post type archives by itself, then you don’t really need this plugin. However I do believe that this plugin can give more flexibility than WordPress’s implementation so really it’s up to you if you wan’t to continue using this plugin or not – I would be very happy if you still found this plugin useful.
Plugin should still work as before in WP 3.1, but if you see any other bugs then please do notify me and I will try to fix it.
I will have to think about this plugins future since WordPress has it’s own implementation of similar functionality, but I think that will still try to update this plugin as I believe that there are many more features that could be useful for you (and me).
Wishing you all the best with blogging, developing and everything else!
Some say...
What can you say?