From ef2be0d4141a3e022f680cd5aef4010ac88358f2 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Wed, 27 Dec 2017 10:46:52 -0500 Subject: [PATCH] Update for deprecated wp function call. Replace deprecated get_currentuserinfo with wp_get_current_user. --- index.php | 8 ++++---- readme.txt | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/index.php b/index.php index 9f6cdf6..8705057 100644 --- 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 * @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 ); diff --git a/readme.txt b/readme.txt index f49ea51..4f6fade 100644 --- a/readme.txt +++ b/readme.txt @@ -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" -- 2.17.1