AnsPress_PostTypes::bulk_post_updated_messages( array[] $bulk_messages, int[] $bulk_counts )
Description #
Filter the bulk action updated messages to add Question and Answer custom post type bulk post updated messages.
Parameters #
- $bulk_messagesarray[] (Required) Arrays of messages, each keyed by the corresponding post type. Messages are keyed with 'updated', 'locked', 'deleted', 'trashed', and 'untrashed'.
- $bulk_countsint[] (Required) Array of item counts for each message, used to build internationalized strings.
Source #
File: includes/post-types.php
public static function bulk_post_updated_messages( $bulk_messages, $bulk_counts ) { $bulk_messages['question'] = array( /* translators: %s: Number of questions. */ 'updated' => _n( '%s question updated.', '%s questions updated.', $bulk_counts['updated'], 'anspress-question-answer' ), 'locked' => ( 1 === $bulk_counts['locked'] ) ? __( '1 question not updated, somebody is editing it.', 'anspress-question-answer' ) : /* translators: %s: Number of questions. */ _n( '%s question not updated, somebody is editing it.', '%s questions not updated, somebody is editing them.', $bulk_counts['locked'], 'anspress-question-answer' ), /* translators: %s: Number of questions. */ 'deleted' => _n( '%s question permanently deleted.', '%s questions permanently deleted.', $bulk_counts['deleted'], 'anspress-question-answer' ), /* translators: %s: Number of questions. */ 'trashed' => _n( '%s question moved to the Trash.', '%s questions moved to the Trash.', $bulk_counts['trashed'], 'anspress-question-answer' ), /* translators: %s: Number of questions. */ 'untrashed' => _n( '%s question restored from the Trash.', '%s questions restored from the Trash.', $bulk_counts['untrashed'], 'anspress-question-answer' ), ); $bulk_messages['answer'] = array( /* translators: %s: Number of answers. */ 'updated' => _n( '%s answer updated.', '%s answers updated.', $bulk_counts['updated'], 'anspress-question-answer' ), 'locked' => ( 1 === $bulk_counts['locked'] ) ? __( '1 answer not updated, somebody is editing it.', 'anspress-question-answer' ) : /* translators: %s: Number of answers. */ _n( '%s answer not updated, somebody is editing it.', '%s answers not updated, somebody is editing them.', $bulk_counts['locked'], 'anspress-question-answer' ), /* translators: %s: Number of answers. */ 'deleted' => _n( '%s answer permanently deleted.', '%s answers permanently deleted.', $bulk_counts['deleted'], 'anspress-question-answer' ), /* translators: %s: Number of answers. */ 'trashed' => _n( '%s answer moved to the Trash.', '%s answers moved to the Trash.', $bulk_counts['trashed'], 'anspress-question-answer' ), /* translators: %s: Number of answers. */ 'untrashed' => _n( '%s answer restored from the Trash.', '%s answers restored from the Trash.', $bulk_counts['untrashed'], 'anspress-question-answer' ), ); return $bulk_messages; }
Expand full source code Collapse full source code View on GitHub: includes/post-types.php:395
Add your comment