| @@ -78,8 +78,10 @@ | ||
| 78 | 78 | 'post_date ASC' => __('Post Date', 'wpdirectorykit').' ASC', |
| 79 | 79 | 'post_date DESC' => __('Post Date', 'wpdirectorykit').' DESC', |
| 80 | 80 | 'date_modified ASC' => __('Last Modified Date', 'wpdirectorykit').' ASC', |
| 81 | 81 | 'date_modified DESC' => __('Last Modified Date', 'wpdirectorykit').' DESC', |
| 82 | + $this->listing_m->_table_name.'.rank ASC, ID ASC' => __('Rank', 'wpdirectorykit').' ASC', | |
| 83 | + $this->listing_m->_table_name.'.rank DESC, ID DESC' => __('Rank', 'wpdirectorykit').' DESC', | |
| 82 | 84 | ); |
| 83 | 85 | |
| 84 | 86 | $rules = array( |
| 85 | 87 | array( |
| @@ -183,8 +185,10 @@ | ||
| 183 | 185 | check_admin_referer( 'wdk-listing-delete_'.$post_id, '_wpnonce' ); |
| 184 | 186 | |
| 185 | 187 | $this->listing_m->delete($post_id); |
| 186 | 188 | |
| 189 | + do_action('wpdirectorykit/listing/removed'); | |
| 190 | + | |
| 187 | 191 | wp_redirect(admin_url("admin.php?page=wdk&paged=$paged")); |
| 188 | 192 | } |
| 189 | 193 | |
| 190 | 194 | public function bulk_delete($posts_selected) |
| @@ -198,8 +202,9 @@ | ||
| 198 | 202 | { |
| 199 | 203 | $this->listing_m->delete($post_id); |
| 200 | 204 | } |
| 201 | 205 | |
| 206 | + do_action('wpdirectorykit/listing/bulk_removed'); | |
| 202 | 207 | wp_redirect(admin_url("admin.php?page=wdk")); |
| 203 | 208 | } |
| 204 | 209 | |
| 205 | 210 | public function bulk_deactivate($posts_selected) |
| @@ -212,9 +217,9 @@ | ||
| 212 | 217 | { |
| 213 | 218 | if($this->listing_m->check_deletable($post_id)) |
| 214 | 219 | $this->listing_m->insert(array('is_activated'=>NULL), $post_id); |
| 215 | 220 | } |
| 216 | - | |
| 221 | + do_action('wpdirectorykit/listing/updated'); | |
| 217 | 222 | wp_redirect(admin_url("admin.php?page=wdk")); |
| 218 | 223 | } |
| 219 | 224 | |
| 220 | 225 | public function bulk_activate($posts_selected) |
| @@ -227,9 +232,9 @@ | ||
| 227 | 232 | { |
| 228 | 233 | if($this->listing_m->check_deletable($post_id)) |
| 229 | 234 | $this->listing_m->insert(array('is_activated'=>1), $post_id); |
| 230 | 235 | } |
| 231 | - | |
| 236 | + do_action('wpdirectorykit/listing/updated'); | |
| 232 | 237 | wp_redirect(admin_url("admin.php?page=wdk")); |
| 233 | 238 | } |
| 234 | 239 | public function bulk_deapprove($posts_selected) |
| 235 | 240 | { |
| @@ -242,9 +247,9 @@ | ||
| 242 | 247 | { |
| 243 | 248 | if($this->listing_m->check_deletable($post_id)) |
| 244 | 249 | $this->listing_m->insert(array('is_approved'=>NULL), $post_id); |
| 245 | 250 | } |
| 246 | - | |
| 251 | + do_action('wpdirectorykit/listing/updated'); | |
| 247 | 252 | wp_redirect(admin_url("admin.php?page=wdk")); |
| 248 | 253 | } |
| 249 | 254 | |
| 250 | 255 | public function bulk_approve($posts_selected) |
| @@ -257,8 +262,8 @@ | ||
| 257 | 262 | { |
| 258 | 263 | if($this->listing_m->check_deletable($post_id)) |
| 259 | 264 | $this->listing_m->insert(array('is_approved'=>1), $post_id); |
| 260 | 265 | } |
| 261 | - | |
| 266 | + do_action('wpdirectorykit/listing/updated'); | |
| 262 | 267 | wp_redirect(admin_url("admin.php?page=wdk")); |
| 263 | 268 | } |
| 264 | 269 | } |