Open sharmashivanand opened 7 years ago
This is really two different enhancements.
Edit Link:
The first is an edit term link. I'm not sure what advantages this has over the core WP edit_term_link()
function other than the addition of a class attribute. See: https://developer.wordpress.org/reference/functions/edit_term_link/
If the functionality didn't already exist, I think that'd be a good addition to HC.
View Link:
The second enhancement is to the core WP admin. It's not directly related to theme development. It would also fall under plugin territory under the WordPress.org theme review guidelines. So, it's probably going to be a non-starter for that reason alone.
So get_edit_term_link outputs something like https://www.example.com/wp-admin/term.php?taxonomy&tag_ID=14&post_type=post
As against get_edit_tag_link which gives https://www.example.com/wp-admin/term.php?taxonomy=category&tag_ID=14&post_type=post
The difference is that the previous link breaks functionality (Yoast meta box on terms and other meta boxes were missing (unless taxonomy=category is present in the url) ). You can try that on any test installation to see if the HC layout meta boxes appear on the term edit screen.
Currently I'm putting the Term Edit Link in the theme and the View Link in a plugin.
So get_edit_term_link outputs something like https://www.example.com/wp-admin/term.php?taxonomy&tag_ID=14&post_type=post
This looks like a core bug, it says to default to the taxonomy of the object but it never adds taxonomy to URL unless argument is passed explicitly. Should be reported on trac rather than re-invented. :)
Yep, that should be reported here: https://core.trac.wordpress.org
Guess we found a bug during a feature request :)
BTW do you find the utility of having the Edit Term link useful? (It's easy to change the layout, access the Yoast metabox etc. so I thought why not suggest it)
I think the edit term link can be useful. I use the WP toolbar on the front end myself, which shows the edit link. But, for people who don't, it could be a welcome addition in a theme.
I find it tremendously helpful to have an 'Edit Term' link on the taxonomy / tag / cat archive view.
Also I find it very helpful to have a 'View Term' link on the tax / tag / cat edit screen.
Not sure if it will make it to the code but I believe it's one of those small utility things which make HC special.
Display Term Edit Link on Archive Title / header (insert own hook)
Display View Term link on the edit screen: