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_category.php +6 -1 1.2.4 → 1.5.9 View file →
@@ -118,8 +118,13 @@
118 118 'field' => 'category_color',
119 119 'label' => __('Color', 'wpdirectorykit'),
120 120 'rules' => ''
121 121 ),
122 + array(
123 + 'field' => 'titles_for_search',
124 + 'label' => __('Alternative titles for search', 'wpdirectorykit'),
125 + 'rules' => ''
126 + ),
122 127 );
123 128
124 129 if($this->form->run($rules))
125 130 {
@@ -132,9 +137,9 @@
132 137 if(empty($id) && strpos($data['category_title'], ',') !== FALSE) {
133 138
134 139 foreach (explode(',', $data['category_title']) as $title) {
135 140 // Save standard wp post
136 - $insert_id = $this->category_m->insert(array_merge($data, array('category_title' => $title)), NULL);
141 + $insert_id = $this->category_m->insert(array_merge($data, array('category_title' => trim($title))), NULL);
137 142 }
138 143 wp_redirect(admin_url("admin.php?page=wdk_category&is_updated=true&custom_message=".urlencode(esc_html__('Bulk Categories added', 'wpdirectorykit'))));
139 144 exit;
140 145 } else {