mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Add some category filters.
git-svn-id: https://develop.svn.wordpress.org/trunk@3799 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -92,8 +92,10 @@ function wp_insert_category($catarr) {
|
||||
else
|
||||
$update = false;
|
||||
|
||||
$cat_name = wp_specialchars($cat_name);
|
||||
|
||||
$cat_name = apply_filters('pre_category_name', $cat_name);
|
||||
$category_nicename = apply_filters('pre_category_nicename', $category_nicename);
|
||||
$category_description = apply_filters('pre_category_description', $category_description);
|
||||
|
||||
if (empty ($category_nicename))
|
||||
$category_nicename = sanitize_title($cat_name);
|
||||
else
|
||||
@@ -102,6 +104,7 @@ function wp_insert_category($catarr) {
|
||||
if (empty ($category_description))
|
||||
$category_description = '';
|
||||
|
||||
$category_parent = (int) $category_parent;
|
||||
if (empty ($category_parent))
|
||||
$category_parent = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user