From 10218cf8b91e8d63ee3176de66b01842fc312e24 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Fri, 19 Mar 2021 10:29:57 +0100 Subject: Fixes nonce verification correctly --- src/class-draggable-post-order.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/class-draggable-post-order.php b/src/class-draggable-post-order.php index f793a1d..3ff38ed 100644 --- a/src/class-draggable-post-order.php +++ b/src/class-draggable-post-order.php @@ -95,8 +95,8 @@ class Draggable_Post_Order { public static function save_post( $post_id, $post ) { if ( ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) || - ! wp_verify_nonce( self::$nonce, self::$nonce ) || ( ! isset( $_POST['post_ID'] ) || intval( $_POST['post_ID'] ) !== intval( $post_id ) ) || + ! wp_verify_nonce( $_POST[ self::$nonce ], self::$nonce ) || ! isset( $_POST[ self::$meta_key ] ) ) { return; -- cgit v1.2.3