What hook are you using for the function which contains the snippet above?
Not exactly a hook, but it’s in a plugin. Basically this:
In __construct
add_action('admin_init',array($this,'init') );
In init
wp_enqueue_media();
Right now I fixed it by doing:
global $pagenow;
if ($pagenow != 'post.php' && $pagenow != 'post-new.php')
{ wp_enqueue_media();
}
But it’s not a very nice solution of course.
Use pastebin.com and let me see the entire contents of your file. If you don’t mind, of course.
SVN
Or if you want to whole plugin here: Simple Category Icons 🙂
Thanks!
Okay.. I’ve been looking through your code, getting an idea of how things work.
I’m assuming this replaces the little ‘folder’ icon when viewing categories. If that is correct, it’s actually not replacing the icons on my theme on my test site.
I went through and assigned the icon to the category (which I can confirm from the little icon in the “Icon” column of the categories page).
However, it doesn’t seem to replace the generic folder icon on the front-end of the site.
I’m not sure if this is related or not.. but thought I should mention.
I have to run to class. I’ll be back in a few hours, and will get back with you then!
Good luck until then 🙂
Folder icon? No the idea is you can get icons in your theme based on terms of the post ( look at the_icon and get_the_icon functions 😉 )