Not a developer? Go to MovableType.com

Documentation

TBPingThrottleFilter

This callback is invoked as soon as a new TrackBack ping has been received. If the callback returns false (zero), then the ping will be discarded and the Movable Type will output an error page about throttling. When more than one TBPingThrottleFilter are chained together, the ping is discarded unless all callbacks return true.

Input Parameters

  • $cb - a reference to the current MT::Callback object handling this event.
  • $app - the MT::App::Trackback object, whose interface is documented in MT::App::Comments
  • $trackback - the TrackBack to which the ping is being sent. The MT::TrackBack object will contain a reference to the entry, page or category a ping is in direct relation to.

Return Value

A boolean (true/false) value. If any TrackBack throttle filter callback returns false (zero), the corresponding TrackBack ping will not be saved in the database, and Movable Type will return an error to the service sending the ping about their ping being “throttled.”

Example Handler

sub comment_throttle_filter {
    my ($cb, $app, $trackback) = @_;
    my $entry = $trackback->entry();
    # do something
}

You will notice that a reference to the TrackBack is passed to this callback. A “TrackBack” is technically the node within the system that is eligible to receive pings. This abstraction layer exists because pings can technically be associated with entries, pages and categories.

Back