[wp-trac] [WordPress Trac] #41025: get_comment_text and comment_text do not return the same result.

WordPress Trac noreply at wordpress.org
Tue Jun 13 16:22:08 UTC 2017


#41025: get_comment_text and comment_text do not return the same result.
--------------------------+------------------------------
 Reporter:  BackuPs       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:  4.8
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by BackuPs):

 @swissspidy I dont understand what has running before hand of the filter
 comment_text todo with the fact the comment_text() returns


 {{{
 line 1

 line 2

 line 3
 }}}



 whereas get_comment_text()  returns


 {{{
 line 1  line 2 line 3
 }}}

 The similar thing does not happen in the_content() get_the_content()as
 they both return as far as i know


 {{{
 line 1

 line 2

 line 3
 }}}

 Can you explain more as both functions comment_text() and
 get_comment_text() call the filter and is till dont understand the
 difference in result.

 comment_text does the echo of the comment whereas using get_comment_text
 returns the string. But that string should be exactly the same without any
 difference in the text.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/41025#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list