<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[55308] trunk/src/wp-includes: Coding Standards: Rename `$comment_ID` variable to `$comment_id` in various files.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/55308">55308</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/55308","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>SergeyBiryukov</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2023-02-12 18:06:33 +0000 (Sun, 12 Feb 2023)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Coding Standards: Rename `$comment_ID` variable to `$comment_id` in various files.
This resolves 80+ WPCS warnings in core:
{{{
Variable "$comment_ID" is not in valid snake_case format
}}}
While matching the database field of the same name, the `$comment_ID` variable did not follow the WordPress coding standards, and is now renamed to address that.
This affects:
* Function parameters in:
* `get_comment_author()`
* `comment_author()`
* `get_comment_author_email()`
* `comment_author_email()`
* `get_comment_author_link()`
* `comment_author_link()`
* `get_comment_author_IP()`
* `comment_author_IP()`
* `get_comment_author_rl()`
* `comment_author_url()`
* `get_comment_date()`
* `comment_date()`
* `get_comment_excerpt()`
* `comment_excerpt()`
* `get_comment_text()`
* `comment_text()`
* `get_comment_time()`
* `comment_time()`
* `get_comment_type()`
* `get_page_of_comment()`
* `wp_new_comment_notify_moderator()`
* `wp_new_comment_notify_postauthor()`
* `get_commentdata()`
* Internal variables in:
* `get_comment_ID()`
* `wp_new_comment()`
* `wp_xmlrpc_server::wp_deleteComment()`
* `wp_xmlrpc_server::wp_editComment()`
* `wp_xmlrpc_server::wp_newComment()`
* `wp_xmlrpc_server::pingback_ping()`
* Hook parameters in:
* `get_comment_author`
* `comment_author`
* `get_comment_author_email`
* `author_email`
* `get_comment_author_link`
* `get_comment_author_IP`
* `get_comment_author_url`
* `comment_url`
* `get_comment_excerpt`
* `comment_excerpt`
* `get_comment_ID`
* `get_comment_type`
* `get_page_of_comment`
* `comment_{$new_status}_{$comment->comment_type}`
* `comment_post`
* `notify_moderator`
* `notify_post_author`
* `commentrss2_item`
* `xmlrpc_call_success_wp_deleteComment`
* `xmlrpc_call_success_wp_editComment`
* `xmlrpc_call_success_wp_newComment`
* `pingback_post`
Note: The name change only affects variable names and DocBlocks.
The change does not affect:
* `comment_ID` as the `$orderby` value in `WP_Comment_Query::__construct()`
* `comment_ID` as the `$orderby` value in `WP_Comment::get_children()`
* `comment_ID` as part of `$commentarr` parameter in `wp_update_comment()`
The associated array keys still match the database field.
Follow-up to <a href="https://core.trac.wordpress.org/changeset/53723">[53723]</a>.
Props krunal265, costdev, SergeyBiryukov.
Fixes <a href="https://core.trac.wordpress.org/ticket/57671">#57671</a>. See <a href="https://core.trac.wordpress.org/ticket/56791">#56791</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpincludesclasswpxmlrpcserverphp">trunk/src/wp-includes/class-wp-xmlrpc-server.php</a></li>
<li><a href="#trunksrcwpincludescommenttemplatephp">trunk/src/wp-includes/comment-template.php</a></li>
<li><a href="#trunksrcwpincludescommentphp">trunk/src/wp-includes/comment.php</a></li>
<li><a href="#trunksrcwpincludesdeprecatedphp">trunk/src/wp-includes/deprecated.php</a></li>
<li><a href="#trunksrcwpincludesfeedrss2commentsphp">trunk/src/wp-includes/feed-rss2-comments.php</a></li>
<li><a href="#trunksrcwpincludespluggablephp">trunk/src/wp-includes/pluggable.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpincludesclasswpxmlrpcserverphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/class-wp-xmlrpc-server.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-xmlrpc-server.php 2023-02-11 17:37:30 UTC (rev 55307)
+++ trunk/src/wp-includes/class-wp-xmlrpc-server.php 2023-02-12 18:06:33 UTC (rev 55308)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3720,7 +3720,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $username = $args[1];
</span><span class="cx" style="display: block; padding: 0 10px"> $password = $args[2];
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $comment_ID = (int) $args[3];
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $comment_id = (int) $args[3];
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $user = $this->login( $username, $password );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! $user ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3727,11 +3727,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! get_comment( $comment_ID ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! get_comment( $comment_id ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return new IXR_Error( 404, __( 'Invalid comment ID.' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! current_user_can( 'edit_comment', $comment_ID ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! current_user_can( 'edit_comment', $comment_id ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return new IXR_Error( 403, __( 'Sorry, you are not allowed to delete this comment.' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3738,7 +3738,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
</span><span class="cx" style="display: block; padding: 0 10px"> do_action( 'xmlrpc_call', 'wp.deleteComment', $args, $this );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $status = wp_delete_comment( $comment_ID );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $status = wp_delete_comment( $comment_id );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $status ) {
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3746,10 +3746,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.4.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param int $comment_ID ID of the deleted comment.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param int $comment_id ID of the deleted comment.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param array $args An array of arguments to delete the comment.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- do_action( 'xmlrpc_call_success_wp_deleteComment', $comment_ID, $args ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.NotLowercase
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ do_action( 'xmlrpc_call_success_wp_deleteComment', $comment_id, $args ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.NotLowercase
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> return $status;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3787,7 +3787,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $username = $args[1];
</span><span class="cx" style="display: block; padding: 0 10px"> $password = $args[2];
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $comment_ID = (int) $args[3];
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $comment_id = (int) $args[3];
</ins><span class="cx" style="display: block; padding: 0 10px"> $content_struct = $args[4];
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $user = $this->login( $username, $password );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3795,11 +3795,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! get_comment( $comment_ID ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! get_comment( $comment_id ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return new IXR_Error( 404, __( 'Invalid comment ID.' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! current_user_can( 'edit_comment', $comment_ID ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! current_user_can( 'edit_comment', $comment_id ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return new IXR_Error( 403, __( 'Sorry, you are not allowed to moderate or edit this comment.' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3806,7 +3806,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
</span><span class="cx" style="display: block; padding: 0 10px"> do_action( 'xmlrpc_call', 'wp.editComment', $args, $this );
</span><span class="cx" style="display: block; padding: 0 10px"> $comment = array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'comment_ID' => $comment_ID,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'comment_ID' => $comment_id,
</ins><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( isset( $content_struct['status'] ) ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3858,10 +3858,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.4.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param int $comment_ID ID of the updated comment.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param int $comment_id ID of the updated comment.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param array $args An array of arguments to update the comment.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- do_action( 'xmlrpc_call_success_wp_editComment', $comment_ID, $args ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.NotLowercase
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ do_action( 'xmlrpc_call_success_wp_editComment', $comment_id, $args ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.NotLowercase
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> return true;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3999,12 +3999,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
</span><span class="cx" style="display: block; padding: 0 10px"> do_action( 'xmlrpc_call', 'wp.newComment', $args, $this );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $comment_ID = wp_new_comment( $comment, true );
- if ( is_wp_error( $comment_ID ) ) {
- return new IXR_Error( 403, $comment_ID->get_error_message() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $comment_id = wp_new_comment( $comment, true );
+ if ( is_wp_error( $comment_id ) ) {
+ return new IXR_Error( 403, $comment_id->get_error_message() );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $comment_ID ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! $comment_id ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return new IXR_Error( 403, __( 'Something went wrong.' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4013,12 +4013,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.4.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param int $comment_ID ID of the new comment.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param int $comment_id ID of the new comment.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param array $args An array of new comment arguments.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- do_action( 'xmlrpc_call_success_wp_newComment', $comment_ID, $args ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.NotLowercase
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ do_action( 'xmlrpc_call_success_wp_newComment', $comment_id, $args ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.NotLowercase
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- return $comment_ID;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ return $comment_id;
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -7040,10 +7040,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'remote_source_original'
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $comment_ID = wp_new_comment( $commentdata );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $comment_id = wp_new_comment( $commentdata );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( is_wp_error( $comment_ID ) ) {
- return $this->pingback_error( 0, $comment_ID->get_error_message() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( is_wp_error( $comment_id ) ) {
+ return $this->pingback_error( 0, $comment_id->get_error_message() );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -7051,9 +7051,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 0.71
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param int $comment_ID Comment ID.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param int $comment_id Comment ID.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- do_action( 'pingback_post', $comment_ID );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ do_action( 'pingback_post', $comment_id );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /* translators: 1: URL of the page linked from, 2: URL of the page linked to. */
</span><span class="cx" style="display: block; padding: 0 10px"> return sprintf( __( 'Pingback from %1$s to %2$s registered. Keep the web talking! :-)' ), $pagelinkedfrom, $pagelinkedto );
</span></span></pre></div>
<a id="trunksrcwpincludescommenttemplatephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/comment-template.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/comment-template.php 2023-02-11 17:37:30 UTC (rev 55307)
+++ trunk/src/wp-includes/comment-template.php 2023-02-12 18:06:33 UTC (rev 55308)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -15,15 +15,15 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * assumed.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 1.5.0
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 4.4.0 Added the ability for `$comment_id` to also accept a WP_Comment object.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param int|WP_Comment $comment_ID Optional. WP_Comment or the ID of the comment for which to retrieve the author.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param int|WP_Comment $comment_id Optional. WP_Comment or the ID of the comment for which to retrieve the author.
</ins><span class="cx" style="display: block; padding: 0 10px"> * Default current comment.
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string The comment author
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function get_comment_author( $comment_ID = 0 ) {
- $comment = get_comment( $comment_ID );
- $comment_ID = ! empty( $comment->comment_ID ) ? $comment->comment_ID : $comment_ID;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function get_comment_author( $comment_id = 0 ) {
+ $comment = get_comment( $comment_id );
+ $comment_id = ! empty( $comment->comment_ID ) ? $comment->comment_ID : $comment_id;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( empty( $comment->comment_author ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $user = ! empty( $comment->user_id ) ? get_userdata( $comment->user_id ) : false;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -40,13 +40,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Filters the returned comment author name.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 1.5.0
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since 4.1.0 The `$comment_ID` and `$comment` parameters were added.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 4.1.0 The `$comment_id` and `$comment` parameters were added.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $author The comment author's username.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param string $comment_ID The comment ID as a numeric string.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param string $comment_id The comment ID as a numeric string.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param WP_Comment $comment The comment object.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- return apply_filters( 'get_comment_author', $author, $comment_ID, $comment );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ return apply_filters( 'get_comment_author', $author, $comment_id, $comment );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -53,13 +53,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Displays the author of the current comment.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 0.71
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 4.4.0 Added the ability for `$comment_id` to also accept a WP_Comment object.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param int|WP_Comment $comment_ID Optional. WP_Comment or the ID of the comment for which to print the author.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param int|WP_Comment $comment_id Optional. WP_Comment or the ID of the comment for which to print the author.
</ins><span class="cx" style="display: block; padding: 0 10px"> * Default current comment.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function comment_author( $comment_ID = 0 ) {
- $comment = get_comment( $comment_ID );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function comment_author( $comment_id = 0 ) {
+ $comment = get_comment( $comment_id );
</ins><span class="cx" style="display: block; padding: 0 10px"> $author = get_comment_author( $comment );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -66,10 +66,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Filters the comment author's name for display.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 1.2.0
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since 4.1.0 The `$comment_ID` parameter was added.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 4.1.0 The `$comment_id` parameter was added.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $author The comment author's username.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param string $comment_ID The comment ID as a numeric string.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param string $comment_id The comment ID as a numeric string.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> echo apply_filters( 'comment_author', $author, $comment->comment_ID );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -78,23 +78,23 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Retrieves the email of the author of the current comment.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 1.5.0
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 4.4.0 Added the ability for `$comment_id` to also accept a WP_Comment object.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param int|WP_Comment $comment_ID Optional. WP_Comment or the ID of the comment for which to get the author's email.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param int|WP_Comment $comment_id Optional. WP_Comment or the ID of the comment for which to get the author's email.
</ins><span class="cx" style="display: block; padding: 0 10px"> * Default current comment.
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string The current comment author's email
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function get_comment_author_email( $comment_ID = 0 ) {
- $comment = get_comment( $comment_ID );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function get_comment_author_email( $comment_id = 0 ) {
+ $comment = get_comment( $comment_id );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Filters the comment author's returned email address.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 1.5.0
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since 4.1.0 The `$comment_ID` and `$comment` parameters were added.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 4.1.0 The `$comment_id` and `$comment` parameters were added.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $comment_author_email The comment author's email address.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param string $comment_ID The comment ID as a numeric string.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param string $comment_id The comment ID as a numeric string.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param WP_Comment $comment The comment object.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> return apply_filters( 'get_comment_author_email', $comment->comment_author_email, $comment->comment_ID, $comment );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -110,13 +110,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * address and use it for their own means good and bad.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 0.71
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 4.4.0 Added the ability for `$comment_id` to also accept a WP_Comment object.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param int|WP_Comment $comment_ID Optional. WP_Comment or the ID of the comment for which to print the author's email.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param int|WP_Comment $comment_id Optional. WP_Comment or the ID of the comment for which to print the author's email.
</ins><span class="cx" style="display: block; padding: 0 10px"> * Default current comment.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function comment_author_email( $comment_ID = 0 ) {
- $comment = get_comment( $comment_ID );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function comment_author_email( $comment_id = 0 ) {
+ $comment = get_comment( $comment_id );
</ins><span class="cx" style="display: block; padding: 0 10px"> $author_email = get_comment_author_email( $comment );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -123,10 +123,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Filters the comment author's email for display.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 1.2.0
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since 4.1.0 The `$comment_ID` parameter was added.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 4.1.0 The `$comment_id` parameter was added.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $author_email The comment author's email address.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param string $comment_ID The comment ID as a numeric string.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param string $comment_id The comment ID as a numeric string.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> echo apply_filters( 'author_email', $author_email, $comment->comment_ID );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -208,18 +208,18 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Retrieves the HTML link to the URL of the author of the current comment.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * Both get_comment_author_url() and get_comment_author() rely on get_comment(),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * which falls back to the global comment variable if the $comment_ID argument is empty.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * which falls back to the global comment variable if the $comment_id argument is empty.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 1.5.0
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 4.4.0 Added the ability for `$comment_id` to also accept a WP_Comment object.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param int|WP_Comment $comment_ID Optional. WP_Comment or the ID of the comment for which to get the author's link.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param int|WP_Comment $comment_id Optional. WP_Comment or the ID of the comment for which to get the author's link.
</ins><span class="cx" style="display: block; padding: 0 10px"> * Default current comment.
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string The comment author name or HTML link for author's URL.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function get_comment_author_link( $comment_ID = 0 ) {
- $comment = get_comment( $comment_ID );
- $comment_ID = ! empty( $comment->comment_ID ) ? $comment->comment_ID : (string) $comment_ID;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function get_comment_author_link( $comment_id = 0 ) {
+ $comment = get_comment( $comment_id );
+ $comment_id = ! empty( $comment->comment_ID ) ? $comment->comment_ID : (string) $comment_id;
</ins><span class="cx" style="display: block; padding: 0 10px"> $url = get_comment_author_url( $comment );
</span><span class="cx" style="display: block; padding: 0 10px"> $author = get_comment_author( $comment );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -263,14 +263,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Filters the comment author's link for display.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 1.5.0
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since 4.1.0 The `$author` and `$comment_ID` parameters were added.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 4.1.0 The `$author` and `$comment_id` parameters were added.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $return The HTML-formatted comment author link.
</span><span class="cx" style="display: block; padding: 0 10px"> * Empty for an invalid URL.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $author The comment author's username.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param string $comment_ID The comment ID as a numeric string.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param string $comment_id The comment ID as a numeric string.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- return apply_filters( 'get_comment_author_link', $return, $author, $comment_ID );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ return apply_filters( 'get_comment_author_link', $return, $author, $comment_id );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -277,13 +277,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Displays the HTML link to the URL of the author of the current comment.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 0.71
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 4.4.0 Added the ability for `$comment_id` to also accept a WP_Comment object.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param int|WP_Comment $comment_ID Optional. WP_Comment or the ID of the comment for which to print the author's link.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param int|WP_Comment $comment_id Optional. WP_Comment or the ID of the comment for which to print the author's link.
</ins><span class="cx" style="display: block; padding: 0 10px"> * Default current comment.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function comment_author_link( $comment_ID = 0 ) {
- echo get_comment_author_link( $comment_ID );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function comment_author_link( $comment_id = 0 ) {
+ echo get_comment_author_link( $comment_id );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -290,23 +290,23 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Retrieves the IP address of the author of the current comment.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 1.5.0
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 4.4.0 Added the ability for `$comment_id` to also accept a WP_Comment object.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param int|WP_Comment $comment_ID Optional. WP_Comment or the ID of the comment for which to get the author's IP address.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param int|WP_Comment $comment_id Optional. WP_Comment or the ID of the comment for which to get the author's IP address.
</ins><span class="cx" style="display: block; padding: 0 10px"> * Default current comment.
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string Comment author's IP address, or an empty string if it's not available.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function get_comment_author_IP( $comment_ID = 0 ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
- $comment = get_comment( $comment_ID );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function get_comment_author_IP( $comment_id = 0 ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
+ $comment = get_comment( $comment_id );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Filters the comment author's returned IP address.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 1.5.0
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since 4.1.0 The `$comment_ID` and `$comment` parameters were added.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 4.1.0 The `$comment_id` and `$comment` parameters were added.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $comment_author_ip The comment author's IP address, or an empty string if it's not available.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param string $comment_ID The comment ID as a numeric string.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param string $comment_id The comment ID as a numeric string.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param WP_Comment $comment The comment object.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> return apply_filters( 'get_comment_author_IP', $comment->comment_author_IP, $comment->comment_ID, $comment ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.NotLowercase
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -316,13 +316,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Displays the IP address of the author of the current comment.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 0.71
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 4.4.0 Added the ability for `$comment_id` to also accept a WP_Comment object.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param int|WP_Comment $comment_ID Optional. WP_Comment or the ID of the comment for which to print the author's IP address.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param int|WP_Comment $comment_id Optional. WP_Comment or the ID of the comment for which to print the author's IP address.
</ins><span class="cx" style="display: block; padding: 0 10px"> * Default current comment.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function comment_author_IP( $comment_ID = 0 ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
- echo esc_html( get_comment_author_IP( $comment_ID ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function comment_author_IP( $comment_id = 0 ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
+ echo esc_html( get_comment_author_IP( $comment_id ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -329,14 +329,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Retrieves the URL of the author of the current comment, not linked.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 1.5.0
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 4.4.0 Added the ability for `$comment_id` to also accept a WP_Comment object.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param int|WP_Comment $comment_ID Optional. WP_Comment or the ID of the comment for which to get the author's URL.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param int|WP_Comment $comment_id Optional. WP_Comment or the ID of the comment for which to get the author's URL.
</ins><span class="cx" style="display: block; padding: 0 10px"> * Default current comment.
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string Comment author URL, if provided, an empty string otherwise.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function get_comment_author_url( $comment_ID = 0 ) {
- $comment = get_comment( $comment_ID );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function get_comment_author_url( $comment_id = 0 ) {
+ $comment = get_comment( $comment_id );
</ins><span class="cx" style="display: block; padding: 0 10px"> $url = '';
</span><span class="cx" style="display: block; padding: 0 10px"> $id = 0;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -350,10 +350,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Filters the comment author's URL.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 1.5.0
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since 4.1.0 The `$comment_ID` and `$comment` parameters were added.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 4.1.0 The `$comment_id` and `$comment` parameters were added.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $url The comment author's URL, or an empty string.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param string|int $comment_ID The comment ID as a numeric string, or 0 if not found.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param string|int $comment_id The comment ID as a numeric string, or 0 if not found.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param WP_Comment|null $comment The comment object, or null if not found.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> return apply_filters( 'get_comment_author_url', $url, $id, $comment );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -363,13 +363,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Displays the URL of the author of the current comment, not linked.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 0.71
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 4.4.0 Added the ability for `$comment_id` to also accept a WP_Comment object.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param int|WP_Comment $comment_ID Optional. WP_Comment or the ID of the comment for which to print the author's URL.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param int|WP_Comment $comment_id Optional. WP_Comment or the ID of the comment for which to print the author's URL.
</ins><span class="cx" style="display: block; padding: 0 10px"> * Default current comment.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function comment_author_url( $comment_ID = 0 ) {
- $comment = get_comment( $comment_ID );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function comment_author_url( $comment_id = 0 ) {
+ $comment = get_comment( $comment_id );
</ins><span class="cx" style="display: block; padding: 0 10px"> $author_url = get_comment_author_url( $comment );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -376,10 +376,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Filters the comment author's URL for display.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 1.2.0
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since 4.1.0 The `$comment_ID` parameter was added.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 4.1.0 The `$comment_id` parameter was added.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $author_url The comment author's URL.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param string $comment_ID The comment ID as a numeric string.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param string $comment_id The comment ID as a numeric string.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> echo apply_filters( 'comment_url', $author_url, $comment->comment_ID );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -575,15 +575,15 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Retrieves the comment date of the current comment.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 1.5.0
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 4.4.0 Added the ability for `$comment_id` to also accept a WP_Comment object.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $format Optional. PHP date format. Defaults to the 'date_format' option.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param int|WP_Comment $comment_ID Optional. WP_Comment or ID of the comment for which to get the date.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param int|WP_Comment $comment_id Optional. WP_Comment or ID of the comment for which to get the date.
</ins><span class="cx" style="display: block; padding: 0 10px"> * Default current comment.
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string The comment's date.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function get_comment_date( $format = '', $comment_ID = 0 ) {
- $comment = get_comment( $comment_ID );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function get_comment_date( $format = '', $comment_id = 0 ) {
+ $comment = get_comment( $comment_id );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $_format = ! empty( $format ) ? $format : get_option( 'date_format' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -605,14 +605,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Displays the comment date of the current comment.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 0.71
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 4.4.0 Added the ability for `$comment_id` to also accept a WP_Comment object.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $format Optional. PHP date format. Defaults to the 'date_format' option.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param int|WP_Comment $comment_ID WP_Comment or ID of the comment for which to print the date.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param int|WP_Comment $comment_id WP_Comment or ID of the comment for which to print the date.
</ins><span class="cx" style="display: block; padding: 0 10px"> * Default current comment.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function comment_date( $format = '', $comment_ID = 0 ) {
- echo get_comment_date( $format, $comment_ID );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function comment_date( $format = '', $comment_id = 0 ) {
+ echo get_comment_date( $format, $comment_id );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -621,14 +621,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Returns a maximum of 20 words with an ellipsis appended if necessary.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 1.5.0
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 4.4.0 Added the ability for `$comment_id` to also accept a WP_Comment object.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param int|WP_Comment $comment_ID Optional. WP_Comment or ID of the comment for which to get the excerpt.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param int|WP_Comment $comment_id Optional. WP_Comment or ID of the comment for which to get the excerpt.
</ins><span class="cx" style="display: block; padding: 0 10px"> * Default current comment.
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string The possibly truncated comment excerpt.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function get_comment_excerpt( $comment_ID = 0 ) {
- $comment = get_comment( $comment_ID );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function get_comment_excerpt( $comment_id = 0 ) {
+ $comment = get_comment( $comment_id );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! post_password_required( $comment->comment_post_ID ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $comment_text = strip_tags( str_replace( array( "\n", "\r" ), ' ', $comment->comment_content ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -654,10 +654,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Filters the retrieved comment excerpt.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 1.5.0
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since 4.1.0 The `$comment_ID` and `$comment` parameters were added.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 4.1.0 The `$comment_id` and `$comment` parameters were added.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $excerpt The comment excerpt text.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param string $comment_ID The comment ID as a numeric string.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param string $comment_id The comment ID as a numeric string.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param WP_Comment $comment The comment object.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> return apply_filters( 'get_comment_excerpt', $excerpt, $comment->comment_ID, $comment );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -667,13 +667,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Displays the excerpt of the current comment.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 1.2.0
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 4.4.0 Added the ability for `$comment_id` to also accept a WP_Comment object.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param int|WP_Comment $comment_ID Optional. WP_Comment or ID of the comment for which to print the excerpt.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param int|WP_Comment $comment_id Optional. WP_Comment or ID of the comment for which to print the excerpt.
</ins><span class="cx" style="display: block; padding: 0 10px"> * Default current comment.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function comment_excerpt( $comment_ID = 0 ) {
- $comment = get_comment( $comment_ID );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function comment_excerpt( $comment_id = 0 ) {
+ $comment = get_comment( $comment_id );
</ins><span class="cx" style="display: block; padding: 0 10px"> $comment_excerpt = get_comment_excerpt( $comment );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -680,10 +680,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Filters the comment excerpt for display.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 1.2.0
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since 4.1.0 The `$comment_ID` parameter was added.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 4.1.0 The `$comment_id` parameter was added.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $comment_excerpt The comment excerpt text.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param string $comment_ID The comment ID as a numeric string.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param string $comment_id The comment ID as a numeric string.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> echo apply_filters( 'comment_excerpt', $comment_excerpt, $comment->comment_ID );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -697,7 +697,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function get_comment_ID() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
</span><span class="cx" style="display: block; padding: 0 10px"> $comment = get_comment();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $comment_ID = ! empty( $comment->comment_ID ) ? $comment->comment_ID : '0';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $comment_id = ! empty( $comment->comment_ID ) ? $comment->comment_ID : '0';
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Filters the returned comment ID.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -705,10 +705,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 1.5.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.1.0 The `$comment` parameter was added.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param string $comment_ID The current comment ID as a numeric string.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param string $comment_id The current comment ID as a numeric string.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param WP_Comment $comment The comment object.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- return apply_filters( 'get_comment_ID', $comment_ID, $comment ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.NotLowercase
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ return apply_filters( 'get_comment_ID', $comment_id, $comment ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.NotLowercase
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -985,18 +985,18 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Retrieves the text of the current comment.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 1.5.0
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 4.4.0 Added the ability for `$comment_id` to also accept a WP_Comment object.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @since 5.4.0 Added 'In reply to %s.' prefix to child comments in comments feed.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @see Walker_Comment::comment()
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param int|WP_Comment $comment_ID Optional. WP_Comment or ID of the comment for which to get the text.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param int|WP_Comment $comment_id Optional. WP_Comment or ID of the comment for which to get the text.
</ins><span class="cx" style="display: block; padding: 0 10px"> * Default current comment.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $args Optional. An array of arguments. Default empty array.
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string The comment content.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function get_comment_text( $comment_ID = 0, $args = array() ) {
- $comment = get_comment( $comment_ID );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function get_comment_text( $comment_id = 0, $args = array() ) {
+ $comment = get_comment( $comment_id );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $comment_content = $comment->comment_content;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1032,16 +1032,16 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Displays the text of the current comment.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 0.71
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 4.4.0 Added the ability for `$comment_id` to also accept a WP_Comment object.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @see Walker_Comment::comment()
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param int|WP_Comment $comment_ID Optional. WP_Comment or ID of the comment for which to print the text.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param int|WP_Comment $comment_id Optional. WP_Comment or ID of the comment for which to print the text.
</ins><span class="cx" style="display: block; padding: 0 10px"> * Default current comment.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $args Optional. An array of arguments. Default empty array.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function comment_text( $comment_ID = 0, $args = array() ) {
- $comment = get_comment( $comment_ID );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function comment_text( $comment_id = 0, $args = array() ) {
+ $comment = get_comment( $comment_id );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $comment_text = get_comment_text( $comment, $args );
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1062,18 +1062,18 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Retrieves the comment time of the current comment.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 1.5.0
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since 6.2.0 Added the `$comment_ID` parameter.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 6.2.0 Added the `$comment_id` parameter.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $format Optional. PHP date format. Defaults to the 'time_format' option.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param bool $gmt Optional. Whether to use the GMT date. Default false.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param bool $translate Optional. Whether to translate the time (for use in feeds).
</span><span class="cx" style="display: block; padding: 0 10px"> * Default true.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param int|WP_Comment $comment_ID Optional. WP_Comment or ID of the comment for which to get the time.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param int|WP_Comment $comment_id Optional. WP_Comment or ID of the comment for which to get the time.
</ins><span class="cx" style="display: block; padding: 0 10px"> * Default current comment.
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string The formatted time.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function get_comment_time( $format = '', $gmt = false, $translate = true, $comment_ID = 0 ) {
- $comment = get_comment( $comment_ID );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function get_comment_time( $format = '', $gmt = false, $translate = true, $comment_id = 0 ) {
+ $comment = get_comment( $comment_id );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( null === $comment ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return '';
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1103,14 +1103,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Displays the comment time of the current comment.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 0.71
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since 6.2.0 Added the `$comment_ID` parameter.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 6.2.0 Added the `$comment_id` parameter.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $format Optional. PHP time format. Defaults to the 'time_format' option.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param int|WP_Comment $comment_ID Optional. WP_Comment or ID of the comment for which to get the time.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param int|WP_Comment $comment_id Optional. WP_Comment or ID of the comment for which to print the time.
</ins><span class="cx" style="display: block; padding: 0 10px"> * Default current comment.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function comment_time( $format = '', $comment_ID = 0 ) {
- echo get_comment_time( $format, $comment_ID );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function comment_time( $format = '', $comment_id = 0 ) {
+ echo get_comment_time( $format, $comment_id );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1117,14 +1117,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Retrieves the comment type of the current comment.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 1.5.0
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 4.4.0 Added the ability for `$comment_id` to also accept a WP_Comment object.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param int|WP_Comment $comment_ID Optional. WP_Comment or ID of the comment for which to get the type.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param int|WP_Comment $comment_id Optional. WP_Comment or ID of the comment for which to get the type.
</ins><span class="cx" style="display: block; padding: 0 10px"> * Default current comment.
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string The comment type.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function get_comment_type( $comment_ID = 0 ) {
- $comment = get_comment( $comment_ID );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function get_comment_type( $comment_id = 0 ) {
+ $comment = get_comment( $comment_id );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( '' === $comment->comment_type ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $comment->comment_type = 'comment';
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1134,10 +1134,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Filters the returned comment type.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 1.5.0
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since 4.1.0 The `$comment_ID` and `$comment` parameters were added.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 4.1.0 The `$comment_id` and `$comment` parameters were added.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $comment_type The type of comment, such as 'comment', 'pingback', or 'trackback'.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param string $comment_ID The comment ID as a numeric string.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param string $comment_id The comment ID as a numeric string.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param WP_Comment $comment The comment object.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> return apply_filters( 'get_comment_type', $comment->comment_type, $comment->comment_ID, $comment );
</span></span></pre></div>
<a id="trunksrcwpincludescommentphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/comment.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/comment.php 2023-02-11 17:37:30 UTC (rev 55307)
+++ trunk/src/wp-includes/comment.php 2023-02-12 18:06:33 UTC (rev 55308)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1039,7 +1039,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @global wpdb $wpdb WordPress database abstraction object.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param int $comment_ID Comment ID.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param int $comment_id Comment ID.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param array $args {
</span><span class="cx" style="display: block; padding: 0 10px"> * Array of optional arguments.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1049,17 +1049,17 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @type int $per_page Per-page count to use when calculating pagination.
</span><span class="cx" style="display: block; padding: 0 10px"> * Defaults to the value of the 'comments_per_page' option.
</span><span class="cx" style="display: block; padding: 0 10px"> * @type int|string $max_depth If greater than 1, comment page will be determined
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * for the top-level parent `$comment_ID`.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * for the top-level parent `$comment_id`.
</ins><span class="cx" style="display: block; padding: 0 10px"> * Defaults to the value of the 'thread_comments_depth' option.
</span><span class="cx" style="display: block; padding: 0 10px"> * } *
</span><span class="cx" style="display: block; padding: 0 10px"> * @return int|null Comment page number or null on error.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function get_page_of_comment( $comment_ID, $args = array() ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function get_page_of_comment( $comment_id, $args = array() ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> global $wpdb;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $page = null;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $comment = get_comment( $comment_ID );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $comment = get_comment( $comment_id );
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( ! $comment ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1175,7 +1175,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Filters the calculated page on which a comment appears.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.4.0
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since 4.7.0 Introduced the `$comment_ID` parameter.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 4.7.0 Introduced the `$comment_id` parameter.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $page Comment page.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $args {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1196,9 +1196,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @type int $per_page Number of comments per page.
</span><span class="cx" style="display: block; padding: 0 10px"> * @type int $max_depth Maximum comment threading depth allowed.
</span><span class="cx" style="display: block; padding: 0 10px"> * }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param int $comment_ID ID of the comment.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param int $comment_id ID of the comment.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- return apply_filters( 'get_page_of_comment', (int) $page, $args, $original_args, $comment_ID );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ return apply_filters( 'get_page_of_comment', (int) $page, $args, $original_args, $comment_id );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1837,7 +1837,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 2.7.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param string $comment_ID The comment ID as a numeric string.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param string $comment_id The comment ID as a numeric string.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param WP_Comment $comment Comment object.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> do_action( "comment_{$new_status}_{$comment->comment_type}", $comment->comment_ID, $comment );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2281,9 +2281,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return $commentdata['comment_approved'];
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $comment_ID = wp_insert_comment( $commentdata );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $comment_id = wp_insert_comment( $commentdata );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $comment_ID ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! $comment_id ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $fields = array( 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $fields as $field ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2299,8 +2299,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return $commentdata['comment_approved'];
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $comment_ID = wp_insert_comment( $commentdata );
- if ( ! $comment_ID ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $comment_id = wp_insert_comment( $commentdata );
+ if ( ! $comment_id ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2311,13 +2311,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 1.2.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.5.0 The `$commentdata` parameter was added.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param int $comment_ID The comment ID.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param int $comment_id The comment ID.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param int|string $comment_approved 1 if the comment is approved, 0 if not, 'spam' if spam.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $commentdata Comment data.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- do_action( 'comment_post', $comment_ID, $commentdata['comment_approved'], $commentdata );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ do_action( 'comment_post', $comment_id, $commentdata['comment_approved'], $commentdata );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- return $comment_ID;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ return $comment_id;
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2325,23 +2325,23 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.4.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param int $comment_ID ID of the comment.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param int $comment_id ID of the comment.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @return bool True on success, false on failure.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function wp_new_comment_notify_moderator( $comment_ID ) {
- $comment = get_comment( $comment_ID );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function wp_new_comment_notify_moderator( $comment_id ) {
+ $comment = get_comment( $comment_id );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Only send notifications for pending comments.
</span><span class="cx" style="display: block; padding: 0 10px"> $maybe_notify = ( '0' == $comment->comment_approved );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /** This filter is documented in wp-includes/comment.php */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $maybe_notify = apply_filters( 'notify_moderator', $maybe_notify, $comment_ID );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $maybe_notify = apply_filters( 'notify_moderator', $maybe_notify, $comment_id );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! $maybe_notify ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- return wp_notify_moderator( $comment_ID );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ return wp_notify_moderator( $comment_id );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2352,11 +2352,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Uses the {@see 'notify_post_author'} filter to determine whether the post author
</span><span class="cx" style="display: block; padding: 0 10px"> * should be notified when a new comment is added, overriding site setting.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param int $comment_ID Comment ID.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param int $comment_id Comment ID.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @return bool True on success, false on failure.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function wp_new_comment_notify_postauthor( $comment_ID ) {
- $comment = get_comment( $comment_ID );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function wp_new_comment_notify_postauthor( $comment_id ) {
+ $comment = get_comment( $comment_id );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $maybe_notify = get_option( 'comments_notify' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2367,9 +2367,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.4.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param bool $maybe_notify Whether to notify the post author about the new comment.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param int $comment_ID The ID of the comment for the notification.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param int $comment_id The ID of the comment for the notification.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $maybe_notify = apply_filters( 'notify_post_author', $maybe_notify, $comment_ID );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $maybe_notify = apply_filters( 'notify_post_author', $maybe_notify, $comment_id );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /*
</span><span class="cx" style="display: block; padding: 0 10px"> * wp_notify_postauthor() checks if notifying the author of their own comment.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2384,7 +2384,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- return wp_notify_postauthor( $comment_ID );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ return wp_notify_postauthor( $comment_id );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span></span></pre></div>
<a id="trunksrcwpincludesdeprecatedphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/deprecated.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/deprecated.php 2023-02-11 17:37:30 UTC (rev 55307)
+++ trunk/src/wp-includes/deprecated.php 2023-02-12 18:06:33 UTC (rev 55308)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1225,20 +1225,20 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Retrieve an array of comment data about comment $comment_ID.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Retrieve an array of comment data about comment $comment_id.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 0.71
</span><span class="cx" style="display: block; padding: 0 10px"> * @deprecated 2.7.0 Use get_comment()
</span><span class="cx" style="display: block; padding: 0 10px"> * @see get_comment()
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param int $comment_ID The ID of the comment
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param int $comment_id The ID of the comment
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param int $no_cache Whether to use the cache (cast to bool)
</span><span class="cx" style="display: block; padding: 0 10px"> * @param bool $include_unapproved Whether to include unapproved comments
</span><span class="cx" style="display: block; padding: 0 10px"> * @return array The comment data
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function get_commentdata( $comment_ID, $no_cache = 0, $include_unapproved = false ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function get_commentdata( $comment_id, $no_cache = 0, $include_unapproved = false ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> _deprecated_function( __FUNCTION__, '2.7.0', 'get_comment()' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- return get_comment($comment_ID, ARRAY_A);
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ return get_comment($comment_id, ARRAY_A);
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span></span></pre></div>
<a id="trunksrcwpincludesfeedrss2commentsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/feed-rss2-comments.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/feed-rss2-comments.php 2023-02-11 17:37:30 UTC (rev 55307)
+++ trunk/src/wp-includes/feed-rss2-comments.php 2023-02-12 18:06:33 UTC (rev 55308)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -110,8 +110,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 2.1.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param int $comment_ID The ID of the comment being displayed.
- * @param int $ID The ID of the post the comment is connected to.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param int $comment_id The ID of the comment being displayed.
+ * @param int $comment_post_id The ID of the post the comment is connected to.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> do_action( 'commentrss2_item', $comment->comment_ID, $comment_post->ID );
</span><span class="cx" style="display: block; padding: 0 10px"> ?>
</span></span></pre></div>
<a id="trunksrcwpincludespluggablephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/pluggable.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/pluggable.php 2023-02-11 17:37:30 UTC (rev 55307)
+++ trunk/src/wp-includes/pluggable.php 2023-02-12 18:06:33 UTC (rev 55308)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1875,7 +1875,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.4.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param bool $maybe_notify Whether to notify blog moderator.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param int $comment_ID The id of the comment for the notification.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param int $comment_id The ID of the comment for the notification.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> $maybe_notify = apply_filters( 'notify_moderator', $maybe_notify, $comment_id );
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre>
</div>
</div>
</body>
</html>