| @@ -180,8 +180,13 @@ | ||
| 180 | 180 | * @param int $term_id Term ID. |
| 181 | 181 | */ |
| 182 | 182 | public function save_category_fields( $term_id ) { |
| 183 | 183 | |
| 184 | + // Bail if the current user cannot edit this Category. | |
| 185 | + if ( ! current_user_can( 'edit_term', $term_id ) ) { | |
| 186 | + return; | |
| 187 | + } | |
| 188 | + | |
| 184 | 189 | // Bail if no nonce field exists. |
| 185 | 190 | if ( ! isset( $_POST['wp-convertkit-save-meta-nonce'] ) ) { |
| 186 | 191 | return; |
| 187 | 192 | } |