Make WordPress Core

Ticket #37007: 37007.2.diff

File 37007.2.diff, 944 bytes (added by dshanske, 8 years ago)

Improvements suggested by @rachelbaker

  • src/wp-trackback.php

    diff --git src/wp-trackback.php src/wp-trackback.php
    index 3d21104..2cbc93b 100644
    $title = isset($_POST['title']) ? wp_unslash($_POST['title']) : ''; 
    5757$excerpt   = isset($_POST['excerpt'])   ? wp_unslash($_POST['excerpt'])    : '';
    5858$blog_name = isset($_POST['blog_name']) ? wp_unslash($_POST['blog_name'])  : '';
    5959
     60/**
     61* Fires before the trackback is triggered to allow for disabling trackbacks
     62* or a function to act as the handler.
     63*
     64* @since 4.7.0
     65*
     66* @param string $tb_url Trackback URL.
     67* @param string $charset Character Set.
     68* @param string $title Trackback Title.
     69* @param string $excerpt Trackback Excerpt.
     70* @param string $blog_name Blog Name.
     71*
     72*/
     73do_action( 'pre_trackback_post', $tb_url, $charset, $title, $excerpt, $blog_name );
     74
    6075if ($charset)
    6176        $charset = str_replace( array(',', ' '), '', strtoupper( trim($charset) ) );
    6277else