Ticket #18710 (accepted enhancement)

Opened 8 months ago

Last modified 8 months ago

post_deleted_messages filter

Reported by: jgadbois Owned by: nacin
Priority: normal Milestone: Future Release
Component: Administration Version:
Severity: normal Keywords: has-patch 3.4-early
Cc:

Description

It would be nice to be able to updated post deleted messages like you can through the post_updated_messages filter.

Attachments

18710.patch Download (4.7 KB) - added by johnbillion 8 months ago.

Change History

You mean "Item moved to the Trash" and similar strings in wp-admin/edit.php?

Yes, exactly

+1 to this. Can currently set 'Custom field deleted' but not 'Post moved to the trash.'

Related: #18714

Last edited 8 months ago by johnbillion (previous) (diff)
  • Owner set to johnbillion
  • Status changed from new to accepted
  • Keywords has-patch added; needs-patch removed
  • Component changed from General to Administration

Patch which adds a bulk_post_updated_messages filter. No new strings introduced.

Plugin usage:

function bulk_foo_updated_messages( $messages, $counts ) {
	$messages['foo'] = array(
		0 => '',
		1 => _n( '%s foo updated.', '%s foos updated.', $counts[1], 'foo' ),
		2 => _n( '%s foo not updated, somebody is editing it.', '%s foos not updated, somebody is editing them.', $counts[2], 'foo' ),
		3 => _n( 'Foo permanently deleted.', '%s foos permanently deleted.', $counts[3], 'foo' ),
		4 => _n( 'Foo moved to the Trash.', '%s foos moved to the Trash.', $counts[4], 'foo' ),
		5 => _n( 'Foo restored from the Trash.', '%s foos restored from the Trash.', $counts[5], 'foo' ),
	);
	return $messages;
}
add_filter( 'bulk_post_updated_messages', 'bulk_foo_updated_messages', 10, 2 );
  • Keywords 3.4-early added
  • Owner changed from johnbillion to nacin
  • Milestone changed from Awaiting Review to Future Release
Note: See TracTickets for help on using tickets.