Update for deprecated wp function call.
authorSteve Sutton <steve@gaslightmedia.com>
Wed, 27 Dec 2017 15:46:52 +0000 (10:46 -0500)
committerSteve Sutton <steve@gaslightmedia.com>
Wed, 27 Dec 2017 15:46:52 +0000 (10:46 -0500)
Replace deprecated get_currentuserinfo with wp_get_current_user.

index.php
readme.txt

index 9f6cdf6..8705057 100644 (file)
--- a/index.php
+++ b/index.php
@@ -3,7 +3,7 @@
  * Plugin Name: GLM Members Database Contacts
  * Plugin URI: http://www.gaslightmedia.com/
  * Description: Gaslight Media Members Database.
- * Version: 1.1.3
+ * Version: 1.1.4
  * Author: Gaslight Media
  * Author URI: http://www.gaslightmedia.com/
  * License: GPL2
@@ -19,7 +19,7 @@
  * @package glmMembersDatabaseContacts
  * @author Gaslight Media <cscott@gaslightmedia.com>
  * @license http://www.gaslightmedia.com Gaslightmedia
- * @version 1.1.3
+ * @version 1.1.4
  */
 
 // Check that we're being called by WordPress.
@@ -39,7 +39,7 @@ if (!defined('ABSPATH')) {
  *  version when there's a change in the database!! Use the
  *  version nunmber of that release for the DB version.
  */
-define('GLM_MEMBERS_CONTACTS_PLUGIN_VERSION', '1.1.3');
+define('GLM_MEMBERS_CONTACTS_PLUGIN_VERSION', '1.1.4');
 define('GLM_MEMBERS_CONTACTS_PLUGIN_DB_VERSION', '0.0.3');
 
 // This is the minimum version of the GLM Members DB plugin require for this plugin.
@@ -371,7 +371,7 @@ add_filter( 'woocommerce_prevent_admin_access', '__return_false' );
 /* Remove the "Dashboard" from the admin menu for non-admin users */
 function glm_hide_admin_dashboard () {
     global $current_user, $menu, $submenu;
-    get_currentuserinfo();
+    $current_user = wp_get_current_user();
 
     if( in_array( 'glm_members_own_entity_manager', $current_user->roles ) ) {
         reset( $menu );
index f49ea51..4f6fade 100644 (file)
@@ -27,6 +27,8 @@ e.g.
 
 
 == Changelog ==
+= 1.1.4 =
+* replace get_currentuserinfo with wp_get_current_user
 
 = 1.1.3 =
 * Hide the dashboard from "Own Entity Managers"