コード例 #1
0
ファイル: flex.php プロジェクト: gvh1993/project-vvvh
 /**
  * Removes a dbst field from dbst table
  * @author Howard R <*****@*****.**>
  * @static
  * @param int $dbst_id
  * @return boolean
  */
 public static function remove_dbst($dbst_id)
 {
     /** first validation **/
     if (!$dbst_id) {
         return false;
     }
     /** Multilingual **/
     if (wpl_global::check_addon('pro')) {
         wpl_addon_pro::remove_multilingual($dbst_id);
     }
     /** trigger event **/
     wpl_global::event_handler('dbst_removed', $dbst_id);
     wpl_db::delete("wpl_dbst", $dbst_id);
 }
コード例 #2
0
ファイル: property.php プロジェクト: amankatoch/wp-plugin
 /**
  * Purge a property completely
  * @author Howard <*****@*****.**>
  * @static
  * @param int $property_id
  * @param boolean $trigger_event
  * @return boolean
  */
 public static function purge($property_id, $trigger_event = true)
 {
     /** first validation **/
     if (!trim($property_id)) {
         return false;
     }
     $property_data = self::get_property_raw_data($property_id);
     /** trigger event **/
     if ($trigger_event) {
         wpl_global::event_handler('property_before_purge', array('property_id' => $property_id, 'property_data' => $property_data));
     }
     /** purging property related data **/
     _wpl_import('libraries.items');
     wpl_items::delete_all_items($property_id, $property_data['kind']);
     /** purging property record **/
     wpl_db::delete('wpl_properties', $property_id);
     /** purging property folder **/
     wpl_folder::delete(wpl_items::get_path($property_id));
     /** trigger event **/
     if ($trigger_event) {
         wpl_global::event_handler('property_purged', array('property_id' => $property_id, 'property_data' => $property_data));
     }
     return true;
 }
コード例 #3
0
ファイル: items.php プロジェクト: amankatoch/wp-plugin
 /**
  * Deletes an item record from items table
  * @author Howard R <*****@*****.**>
  * @static
  * @param int $item_id
  * @return boolean
  */
 public static function delete($item_id)
 {
     /** trigger event **/
     wpl_global::event_handler('item_deleted', array('item_id' => $item_id));
     /** delete item **/
     return wpl_db::delete('wpl_items', $item_id);
 }
コード例 #4
0
ファイル: flex.php プロジェクト: amankatoch/wp-plugin
 /**
  * Removes a dbst field from dbst table
  * @author Howard R <*****@*****.**>
  * @static
  * @param int $dbst_id
  * @return boolean
  */
 public static function remove_dbst($dbst_id)
 {
     /** first validation **/
     if (!$dbst_id) {
         return false;
     }
     /** Multilingual **/
     if (wpl_global::check_addon('pro')) {
         wpl_addon_pro::remove_multilingual($dbst_id);
     }
     wpl_db::delete("wpl_dbst", $dbst_id);
 }