wppaste
WordPress

apply_filters( 'wp_auto_approve_ping', bool $approve_pingback, int $source_id, string $url )

Since
7.1.0
Filters whether a pingback is approved without being held for moderation.

Description

Defaults to true for pingbacks originating from a published post on the same site, and false for every other pingback. Trackbacks are never considered, as they cannot be verified.

Compatibility

WordPress
since 7.1.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in 1 of the 5 tracked releases, added in 7.1.0.

Parameters

$approve_pingbackbool
Whether to auto-approve the pingback.
$source_idint
ID of the post on this site the pingback originated from, or 0 if it came from elsewhere.
$urlstring
The URL the pingback was sent from.

Where this hook fires · 1

  • wp-includes/comment.php:197check_comment()

Source code

			 *			 * @param bool   $approve_pingback Whether to auto-approve the pingback.			 * @param int    $source_id        ID of the post on this site the pingback			 *                                 originated from, or 0 if it came from elsewhere.			 * @param string $url              The URL the pingback was sent from.			 */			return (bool) apply_filters( 'wp_auto_approve_ping', $approve_pingback, $source_id, $url );		} else {			return false;		}	}	return true;}

Changelog

Introduced in 7.1.0.

Signature, return type and hooks compared across 1 parsed release.

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.