PluginProbe
Ultimate Post Kit – Elementor Post Grid, Post Carousel, Post Slider & Blog Layout Widgets / 4.5.6
Ultimate Post Kit – Elementor Post Grid, Post Carousel, Post Slider & Blog Layout Widgets v4.5.6
4.5.6 4.5.5 4.5.4 4.2.1 4.2.2 4.2.3 4.5.0 4.5.2 4.5.3 4.2.0 4.1.18 4.1.17 4.1.16 4.1.15 4.1.14 4.1.13 4.1.12 4.1.11 4.1.10 4.1.9 4.1.8 4.0.9 4.1.0 4.1.1 4.1.2 All 148 releases
← All changes | includes/ultimate-post-kit-category-image.php +14 -2 4.2.1 → 4.5.6 View file →
@@ -28,10 +28,16 @@
28 28 </div>
29 29 <?php
30 30 }
31 31 public function save_category_image($term_id) {
32 + if (!current_user_can('manage_categories')) {
33 + return;
34 + }
35 + if (!isset($_POST['_wpnonce_add-tag']) || !wp_verify_nonce(sanitize_text_field(wp_unslash($_POST['_wpnonce_add-tag'])), 'add-tag')) {
36 + return;
37 + }
32 38 if (isset($_POST['upk-category-image-id']) && '' !== $_POST['upk-category-image-id']) {
33 - $image = sanitize_key($_POST['upk-category-image-id']);
39 + $image = sanitize_key(wp_unslash($_POST['upk-category-image-id']));
34 40 add_term_meta($term_id, 'upk-category-image-id', $image, true);
35 41 }
36 42 }
37 43 public function edit_category_image($term) { ?>
@@ -56,10 +62,16 @@
56 62 <?php
57 63 }
58 64
59 65 public function updated_category_image($term_id) {
66 + if (!current_user_can('manage_categories')) {
67 + return;
68 + }
69 + if (!isset($_POST['_wpnonce']) || !wp_verify_nonce(sanitize_text_field(wp_unslash($_POST['_wpnonce'])), 'update-tag_' . $term_id)) {
70 + return;
71 + }
60 72 if (isset($_POST['upk-category-image-id']) && '' !== $_POST['upk-category-image-id']) {
61 - $image = sanitize_key($_POST['upk-category-image-id']);
73 + $image = sanitize_key(wp_unslash($_POST['upk-category-image-id']));
62 74 update_term_meta($term_id, 'upk-category-image-id', $image);
63 75 } else {
64 76 update_term_meta($term_id, 'upk-category-image-id', '');
65 77 }