Hide Logout in Comments Section

Okay, so a theme’s comments.php has a method call that links to the below line of code (i think…:wink::

'must_log_in' => '<p class="must-log-in">' . sprintf( __( 'You must be <a href="%s">logged in</a> to post a comment.' ), wp_login_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '</p>',

— from /wp-includes/comment-template.php

To change the log-in URL called from the above code, I replaced the below code from comments.php

<?php comment_form() ?>


comment_form(array('must_log_in'=>"You must be <a href='...'>logged in</a> to post a comment."));

The “…” represents a full URL that was purposefully not included in this forum post. That code change was used to change the login URL, because i’m not using the wp-login.php one.

I am trying to apply the same logic to the below line of code from the php file in the wp-includes directory:

'logged_in_as' => '<p class="logged-in-as">' . sprintf( __( 'Logged in as <a href="%1$s">%2$s</a>. <a href="%3$s" title="Log out of this account">Log out?</a>' ), get_edit_user_link(), $user_identity, wp_logout_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '</p>',

That message is only displayed when a user is logged in and looking at comments section. Would someone provide instructions as per how to hide that message entirely (the logout-related one)? Looking for a theme change or functions.php or bp-custom.php, pls no core changes

Please respond ASAP. Thanks!