From 530deb6a65a411ad1cec80a96ee94d11e4c3eb2f Mon Sep 17 00:00:00 2001 From: Ramon Date: Thu, 10 Aug 2023 16:12:46 +1000 Subject: [PATCH] Patterns: add `delete_posts` to the wp_block (patterns) capabilities (#53405) * Adding `delete_posts` to the wp_block (patterns) capabilities * - Adding a bit of defensive code just in case `$args['capabilities']` type isn't what we expect. * - Conditions were in the wrong order. We want to check for the existence of `$args['capabilities']` before typing checking. If the first expression fails we skip the second, otherwise there'll be a PHP error. --- lib/compat/wordpress-6.4/blocks.php | 23 +++++++++++++++++++++++ lib/load.php | 3 +++ 2 files changed, 26 insertions(+) create mode 100644 lib/compat/wordpress-6.4/blocks.php diff --git a/lib/compat/wordpress-6.4/blocks.php b/lib/compat/wordpress-6.4/blocks.php new file mode 100644 index 00000000000000..74fa9253e45d50 --- /dev/null +++ b/lib/compat/wordpress-6.4/blocks.php @@ -0,0 +1,23 @@ +