From a72a8861d385f129837b5bfdf22dde6f8456cfc9 Mon Sep 17 00:00:00 2001 From: nikitasinelnikov Date: Fri, 24 Mar 2017 16:50:49 +0200 Subject: [PATCH] changes for user profile section add action to our section hook --- core/um-api.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/um-api.php b/core/um-api.php index c2d2481a..b2bdd4ef 100644 --- a/core/um-api.php +++ b/core/um-api.php @@ -20,8 +20,9 @@ class UM_REST_API { add_action( 'init', array( $this, 'add_endpoint' ) ); add_action( 'template_redirect', array( $this, 'process_query' ), -1 ); add_filter( 'query_vars', array( $this, 'query_vars' ) ); - add_action( 'show_user_profile', array( $this, 'user_key_field' ) ); - add_action( 'edit_user_profile', array( $this, 'user_key_field' ) ); + + add_action( 'um_user_profile_section', array( $this, 'user_key_field' ), 2 ); + add_action( 'personal_options_update', array( $this, 'update_key' ) ); add_action( 'edit_user_profile_update', array( $this, 'update_key' ) ); @@ -863,4 +864,4 @@ class UM_REST_API { return hash( 'md5', $user->um_user_secret_key . $user->um_user_public_key ); } -} \ No newline at end of file +}