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 | application/controllers/Wdk_resultitem.php +22 -2 1.1.0 → 1.5.9 View file →
@@ -26,8 +26,23 @@
26 26 'label' => __('Name', 'wpdirectorykit'),
27 27 'rules' => 'required'
28 28 ),
29 29 array(
30 + 'field' => 'is_multiline_enabled',
31 + 'label' => __('Multiline enabled', 'wpdirectorykit'),
32 + 'rules' => ''
33 + ),
34 + array(
35 + 'field' => 'is_label_disable',
36 + 'label' => __('Show only icons', 'wpdirectorykit'),
37 + 'rules' => ''
38 + ),
39 + array(
40 + 'field' => 'is_show_agent_details',
41 + 'label' => __('Show agent details', 'wpdirectorykit'),
42 + 'rules' => '',
43 + ),
44 + array(
30 45 'field' => 'resultitem_json',
31 46 'label' => __('Search Form Json/Structure', 'wpdirectorykit'),
32 47 'rules' => ''
33 48 ),
@@ -34,10 +49,14 @@
34 49 );
35 50
36 51 if($this->form->run($rules))
37 52 {
53 +
54 + // Check _wpnonce
55 + check_admin_referer( 'wdk-resultitem-edit_'.$id, '_wpnonce' );
56 +
38 57 // Save procedure for basic data
39 - $data = $this->resultitem_m->prepare_data($this->input->post(), $rules);
58 + $data = $this->resultitem_m->prepare_data(wdk_get_post(), $rules);
40 59
41 60 // Save standard wp post
42 61
43 62 if($this->resultitem_m->total() == 0)
@@ -45,11 +64,12 @@
45 64 $id = NULL;
46 65 $data['idresultitem'] = 1;
47 66 }
48 67
68 +
49 69 $insert_id = $this->resultitem_m->insert($data, $id);
50 70
51 - // redirect
71 + // redirect
52 72
53 73 if(!empty($insert_id) && empty($id))
54 74 {
55 75 wp_redirect(admin_url("admin.php?page=wdk_resultitem&id=$insert_id&is_updated=true"));