mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-04 14:47:02 +00:00
First cut of link category management. Rough and ugly.
git-svn-id: https://develop.svn.wordpress.org/trunk@5654 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -134,7 +134,7 @@ case 'add-link-category' : // On the Fly
|
||||
$cat_name = trim($cat_name);
|
||||
if ( !$slug = sanitize_title($cat_name) )
|
||||
die('0');
|
||||
if ( !$cat_id = category_exists( $cat_name ) ) {
|
||||
if ( !$cat_id = is_term( $cat_name, 'link_category' ) ) {
|
||||
$cat_id = wp_insert_term( $cat_name, 'link_category' );
|
||||
$cat_id = $cat_id['term_id'];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user