Created
December 15, 2016 13:58
-
-
Save SirDarcanos/0ad6ac0dc4a5a285dff8cdc946ae1f41 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Shows a notice in the admin once the bulk action is completed. | |
*/ | |
function my_bulk_action_admin_notice() { | |
if ( ! empty( $_REQUEST['bulk_draft_posts'] ) ) { | |
$drafts_count = intval( $_REQUEST['bulk_draft_posts'] ); | |
printf( | |
'<div id="message" class="updated fade">' . | |
_n( '%s post moved to drafts.', '%s posts moved to drafts.', $drafts_count, 'domain' ) | |
. '</div>', | |
$drafts_count | |
); | |
} | |
} | |
add_action( 'admin_notices', 'my_bulk_action_admin_notice' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment