diff --git a/classes/LBRY_Network_Publisher.php b/classes/LBRY_Network_Publisher.php index 3e52a0d..33bc443 100644 --- a/classes/LBRY_Network_Publisher.php +++ b/classes/LBRY_Network_Publisher.php @@ -9,7 +9,7 @@ class LBRY_Network_Publisher { /** * Publish the post to the LBRY Network - * @param int $post_id The ID of the post we are publishing + * @param WP_POST $post_id The ID of the post we are publishing * @param string $channel The Claim ID of the channel we are posting to */ // NOTE: This is currently sitting at about 150ms, mostly the post parsing @@ -50,6 +50,16 @@ class LBRY_Network_Publisher $args['thumbnail_url'] = $featured_image[0]; } + // Setup Tags + $tags = get_the_terms( $post, 'post_tag' ); + if ($tags) { + $tag_names = []; + foreach ($tags as $tag) { + $tag_names[] = $tag->name; + } + $args['tags'] = $tag_names; + } + // Build description using Yoast if installed and its used, excerpt/title otherwise $description = false; if (class_exists('WPSEO_META')) {