Changeset 3801

Show
Ignore:
Timestamp:
05/26/06 22:47:55 (2 years ago)
Author:
ryan
Message:

Add some category filters.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/2.0/wp-admin/admin-db.php

    r3350 r3801  
    9393        $update = false; 
    9494 
    95     $cat_name = wp_specialchars($cat_name); 
    96  
     95    $cat_name = apply_filters('pre_category_name', $cat_name); 
     96    $category_nicename = apply_filters('pre_category_nicename', $category_nicename); 
     97    $category_description = apply_filters('pre_category_description', $category_description); 
     98     
    9799    if (empty ($category_nicename)) 
    98100        $category_nicename = sanitize_title($cat_name); 
     
    103105        $category_description = ''; 
    104106 
     107    $category_parent = (int) $category_parent; 
    105108    if (empty ($category_parent)) 
    106109        $category_parent = 0; 
  • branches/2.0/wp-includes/default-filters.php

    r3009 r3801  
    5050add_filter('comment_excerpt', 'convert_chars'); 
    5151 
     52// Categories 
     53add_filter('pre_category_name', 'strip_tags'); 
     54add_filter('pre_category_name', 'trim'); 
     55add_filter('pre_category_name', 'wp_filter_kses'); 
     56add_filter('pre_category_name', 'wp_specialchars', 30); 
     57add_filter('pre_category_description', 'wp_filter_kses'); 
     58 
    5259// Places to balance tags on input 
    5360add_filter('content_save_pre', 'balanceTags', 50);