Remove debug
git-svn-id: https://develop.svn.wordpress.org/trunk@5272 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
424a7906c0
commit
5519b22a3c
|
@ -94,7 +94,7 @@ function wp_insert_category($catarr) {
|
||||||
$update = true;
|
$update = true;
|
||||||
else
|
else
|
||||||
$update = false;
|
$update = false;
|
||||||
error_log("Type for $cat_ID is $type", 0);
|
|
||||||
$cat_name = apply_filters('pre_category_name', $cat_name);
|
$cat_name = apply_filters('pre_category_name', $cat_name);
|
||||||
|
|
||||||
if (empty ($category_nicename))
|
if (empty ($category_nicename))
|
||||||
|
@ -295,13 +295,10 @@ function wp_create_tag($tag_name) {
|
||||||
$tag_array = array('cat_name' => $tag_name, 'type' => TAXONOMY_TAG);
|
$tag_array = array('cat_name' => $tag_name, 'type' => TAXONOMY_TAG);
|
||||||
|
|
||||||
if ( $id = category_object_exists($tag_name) ) {
|
if ( $id = category_object_exists($tag_name) ) {
|
||||||
error_log("$tag_name exists", 0);
|
|
||||||
$category = get_category($id);
|
$category = get_category($id);
|
||||||
$tag_array['type'] = $category->type | $tag_array['type'];
|
$tag_array['type'] = $category->type | $tag_array['type'];
|
||||||
$tag_array['cat_ID'] = $id;
|
$tag_array['cat_ID'] = $id;
|
||||||
error_log("Type: {$tag_array['type']}", 0);
|
|
||||||
$id = wp_update_category($tag_array);
|
$id = wp_update_category($tag_array);
|
||||||
error_log("Tag id $id", 0);
|
|
||||||
return $id;
|
return $id;
|
||||||
} else {
|
} else {
|
||||||
return wp_insert_category($tag_array);
|
return wp_insert_category($tag_array);
|
||||||
|
|
Loading…
Reference in New Issue