[wp-trac] [WordPress Trac] #18710: post_deleted_messages filter
WordPress Trac
wp-trac at lists.automattic.com
Tue Sep 20 09:48:38 UTC 2011
#18710: post_deleted_messages filter
----------------------------+------------------------------
Reporter: jgadbois | Owner: johnbillion
Type: enhancement | Status: accepted
Priority: normal | Milestone: Awaiting Review
Component: Administration | Version:
Severity: normal | Resolution:
Keywords: has-patch |
----------------------------+------------------------------
Changes (by johnbillion):
* keywords: needs-patch => has-patch
* component: General => Administration
Comment:
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 );
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18710#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list