wppaste
WordPress

apply_filters( 'add_trashed_suffix_to_trashed_posts', bool $add_trashed_suffix, string $post_name, int $post_id )

Since
5.4.0
Filters whether or not to add a __trashed suffix to trashed posts that match the name of the updated post.

Compatibility

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

Present in every tracked release (6.7.7 to 7.1.0).

Parameters

$add_trashed_suffixbool
Whether to attempt to add the suffix.
$post_namestring
The name of the post being updated.
$post_idint
Post ID.

Where this hook fires · 1

  • wp-includes/post.php:4678wp_insert_post()

Source code

		 * @since 5.4.0		 *		 * @param bool   $add_trashed_suffix Whether to attempt to add the suffix.		 * @param string $post_name          The name of the post being updated.		 * @param int    $post_id            Post ID.		 */		$add_trashed_suffix = apply_filters( 'add_trashed_suffix_to_trashed_posts', true, $post_name, $post_id ); 		if ( $add_trashed_suffix ) {			wp_add_trashed_suffix_to_post_name_for_trashed_posts( $post_name, $post_id );		}	}

Changelog

Introduced in 5.4.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 6.7.7 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.