Closed (fixed)
Project:
Meta tags quick
Version:
7.x-2.0-beta1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
12 Jul 2011 at 00:59 UTC
Updated:
28 Jul 2011 at 20:11 UTC
On the page to edit taxonomy terms, the "Edit Meta Tags" tab is present, because its path doesn't start with 'admin'. metatags_quick_menu_local_tasks_alter() looks for 'admin' to prevent the tab on admin pages. Suggest altering that function or _metatags_quick_path_based_page() to also exclude the taxonomy term edit page to prevent confusion from users thinking that tab is used to edit the taxonomy SEO terms rather than the terms for the taxonomy edit page.
Comments
Comment #1
valthebaldIs there a good way to determine either we are in an admin page?
Comment #2
cwithout commentedI was hoping you'd know. :) After a little searching, I think I found what you need. Did a quick test, and it returned true for admin paths I tested (admin/config, admin/structure/views), taxonomy term edit, and node edit.
path_is_admin()
or
path_get_admin_paths()
I believe path_is_admin() will do the job. That should take care of any paths defined as admin paths by their modules using hook_admin_paths(). That hands it off to the other modules to make sure their admin paths are defined without having to make exceptions for them all within this one.
Comment #3
valthebaldYes, this looks fine. Thanks for pointing!
Comment #4
valthebald