mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-07-01 16:51:18 +03:00
Verify nonce before processing action
This commit is contained in:
parent
258e86dc0b
commit
3192c724ae
|
@ -186,6 +186,12 @@ function handle_activation_action( $post_id ) {
|
|||
return;
|
||||
}
|
||||
|
||||
if ( 'deactivate' === $action ) {
|
||||
check_admin_referer( 'deactivate-post_' . $post_id );
|
||||
} else {
|
||||
check_admin_referer( 'reactivate-post_' . $post_id );
|
||||
}
|
||||
|
||||
$post = get_post( $post_id );
|
||||
if ( ! is_a( $post, 'WP_Post' ) || CPT_ID !== $post->post_type ) {
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue