Coding Standards: Improve variable names in wp-trackback.php.

This fixes a `Variable "$comment_post_ID" is not in valid snake_case format` WPCS warning.

`$comment_post_ID`, while matching the database field of the same name, does not follow the WordPress coding standards, so the variable is now renamed to `$comment_post_id`.

Additionally, these variables are renamed for clarity:

* `$tb_id` to `$post_id` (this was not the trackback ID)
* `$tb_url` to `$trackback_url`

Follow-up to [172], [637], [1616], 

See #55647, #56244.
Built from https://develop.svn.wordpress.org/trunk@53719


git-svn-id: http://core.svn.wordpress.org/trunk@53278 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov
2022-07-19 14:02:10 +00:00
parent fdcb34fad3
commit f14f6a162a
3 changed files with 45 additions and 26 deletions

View File

@@ -1146,9 +1146,9 @@ function comment_type( $commenttxt = false, $trackbacktxt = false, $pingbacktxt
*/
function get_trackback_url() {
if ( get_option( 'permalink_structure' ) ) {
$tb_url = trailingslashit( get_permalink() ) . user_trailingslashit( 'trackback', 'single_trackback' );
$trackback_url = trailingslashit( get_permalink() ) . user_trailingslashit( 'trackback', 'single_trackback' );
} else {
$tb_url = get_option( 'siteurl' ) . '/wp-trackback.php?p=' . get_the_ID();
$trackback_url = get_option( 'siteurl' ) . '/wp-trackback.php?p=' . get_the_ID();
}
/**
@@ -1156,9 +1156,9 @@ function get_trackback_url() {
*
* @since 2.2.0
*
* @param string $tb_url The trackback URL.
* @param string $trackback_url The trackback URL.
*/
return apply_filters( 'trackback_url', $tb_url );
return apply_filters( 'trackback_url', $trackback_url );
}
/**