From 265eb06ea63cade292dbdd8525e74c479a1b36a4 Mon Sep 17 00:00:00 2001 From: Anass Rahou Date: Mon, 22 Jun 2026 19:19:48 -0500 Subject: [PATCH] Add post capability verification when saving metabox --- simple-css.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/simple-css.php b/simple-css.php index 09c89a5..6fac2f9 100644 --- a/simple-css.php +++ b/simple-css.php @@ -299,6 +299,10 @@ function simple_css_save_metabox( $post_id ) { return; } + if ( ! current_user_can( 'edit_post', $post_id ) ) { + return; + } + if ( isset( $_POST[ '_simple_css' ] ) && $_POST[ '_simple_css' ] !== '' ) { update_post_meta( $post_id, '_simple_css', strip_tags( $_POST[ '_simple_css' ] ) ); } else {