From 8f69262d88d7aa81b8492a7e8a137ed070ddfdef Mon Sep 17 00:00:00 2001 From: Michael Ilett Date: Mon, 15 Apr 2019 10:35:41 +0100 Subject: [PATCH] Refreshing meta box nonce after re-authenticating following a wp_auth_check() --- co-authors-plus.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/co-authors-plus.php b/co-authors-plus.php index 9c050279..b72cb772 100644 --- a/co-authors-plus.php +++ b/co-authors-plus.php @@ -103,6 +103,9 @@ function __construct() { add_action( 'add_meta_boxes', array( $this, 'add_coauthors_box' ) ); add_action( 'add_meta_boxes', array( $this, 'remove_authors_box' ) ); + // Refresh the nonce after the user re-authenticates due to a wp_auth_check() to avoid failing check_admin_referrer() + add_action( 'wp_refresh_nonces', array( $this, 'refresh_coauthors_nonce' ), 20, 1 ); + // Removes the co-author dropdown from the post quick edit add_action( 'admin_head', array( $this, 'remove_quick_edit_authors_box' ) ); @@ -414,6 +417,15 @@ public function coauthors_meta_box( $post ) {