From 81f672b7b1dce404334037f5e7283078cf248b9b Mon Sep 17 00:00:00 2001 From: James Koster Date: Wed, 27 Oct 2021 12:48:18 +0100 Subject: [PATCH] Remove bulk actions for templates --- lib/full-site-editing/templates-utils.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/full-site-editing/templates-utils.php b/lib/full-site-editing/templates-utils.php index bc270a738d967..8dee5e4a77a22 100644 --- a/lib/full-site-editing/templates-utils.php +++ b/lib/full-site-editing/templates-utils.php @@ -19,6 +19,7 @@ function gutenberg_templates_lists_custom_columns( array $columns ) { if ( isset( $columns['date'] ) ) { unset( $columns['date'] ); } + unset( $columns['cb'] ); return $columns; } @@ -111,3 +112,13 @@ function gutenberg_filter_templates_edit_views( $views ) { return $views; } + +/** + * Removes the bulk actions from the templates list view. + * + * @param array $actions The bulk actions to filter. + */ +function gutenberg_filter_templates_bulk_actions( $actions ) { + return array(); +} +add_filter( 'bulk_actions-edit-wp_template', 'gutenberg_filter_templates_bulk_actions' ); \ No newline at end of file