Add some filtering. Props jhodgdon. see #4516

git-svn-id: https://develop.svn.wordpress.org/trunk@5998 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2007-08-31 23:55:56 +00:00
parent 7cfadec3fa
commit c6cef97007
5 changed files with 36 additions and 23 deletions

View File

@@ -117,6 +117,14 @@ function cat_is_ancestor_of($cat1, $cat2) {
return cat_is_ancestor_of($cat1, get_category($cat2->parent));
}
function sanitize_category($category, $context = 'display') {
return sanitize_term($category, 'category', $context);
}
function sanitize_category_field($field, $value, $cat_id, $context) {
return sanitize_term_field($field, $value, $cat_id, 'category', $context);
}
// Tags
function &get_tags($args = '') {