add_trashed_suffix_to_trashed_posts filter-hookWP 5.4.0

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

Usage

add_filter( 'add_trashed_suffix_to_trashed_posts', 'wp_kama_add_trashed_suffix_to_posts_filter', 10, 3 );

/**
 * Function for `add_trashed_suffix_to_trashed_posts` filter-hook.
 * 
 * @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.
 *
 * @return bool
 */
function wp_kama_add_trashed_suffix_to_posts_filter( $add_trashed_suffix, $post_name, $post_ID ){

	// filter...
	return $add_trashed_suffix;
}
$add_trashed_suffix(true|false)
Whether to attempt to add the suffix.
$post_name(string)
The name of the post being updated.
$post_ID(int)
Post ID.

Changelog

Since 5.4.0 Introduced.

Where the hook is called

wp_insert_post()
add_trashed_suffix_to_trashed_posts
wp-includes/post.php 4335
$add_trashed_suffix = apply_filters( 'add_trashed_suffix_to_trashed_posts', true, $post_name, $post_ID );

Where the hook is used in WordPress

Usage not found.