Closed lop-cz closed 12 years ago
Hmm, I thought I tried that and it didn't work, I'll check again. Might have been related to some of may earlier experimenting before I used jQuery to fix the menu highlighting.
Oh, I forgot to mention there's also missing the argument '&post_type=attachment' in query string for "Manage taxonomy" link. (Line 221 and 250 in admin.php) Also the "Manage" string should be passed through gettext call to enable translation.
Sorry for mentioning it this way but I'm new to GitHub and don't know how to properly commit patches.
----- Original Message ----- From: Ben Huson
reply@reply.github.com To: lop-cz lop@lop.cz Date: Thu, 19 Apr 2012 11:13:48 -0700 Subject: Re: [attachment-taxonomy-support] No need to redirect to taxonomy page (#2)
Hmm, I thought I tried that and it didn't work, I'll check again. Might have been related to some of may earlier experimenting before I used jQuery to fix the menu highlighting.
Reply to this email directly or view it on GitHub:
https://github.com/benhuson/attachment-taxonomy-support/issues/2#issuecomment-5228289
Have made these fixes.
The previous add_submenu_page works with a bit of tweaking and I was able to remove the redirect, however it also create some issues in earlier versions of WordPress 3.x that I had to fix.
Can you try downloading the latest development version on GitHub to test? https://github.com/benhuson/attachment-taxonomy-support/zipball/master
Changelog can be seen here: https://github.com/benhuson/attachment-taxonomy-support/commits/master
Seems to be working fine. At least in WP 3.3.1. Thanks
Just the load_plugin_textdomain should be called on init for translations.
Thanks, missed that - was making those changes late last night :)
I have just reviewed your new v1.1 code and I think you don't have to use that redirect thing in admin_init function. If you specify menu page as this:
you don't have to use page callback at all. And a little modification in admin.js is needed also.
BTW I was also trying to figure out how to correctly highlight the menu item, but jQuery seems to do the trick. Thanks.