From 15555bdd31826bc4f8143b6d5cc08a9e1ce3cdb3 Mon Sep 17 00:00:00 2001 From: Django Doucet Date: Sat, 4 Nov 2023 00:03:42 -0600 Subject: [PATCH] rename get_id method to generate_id --- includes/transformer/class-comment.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/transformer/class-comment.php b/includes/transformer/class-comment.php index 8dcb74b..fe060d4 100644 --- a/includes/transformer/class-comment.php +++ b/includes/transformer/class-comment.php @@ -63,7 +63,7 @@ class Comment { $comment = $this->wp_comment; $object = new Base_Object(); - $object->set_id( $this->get_id( $comment ) ); + $object->set_id( $this->generate_id( $comment ) ); $object->set_url( \get_comment_link( $comment->ID ) ); $object->set_type( 'Note' ); @@ -148,7 +148,7 @@ class Comment { $in_reply_to = $this->get_source_id( $parent_comment ); if ( ! $in_reply_to ) { //local - $in_reply_to = $this->get_id( $parent_comment ); + $in_reply_to = $this->generate_id( $parent_comment ); } } else { $pretty_permalink = \get_post_meta( $comment->comment_post_ID, 'activitypub_canonical_url', true ); @@ -170,7 +170,7 @@ class Comment { * https://www.w3.org/TR/activitypub/#obj-id * https://github.com/tootsuite/mastodon/issues/13879 */ - protected function get_id( $comment ) { + protected function generate_id( $comment ) { $comment = \get_comment( $comment ); $ap_comment_id = \add_query_arg(