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
This commit is contained in:
Sergey Biryukov 2024-02-04 18:46:14 +00:00
parent 0865d6ec9d
commit 8f3e5f1640
2 changed files with 6 additions and 6 deletions

View File

@ -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 ) );
}
/**

View File

@ -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.