PluginProbe
WP Directory Kit / 1.2.7
WP Directory Kit v1.2.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 1.4.0 1.4.1 All 35 releases
wpdirectorykit / application / models / Locationslistings_m.php

Locationslistings_m.php in WP Directory Kit 1.2.7, at application/models/Locationslistings_m.php

43 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 // If this file is called directly, abort.
4 if ( ! defined( 'WPINC' ) ) {
5 die;
6 }
7
8 class Locationslistings_m extends Winter_MVC_Model {
9
10 public $_table_name = 'wdk_listings_locations';
11 public $_order_by = 'post_id DESC';
12 public $_primary_key = 'post_id';
13 public $_own_columns = array();
14 public $_timestamps = FALSE;
15 protected $_primary_filter = 'intval';
16 public $form_admin = array();
17 public $fields_list = NULL;
18
19 public function __construct(){
20 parent::__construct();
21 }
22
23 public function delete_where($where)
24 {
25 $this->db->where($where);
26 $this->db->delete($this->_table_name);
27 }
28
29
30 public function get_locations($post_id = NULL, $single = FALSE)
31 {
32 $this->load->model('location_m');
33 $locations_table = $this->location_m->_table_name;
34
35 $this->db->from($this->_table_name);
36 $this->db->join($locations_table.' ON '.$locations_table.'.idlocation = '.$this->_table_name.'.location_id');
37
38 return parent::get($post_id, $single);
39 }
40
41
42 }
43 ?>