Skip to content

Commit 9b21204

Browse files
committed
Coding Standards: Rename arguments in comment_type().
Rename the arguments in `comment_type()` to use underscore separators per coding standards and to add vowels for clarity. "Pingback" and "Trackback" in the variable names are left unchanged as they are concatenated for display to site owners. See #63168. git-svn-id: https://develop.svn.wordpress.org/trunk@60779 602fd350-edb4-49c9-b593-d223f7449a82
1 parent d64970a commit 9b21204

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/wp-includes/comment-template.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,30 +1180,30 @@ function get_comment_type( $comment_id = 0 ) {
11801180
*
11811181
* @since 0.71
11821182
*
1183-
* @param string|false $commenttxt Optional. String to display for comment type. Default false.
1184-
* @param string|false $trackbacktxt Optional. String to display for trackback type. Default false.
1185-
* @param string|false $pingbacktxt Optional. String to display for pingback type. Default false.
1183+
* @param string|false $comment_text Optional. String to display for comment type. Default false.
1184+
* @param string|false $trackback_text Optional. String to display for trackback type. Default false.
1185+
* @param string|false $pingback_text Optional. String to display for pingback type. Default false.
11861186
*/
1187-
function comment_type( $commenttxt = false, $trackbacktxt = false, $pingbacktxt = false ) {
1188-
if ( false === $commenttxt ) {
1189-
$commenttxt = _x( 'Comment', 'noun' );
1187+
function comment_type( $comment_text = false, $trackback_text = false, $pingback_text = false ) {
1188+
if ( false === $comment_text ) {
1189+
$comment_text = _x( 'Comment', 'noun' );
11901190
}
1191-
if ( false === $trackbacktxt ) {
1192-
$trackbacktxt = __( 'Trackback' );
1191+
if ( false === $trackback_text ) {
1192+
$trackback_text = __( 'Trackback' );
11931193
}
1194-
if ( false === $pingbacktxt ) {
1195-
$pingbacktxt = __( 'Pingback' );
1194+
if ( false === $pingback_text ) {
1195+
$pingback_text = __( 'Pingback' );
11961196
}
11971197
$type = get_comment_type();
11981198
switch ( $type ) {
11991199
case 'trackback':
1200-
echo $trackbacktxt;
1200+
echo $trackback_text;
12011201
break;
12021202
case 'pingback':
1203-
echo $pingbacktxt;
1203+
echo $pingback_text;
12041204
break;
12051205
default:
1206-
echo $commenttxt;
1206+
echo $comment_text;
12071207
}
12081208
}
12091209

0 commit comments

Comments
 (0)