Skip to content
Snippets Groups Projects
Commit e98e90bc authored by Jackreichert's avatar Jackreichert
Browse files

Logic fix

Removing negative conditions.
parent e9317e3c
No related branches found
No related tags found
No related merge requests found
......@@ -224,16 +224,16 @@ class Syndication_WP_RSS_Client extends SimplePie implements Syndication_Client
$ids['cats'][] = $result->term_id;
}
} else {
if ( ! $result = get_term_by( 'name', $cat->term, 'post_tag' ) ) {
if ( $result = get_term_by( 'name', $cat->term, 'post_tag' ) ) {
if ( isset( $result->term_id ) ) {
$ids['tags'][] = $result->term_id;
}
} else {
// creates if not
$result = wp_insert_term( $cat->term, 'category' );
if ( isset( $result->term_id ) ) {
$ids['cats'][] = $result->term_id;
}
} else {
if ( isset( $result->term_id ) ) {
$ids['tags'][] = $result->term_id;
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment