PluginProbe
WP Directory Kit / 1.5.9
WP Directory Kit v1.5.9
1.5.9 1.5.7 1.5.6 1.5.5 1.5.4 1.5.3 trunk 1.1.0 1.1.6 1.1.8 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.8 All 37 releases
← All changes | shortcodes/shortcode-wdk-listing-fields-section.php +7 -1 1.5.3 → 1.5.9 View file →
@@ -51,9 +51,9 @@
51 51
52 52 global $wdk_listing_id;
53 53 $post_id = $wdk_listing_id;
54 54 if (!empty($data['settings']['post_id'])) {
55 - $post_id = $data['settings']['post_id'];
55 + $post_id = (int)$data['settings']['post_id'];
56 56 }
57 57
58 58 $data['post_id'] = $post_id;
59 59
@@ -66,8 +66,14 @@
66 66 if(isset($data['sections_data'][$data['settings']['section_id']]))
67 67 $data['section_data'] = $data['sections_data'][$data['settings']['section_id']];
68 68 }
69 69
70 +
71 + $post_data = get_post($post_id);
72 + if (!$post_data || $post_data->post_status != 'publish' || post_password_required($post_data)) {
73 + return false;
74 + }
75 +
70 76 if(!empty($data['settings']['field_id']))
71 77 $data['field_label'] = wdk_field_label($data['settings']['field_id']);
72 78
73 79 if(empty($data['section_data'])){