| @@ -29,8 +29,12 @@ | ||
| 29 | 29 | if( isset( $new ) && $field == 'wpupg_post_types' ) { |
| 30 | 30 | $new = array( $new ); |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | + if( isset( $new ) && $field == 'wpupg_taxonomies' ) { | |
| 34 | + $new = array( $new ); | |
| 35 | + } | |
| 36 | + | |
| 33 | 37 | // Update or delete meta data if changed |
| 34 | 38 | if( isset( $new ) && $new != $old ) { |
| 35 | 39 | update_post_meta( $post_id, $field, $new ); |
| 36 | 40 | } elseif ( $new == '' && $old ) { |
| @@ -87,8 +91,19 @@ | ||
| 87 | 91 | } |
| 88 | 92 | } |
| 89 | 93 | } |
| 90 | 94 | update_post_meta( $post_id, 'wpupg_filter_limit_terms', $filter_limit_terms ); |
| 95 | + | |
| 96 | + // Filter Dropdown Labels | |
| 97 | + $filter_dropdown_labels = array(); | |
| 98 | + if( isset( $filter_taxonomies ) ) { | |
| 99 | + foreach( $filter_taxonomies as $filter_taxonomy ) { | |
| 100 | + if( isset( $_POST['wpupg_filter_dropdown_label_' . $filter_taxonomy] ) ) { | |
| 101 | + $filter_dropdown_labels[$filter_taxonomy] = $_POST['wpupg_filter_dropdown_label_' . $filter_taxonomy]; | |
| 102 | + } | |
| 103 | + } | |
| 104 | + } | |
| 105 | + update_post_meta( $post_id, 'wpupg_filter_dropdown_labels', $filter_dropdown_labels ); | |
| 91 | 106 | |
| 92 | 107 | // Filter style metadata |
| 93 | 108 | $styles = $grid->filter_style_fields(); |
| 94 | 109 | $filter_style = array(); |