Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin: Deprecate gutenberg_bulk_post_updated_messages #13472

Merged
merged 1 commit into from
Jan 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ The Gutenberg project's deprecation policy is intended to support backward compa
- The PHP function `gutenberg_silence_rest_errors` has been removed.
- The PHP function `gutenberg_filter_post_type_labels` has been removed.
- The PHP function `gutenberg_remove_wpcom_markdown_support` has been removed.
- The PHP function `gutenberg_bulk_post_updated_messages` has been removed.

## 4.5.0
- `Dropdown.refresh()` has been deprecated as the contained `Popover` is now automatically refreshed.
Expand Down
21 changes: 4 additions & 17 deletions lib/register.php
Original file line number Diff line number Diff line change
Expand Up @@ -538,31 +538,18 @@ function gutenberg_register_post_types() {
* Apply the correct labels for Reusable Blocks in the bulk action updated messages.
*
* @since 4.3.0
* @deprecated 5.0.0
*
* @param array $messages Arrays of messages, each keyed by the corresponding post type.
* @param array $bulk_counts Array of item counts for each message, used to build internationalized strings.
* @param array $messages Arrays of messages, each keyed by the corresponding post type.
*
* @return array
*/
function gutenberg_bulk_post_updated_messages( $messages, $bulk_counts ) {
$messages['wp_block'] = array(
// translators: Number of blocks updated.
'updated' => _n( '%s block updated.', '%s blocks updated.', $bulk_counts['updated'], 'gutenberg' ),
// translators: Blocks not updated because they're locked.
'locked' => ( 1 == $bulk_counts['locked'] ) ? __( '1 block not updated, somebody is editing it.', 'gutenberg' ) : _n( '%s block not updated, somebody is editing it.', '%s blocks not updated, somebody is editing them.', $bulk_counts['locked'], 'gutenberg' ),
// translators: Number of blocks deleted.
'deleted' => _n( '%s block permanently deleted.', '%s blocks permanently deleted.', $bulk_counts['deleted'], 'gutenberg' ),
// translators: Number of blocks trashed.
'trashed' => _n( '%s block moved to the Trash.', '%s blocks moved to the Trash.', $bulk_counts['trashed'], 'gutenberg' ),
// translators: Number of blocks untrashed.
'untrashed' => _n( '%s block restored from the Trash.', '%s blocks restored from the Trash.', $bulk_counts['untrashed'], 'gutenberg' ),
);
function gutenberg_bulk_post_updated_messages( $messages ) {
_deprecated_function( __FUNCTION__, '5.0.0' );

return $messages;
}

add_filter( 'bulk_post_updated_messages', 'gutenberg_bulk_post_updated_messages', 10, 2 );

/**
* Injects a hidden input in the edit form to propagate the information that classic editor is selected.
*
Expand Down