| @@ -281,8 +281,13 @@ | ||
| 281 | 281 | if ( ! isset( $_POST['wp-convertkit'] ) ) { |
| 282 | 282 | return; |
| 283 | 283 | } |
| 284 | 284 | |
| 285 | + // Bail if the current user cannot edit this Post. | |
| 286 | + if ( ! current_user_can( 'edit_post', $post_id ) ) { | |
| 287 | + return; | |
| 288 | + } | |
| 289 | + | |
| 285 | 290 | // Save Post's settings. |
| 286 | 291 | $this->save_post_settings( $post_id, wp_unslash( $_POST['wp-convertkit'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized |
| 287 | 292 | |
| 288 | 293 | } |