Skip to content

Commit

Permalink
Code cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanbohacek committed Feb 12, 2023
1 parent ff06452 commit b374b78
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions includes/newonbotwiki.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,20 +160,13 @@ public function post_update( $new_status, $old_status, $post ) {
}

} elseif ( $post->post_type === 'resource' ){
$post_id = $post->ID;

$post_terms = wp_get_post_terms( $post->ID, 'resource_type' );
$term = $post_terms[0];
$resource_type = strtolower( $term->name );
$resource_type_slug = strtolower( $term->slug );

log_this(array(
'post' => $post,
'post_terms' => $post_terms,
'term' => $term,
'resource_type' => $resource_type,
'resource_type_slug' => $resource_type_slug,
));

$resource_url = get_post_meta( $post_id, 'resource_url', true );

if ( empty( $resource_url ) ){
Expand Down

0 comments on commit b374b78

Please sign in to comment.