Title: wp_auto_approve_ping
Published: August 20, 2026

---

# apply_filters( ‘wp_auto_approve_ping’, bool $approve_pingback, int $source_id, string $url )

## In this article

 * [Description](https://developer.wordpress.org/reference/hooks/wp_auto_approve_ping/?output_format=md#description)
 * [Parameters](https://developer.wordpress.org/reference/hooks/wp_auto_approve_ping/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/wp_auto_approve_ping/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/wp_auto_approve_ping/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/wp_auto_approve_ping/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/wp_auto_approve_ping/?output_format=md#wp--skip-link--target)

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

## 󠀁[Description](https://developer.wordpress.org/reference/hooks/wp_auto_approve_ping/?output_format=md#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.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/wp_auto_approve_ping/?output_format=md#parameters)󠁿

 `$approve_pingback`bool

Whether to auto-approve the pingback.

`$source_id`int

ID of the post on this site the pingback originated from, or 0 if it came from elsewhere.

`$url`string

The URL the pingback was sent from.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/wp_auto_approve_ping/?output_format=md#source)󠁿

    ```php
    return (bool) apply_filters( 'wp_auto_approve_ping', $approve_pingback, $source_id, $url );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/comment.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-includes/comment.php#L197)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/comment.php#L197-L197)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/wp_auto_approve_ping/?output_format=md#related)󠁿

| Used by | Description | 
| [check_comment()](https://developer.wordpress.org/reference/functions/check_comment/)`wp-includes/comment.php` |

Checks whether a comment passes internal checks to be allowed to add.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/wp_auto_approve_ping/?output_format=md#changelog)󠁿

| Version | Description | 
| [7.1.0](https://developer.wordpress.org/reference/since/7.1.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fwp_auto_approve_ping%2F)
before being able to contribute a note or feedback.