* Plugin Name: GLM Members Database
* Plugin URI: http://www.gaslightmedia.com/
* Description: Gaslight Media Members Database.
- * Version: 2.10.0
+ * Version: 2.10.1
* Author: Gaslight Media
* Author URI: http://www.gaslightmedia.com/
* License: GPL2
* @package glmMembersDatabase
* @author Chuck Scott <cscott@gaslightmedia.com>
* @license http://www.gaslightmedia.com Gaslightmedia
- * @version 2.10.0
+ * @version 2.10.1
*/
/*
*
*/
-define('GLM_MEMBERS_PLUGIN_VERSION', '2.10.0');
+define('GLM_MEMBERS_PLUGIN_VERSION', '2.10.1');
define('GLM_MEMBERS_PLUGIN_DB_VERSION', '1.1.32');
// Check if plugin version is not current in WordPress option and if needed updated it
if ( $categoryId ) {
$this->categories[$data['id']]['new_id'] = $categoryId;
} else {
+ $parentId = isset( $this->categories[$data['parent']]['new_id'] ) ? $this->categories[$data['parent']]['new_id']: 0;
$success = $this->wpdb->insert(
GLM_MEMBERS_PLUGIN_DB_PREFIX . 'categories',
array(
- 'name' => $data['name']
+ 'name' => $data['name'],
+ 'parent' => $parentId
),
- '%s'
+ array( '%s', '%d' )
);
if ( $success ) {
$this->categories[$data['id']]['new_id'] = $this->wpdb->insert_id;