diff --git a/includes/class-hashtag.php b/includes/class-hashtag.php index a50c6c5..8f2d8d9 100644 --- a/includes/class-hashtag.php +++ b/includes/class-hashtag.php @@ -60,7 +60,7 @@ class Hashtag { */ public static function replace_with_links( $result ) { $tag = $result[1]; - $tag_object = get_term_by( 'name', $result[1], 'post_tag' ); + $tag_object = get_term_by( 'name', $tag, 'post_tag' ); if ( $tag_object ) { $link = get_term_link( $tag_object, 'post_tag' ); diff --git a/tests/test-class-activitypub-hashtag.php b/tests/test-class-activitypub-hashtag.php index ed7e428..0820100 100644 --- a/tests/test-class-activitypub-hashtag.php +++ b/tests/test-class-activitypub-hashtag.php @@ -15,7 +15,7 @@ class Test_Activitypub_Hashtag extends WP_UnitTestCase { public function the_content_provider() { $object = get_term_by( 'name', 'object', 'post_tag' ); - $link = get_tag_link( $object ); + $link = get_term_link( $object, 'post_tag' ); return array( array( 'test', 'test' ),