WordPress.org

Make WordPress Core

Ticket #43406: wp-trackback.diff

File wp-trackback.diff, 1.0 KB (added by GaryJ, 21 months ago)
  • src/wp-trackback.php

    diff --git src/wp-trackback.php src/wp-trackback.php
    index 6bc8495a9f..4c772971f0 100644
    if ( ! empty( $tb_url ) && ! empty( $title ) ) { 
    118118        $title   = wp_html_excerpt( $title, 250, '…' );
    119119        $excerpt = wp_html_excerpt( $excerpt, 252, '…' );
    120120
    121         $comment_post_ID      = (int) $tb_id;
     121        $comment_post_ID      = (int) $tb_id; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.NotSnakeCase
    122122        $comment_author       = $blog_name;
    123123        $comment_author_email = '';
    124124        $comment_author_url   = $tb_url;
    125125        $comment_content      = "<strong>$title</strong>\n\n$excerpt";
    126126        $comment_type         = 'trackback';
    127127
     128        // phpcs:ignore WordPress.NamingConventions.ValidVariableName.NotSnakeCase
    128129        $dupe = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_author_url = %s", $comment_post_ID, $comment_author_url ) );
    129130        if ( $dupe ) {
    130131                trackback_response( 1, __( 'We already have a ping from that URL for this post.' ) );