﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
9702,edit_post_link() ; edit_category_link() ; edit_tags_link(),ramiy,westi,"Just like '''edit_post_link()''', i suggest to add '''edit_category_link()''' and '''edit_tags_link()'''. Those function will be used in themes. They will make an aesy access to admin tag/category edit panel. And link edit_post_link(), only users that have the right authorization will see the links.

----

// Link to edit Categories like the link to edit posts

function edit_category_link($id, $link = 'Edit This', $before = '', $after = '') {
	global $post;
	if ( is_category() ) {
		if ( ! current_user_can('manage_categories', $id) )
			return;
		$location = get_settings('siteurl') . ""/wp-admin/categories.php?action=edit&cat_ID=$id"";
	}
	echo $before . ""<a href=\""$location\"">$link</a>"" . $after;
}



// Link to edit Tags like the link to edit posts

function edit_tags_link($id, $link = 'Edit This', $before = '', $after = '') {
	global $post;
	if ( is_tag() ) {
		if ( ! current_user_can('manage_categories', $id) )
			return;
		$location = get_settings('siteurl') . ""/wp-admin/edit-tags.php?action=edit&tag_ID=$id"";
	}
	echo $before . ""<a href=\""$location\"">$link</a>"" . $after;
}",enhancement,closed,low,3.1,Template,2.7.1,minor,fixed,has-patch,r_a_m_i@… mikeschinkel@… ramiy mcdaniel.isaac
