Add missing nonce to term form

This commit is contained in:
Robin Cornett
2019-05-19 14:02:41 -04:00
parent 38fc34fdbf
commit 601d7e53d1
@@ -83,6 +83,7 @@ class Display_Featured_Image_Genesis_Taxonomies extends Display_Featured_Image_G
$term_id = $term->term_id;
$image_id = displayfeaturedimagegenesis_get_term_image( $term_id );
wp_nonce_field( $this->page . '_save-settings', $this->page . '_nonce', false );
echo '<tr class="form-field term-image-wrap">';
printf(
'<th scope="row" ><label for="%s[term_image]">%s</label></th>',
@@ -114,6 +115,9 @@ class Display_Featured_Image_Genesis_Taxonomies extends Display_Featured_Image_G
* @since 2.0.0
*/
public function save_taxonomy_custom_meta( $term_id ) {
if ( ! $this->user_can_save( $this->page . '_save-settings', $this->page . '_nonce' ) ) {
return;
}
$input = filter_input( INPUT_POST, $this->page, FILTER_DEFAULT, FILTER_FORCE_ARRAY );
if ( ! $input ) {
return;