Make WordPress Core

Changeset 5654


Ignore:
Timestamp:
06/05/2007 05:08:27 AM (18 years ago)
Author:
ryan
Message:

First cut of link category management. Rough and ugly.

Location:
trunk/wp-admin
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-ajax.php

    r5637 r5654  
    135135        if ( !$slug = sanitize_title($cat_name) )
    136136            die('0');
    137         if ( !$cat_id = category_exists( $cat_name ) ) {
     137        if ( !$cat_id = is_term( $cat_name, 'link_category' ) ) {
    138138            $cat_id = wp_insert_term( $cat_name, 'link_category' );
    139139            $cat_id = $cat_id['term_id'];
  • trunk/wp-admin/categories.php

    r5528 r5654  
    3636    if ( $cat_ID == get_option('default_category') )
    3737        wp_die(sprintf(__("Can&#8217;t delete the <strong>%s</strong> category: this is the default one"), $cat_name));
    38 
    39     if ( $cat_ID == get_option('default_link_category') )
    40         wp_die(sprintf(__("Can&#8217;t delete the <strong>%s</strong> category: this is the default one for links"), $cat_name));
    4138
    4239    wp_delete_category($cat_ID);
     
    114111<?php if ( current_user_can('manage_categories') ) : ?>
    115112<div class="wrap">
    116 <p><?php printf(__('<strong>Note:</strong><br />Deleting a category does not delete the posts and links in that category. Instead, posts that were only assigned to the deleted category are set to the category <strong>%s</strong> and links that were only assigned to the deleted category are set to <strong>%s</strong>.'), apply_filters('the_category', get_catname(get_option('default_category'))), apply_filters('the_category', get_catname(get_option('default_link_category')))) ?></p>
     113<p><?php printf(__('<strong>Note:</strong><br />Deleting a category does not delete the posts in that category. Instead, posts that were only assigned to the deleted category are set to the category <strong>%s</strong>.'), apply_filters('the_category', get_catname(get_option('default_category')))) ?></p>
    117114</div>
    118115
  • trunk/wp-admin/menu.php

    r5401 r5654  
    4747$submenu['link-manager.php'][10] = array(__('Add Link'), 'manage_links', 'link-add.php');
    4848$submenu['link-manager.php'][20] = array(__('Import Links'), 'manage_links', 'link-import.php');
     49$submenu['link-manager.php'][30] = array(__('Categories'), 'manage_links', 'edit-link-categories.php');
    4950
    5051if ( current_user_can('edit_users') ) {
Note: See TracChangeset for help on using the changeset viewer.