From 8f3e5f16408372ccce99e67b2a71edfeff57d20b Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 4 Feb 2024 18:46:14 +0000 Subject: [PATCH] Coding Standards: Rename the `$ID` parameter to `$post_id` in `trackback()`. This resolves a few WPCS warnings: {{{ Variable "$ID" is not in valid snake_case format, try "$i_d" }}} See #59650. Built from https://develop.svn.wordpress.org/trunk@57530 git-svn-id: http://core.svn.wordpress.org/trunk@57031 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/comment.php | 10 +++++----- wp-includes/version.php | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/wp-includes/comment.php b/wp-includes/comment.php index de23a72130..37d36364ce 100644 --- a/wp-includes/comment.php +++ b/wp-includes/comment.php @@ -3174,10 +3174,10 @@ function privacy_ping_filter( $sites ) { * @param string $trackback_url URL to send trackbacks. * @param string $title Title of post. * @param string $excerpt Excerpt of post. - * @param int $ID Post ID. + * @param int $post_id Post ID. * @return int|false|void Database query from update. */ -function trackback( $trackback_url, $title, $excerpt, $ID ) { +function trackback( $trackback_url, $title, $excerpt, $post_id ) { global $wpdb; if ( empty( $trackback_url ) ) { @@ -3188,7 +3188,7 @@ function trackback( $trackback_url, $title, $excerpt, $ID ) { $options['timeout'] = 10; $options['body'] = array( 'title' => $title, - 'url' => get_permalink( $ID ), + 'url' => get_permalink( $post_id ), 'blog_name' => get_option( 'blogname' ), 'excerpt' => $excerpt, ); @@ -3199,8 +3199,8 @@ function trackback( $trackback_url, $title, $excerpt, $ID ) { return; } - $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->posts SET pinged = CONCAT(pinged, '\n', %s) WHERE ID = %d", $trackback_url, $ID ) ); - return $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->posts SET to_ping = TRIM(REPLACE(to_ping, %s, '')) WHERE ID = %d", $trackback_url, $ID ) ); + $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->posts SET pinged = CONCAT(pinged, '\n', %s) WHERE ID = %d", $trackback_url, $post_id ) ); + return $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->posts SET to_ping = TRIM(REPLACE(to_ping, %s, '')) WHERE ID = %d", $trackback_url, $post_id ) ); } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index 7dc9c6e006..0283e23ede 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.5-alpha-57529'; +$wp_version = '6.5-alpha-57530'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.