2017-07-26 14:57:52 +03:00
|
|
|
<?php
|
|
|
|
|
namespace um\core;
|
|
|
|
|
|
|
|
|
|
// Exit if accessed directly
|
|
|
|
|
if ( ! defined( 'ABSPATH' ) ) exit;
|
|
|
|
|
|
2018-03-26 01:27:46 +03:00
|
|
|
if ( ! class_exists( 'um\core\Profile' ) ) {
|
2018-03-20 13:24:38 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Class Profile
|
|
|
|
|
* @package um\core
|
|
|
|
|
*/
|
|
|
|
|
class Profile {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @var array
|
|
|
|
|
*/
|
|
|
|
|
public $arr_user_slugs = array();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @var array
|
|
|
|
|
*/
|
|
|
|
|
public $arr_user_roles = array();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @var
|
|
|
|
|
*/
|
|
|
|
|
var $active_tab;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Profile constructor.
|
|
|
|
|
*/
|
|
|
|
|
function __construct() {
|
|
|
|
|
add_action( 'template_redirect', array( &$this, 'active_tab' ), 10002 );
|
|
|
|
|
add_action( 'template_redirect', array( &$this, 'active_subnav' ), 10002 );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2020-01-20 10:39:40 +02:00
|
|
|
/**
|
|
|
|
|
* @param array $args
|
|
|
|
|
*
|
|
|
|
|
* @return string
|
|
|
|
|
*/
|
|
|
|
|
function get_show_bio_key( $args ) {
|
|
|
|
|
$key = apply_filters( 'um_profile_bio_key', 'description', $args );
|
|
|
|
|
return $key;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2018-03-20 13:24:38 +02:00
|
|
|
/**
|
|
|
|
|
* Delete profile avatar AJAX handler
|
|
|
|
|
*/
|
|
|
|
|
function ajax_delete_profile_photo() {
|
2018-11-21 14:01:18 +02:00
|
|
|
UM()->check_ajax_nonce();
|
|
|
|
|
|
2018-03-20 13:24:38 +02:00
|
|
|
/**
|
|
|
|
|
* @var $user_id
|
|
|
|
|
*/
|
|
|
|
|
extract( $_REQUEST );
|
|
|
|
|
|
2019-08-08 00:36:33 +03:00
|
|
|
if ( ! UM()->roles()->um_current_user_can( 'edit', $user_id ) ) {
|
2018-03-20 13:24:38 +02:00
|
|
|
die( __( 'You can not edit this user' ) );
|
2019-08-08 00:36:33 +03:00
|
|
|
}
|
2018-03-20 13:24:38 +02:00
|
|
|
|
|
|
|
|
UM()->files()->delete_core_user_photo( $user_id, 'profile_photo' );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Delete cover photo AJAX handler
|
|
|
|
|
*/
|
|
|
|
|
function ajax_delete_cover_photo() {
|
2018-11-21 14:01:18 +02:00
|
|
|
UM()->check_ajax_nonce();
|
|
|
|
|
|
2018-03-20 13:24:38 +02:00
|
|
|
/**
|
|
|
|
|
* @var $user_id
|
|
|
|
|
*/
|
|
|
|
|
extract( $_REQUEST );
|
|
|
|
|
|
2019-08-08 00:36:33 +03:00
|
|
|
if ( ! UM()->roles()->um_current_user_can( 'edit', $user_id ) ) {
|
2018-03-20 13:24:38 +02:00
|
|
|
die( __( 'You can not edit this user' ) );
|
2019-08-08 00:36:33 +03:00
|
|
|
}
|
2018-03-20 13:24:38 +02:00
|
|
|
|
|
|
|
|
UM()->files()->delete_core_user_photo( $user_id, 'cover_photo' );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2019-07-05 16:08:09 +03:00
|
|
|
/**
|
|
|
|
|
* Pre-defined privacy options
|
|
|
|
|
*
|
|
|
|
|
* @return array
|
|
|
|
|
*/
|
|
|
|
|
function tabs_privacy() {
|
|
|
|
|
$privacy = array(
|
|
|
|
|
0 => __( 'Anyone', 'ultimate-member' ),
|
|
|
|
|
1 => __( 'Guests only', 'ultimate-member' ),
|
|
|
|
|
2 => __( 'Members only', 'ultimate-member' ),
|
|
|
|
|
3 => __( 'Only the owner', 'ultimate-member' ),
|
|
|
|
|
4 => __( 'Specific roles', 'ultimate-member' ),
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
return $privacy;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2018-03-20 13:24:38 +02:00
|
|
|
/**
|
|
|
|
|
* All tab data
|
|
|
|
|
*
|
2018-09-27 23:30:34 +03:00
|
|
|
* @return array
|
2018-03-20 13:24:38 +02:00
|
|
|
*/
|
|
|
|
|
function tabs() {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* UM hook
|
|
|
|
|
*
|
|
|
|
|
* @type filter
|
|
|
|
|
* @title um_profile_tabs
|
|
|
|
|
* @description Extend user profile tabs
|
|
|
|
|
* @input_vars
|
|
|
|
|
* [{"var":"$tabs","type":"array","desc":"Profile tabs"}]
|
|
|
|
|
* @change_log
|
|
|
|
|
* ["Since: 2.0"]
|
|
|
|
|
* @usage
|
|
|
|
|
* <?php add_filter( 'um_profile_tabs', 'function_name', 10, 1 ); ?>
|
|
|
|
|
* @example
|
|
|
|
|
* <?php
|
|
|
|
|
* add_filter( 'um_profile_tabs', 'my_profile_tabs', 10, 1 );
|
|
|
|
|
* function my_profile_tabs( $tabs ) {
|
|
|
|
|
* // your code here
|
|
|
|
|
* return $tabs;
|
|
|
|
|
* }
|
|
|
|
|
* ?>
|
|
|
|
|
*/
|
|
|
|
|
$tabs = apply_filters( 'um_profile_tabs', array(
|
|
|
|
|
'main' => array(
|
|
|
|
|
'name' => __( 'About', 'ultimate-member' ),
|
|
|
|
|
'icon' => 'um-faicon-user'
|
|
|
|
|
),
|
|
|
|
|
'posts' => array(
|
|
|
|
|
'name' => __( 'Posts', 'ultimate-member' ),
|
|
|
|
|
'icon' => 'um-faicon-pencil'
|
|
|
|
|
),
|
|
|
|
|
'comments' => array(
|
|
|
|
|
'name' => __( 'Comments', 'ultimate-member' ),
|
|
|
|
|
'icon' => 'um-faicon-comment'
|
|
|
|
|
)
|
|
|
|
|
) );
|
2018-05-23 09:54:54 +03:00
|
|
|
|
2018-03-20 13:24:38 +02:00
|
|
|
// disable private tabs
|
|
|
|
|
if ( ! is_admin() ) {
|
2018-06-07 12:40:41 +03:00
|
|
|
if ( is_user_logged_in() ) {
|
2019-07-05 16:08:09 +03:00
|
|
|
$user_id = um_user( 'ID' );
|
2018-06-07 12:40:41 +03:00
|
|
|
um_fetch_user( get_current_user_id() );
|
|
|
|
|
}
|
|
|
|
|
|
2018-03-20 13:24:38 +02:00
|
|
|
foreach ( $tabs as $id => $tab ) {
|
2019-07-05 13:11:57 +03:00
|
|
|
if ( ! $this->can_view_tab( $id, $tab ) ) {
|
2018-06-07 12:40:41 +03:00
|
|
|
unset( $tabs[ $id ] );
|
2018-03-20 13:24:38 +02:00
|
|
|
}
|
|
|
|
|
}
|
2018-06-07 12:40:41 +03:00
|
|
|
|
|
|
|
|
if ( is_user_logged_in() ) {
|
|
|
|
|
um_fetch_user( $user_id );
|
|
|
|
|
}
|
2018-03-20 13:24:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return $tabs;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Check if the user can view the current tab
|
|
|
|
|
*
|
2019-07-05 13:11:57 +03:00
|
|
|
* @param string $tab
|
|
|
|
|
* @param array $tab_data
|
2018-03-20 13:24:38 +02:00
|
|
|
*
|
|
|
|
|
* @return bool
|
|
|
|
|
*/
|
2019-07-05 13:11:57 +03:00
|
|
|
function can_view_tab( $tab, $tab_data = array() ) {
|
|
|
|
|
$can_view = false;
|
2018-06-07 12:40:41 +03:00
|
|
|
|
2018-11-20 15:50:42 +02:00
|
|
|
$target_id = (int) UM()->user()->target_id;
|
2018-06-07 12:40:41 +03:00
|
|
|
if ( empty( $target_id ) ) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2019-07-05 13:11:57 +03:00
|
|
|
if ( isset( $tab_data['default_privacy'] ) ) {
|
|
|
|
|
$privacy = $tab_data['default_privacy'];
|
|
|
|
|
} else {
|
2020-11-24 12:55:22 +02:00
|
|
|
$privacy = (int) UM()->options()->get( 'profile_tab_' . $tab . '_privacy' );
|
2019-07-05 13:11:57 +03:00
|
|
|
}
|
2018-03-20 13:24:38 +02:00
|
|
|
|
2019-07-05 13:11:57 +03:00
|
|
|
$privacy = apply_filters( 'um_profile_menu_tab_privacy', $privacy, $tab );
|
2018-06-07 12:40:41 +03:00
|
|
|
switch ( $privacy ) {
|
|
|
|
|
case 0:
|
|
|
|
|
$can_view = true;
|
|
|
|
|
break;
|
|
|
|
|
|
2018-03-20 13:24:38 +02:00
|
|
|
case 1:
|
2018-06-01 10:37:57 +03:00
|
|
|
$can_view = ! is_user_logged_in();
|
2018-03-20 13:24:38 +02:00
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 2:
|
2018-06-01 10:37:57 +03:00
|
|
|
$can_view = is_user_logged_in();
|
2018-03-20 13:24:38 +02:00
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 3:
|
2018-06-01 10:37:57 +03:00
|
|
|
$can_view = is_user_logged_in() && get_current_user_id() === $target_id;
|
2018-03-20 13:24:38 +02:00
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 4:
|
2018-06-07 12:40:41 +03:00
|
|
|
if ( is_user_logged_in() ) {
|
2019-07-05 13:11:57 +03:00
|
|
|
if ( isset( $tab_data['default_privacy'] ) ) {
|
|
|
|
|
$roles = isset( $tab_data['default_privacy_roles'] ) ? $tab_data['default_privacy_roles'] : array();
|
|
|
|
|
} else {
|
|
|
|
|
$roles = (array) UM()->options()->get( 'profile_tab_' . $tab . '_roles' );
|
|
|
|
|
}
|
2018-06-07 12:40:41 +03:00
|
|
|
|
|
|
|
|
$current_user_roles = um_user( 'roles' );
|
|
|
|
|
if ( ! empty( $current_user_roles ) && count( array_intersect( $current_user_roles, $roles ) ) > 0 ) {
|
2018-03-20 13:24:38 +02:00
|
|
|
$can_view = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
$can_view = true;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return $can_view;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2019-07-05 16:08:09 +03:00
|
|
|
/**
|
|
|
|
|
* Tabs that are active
|
|
|
|
|
*
|
|
|
|
|
* @return array
|
|
|
|
|
*/
|
|
|
|
|
function tabs_active() {
|
|
|
|
|
$tabs = $this->tabs();
|
|
|
|
|
|
|
|
|
|
foreach ( $tabs as $id => $info ) {
|
|
|
|
|
if ( ! empty( $info['hidden'] ) ) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ( ! UM()->options()->get( 'profile_tab_' . $id ) ) {
|
|
|
|
|
unset( $tabs[ $id ] );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2019-07-19 15:41:10 +03:00
|
|
|
if ( ! is_admin() || ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
|
|
|
|
|
/**
|
|
|
|
|
* UM hook
|
|
|
|
|
*
|
|
|
|
|
* @type filter
|
|
|
|
|
* @title um_user_profile_tabs
|
|
|
|
|
* @description Extend profile tabs
|
|
|
|
|
* @input_vars
|
|
|
|
|
* [{"var":"$tabs","type":"array","desc":"Profile Tabs"}]
|
|
|
|
|
* @change_log
|
|
|
|
|
* ["Since: 2.0"]
|
|
|
|
|
* @usage
|
|
|
|
|
* <?php add_filter( 'um_user_profile_tabs', 'function_name', 10, 1 ); ?>
|
|
|
|
|
* @example
|
|
|
|
|
* <?php
|
|
|
|
|
* add_filter( 'um_user_profile_tabs', 'my_user_profile_tabs', 10, 1 );
|
|
|
|
|
* function my_user_profile_tabs( $tabs ) {
|
|
|
|
|
* // your code here
|
|
|
|
|
* return $tabs;
|
|
|
|
|
* }
|
|
|
|
|
* ?>
|
|
|
|
|
*/
|
|
|
|
|
$tabs = apply_filters( 'um_user_profile_tabs', $tabs );
|
|
|
|
|
}
|
|
|
|
|
|
2019-07-05 16:08:09 +03:00
|
|
|
return $tabs;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2018-03-20 13:24:38 +02:00
|
|
|
/**
|
|
|
|
|
* Get active_tab
|
|
|
|
|
*
|
2018-09-27 23:30:34 +03:00
|
|
|
* @return string
|
2018-03-20 13:24:38 +02:00
|
|
|
*/
|
|
|
|
|
function active_tab() {
|
|
|
|
|
|
2019-07-19 15:41:10 +03:00
|
|
|
// get active tabs
|
|
|
|
|
$tabs = UM()->profile()->tabs_active();
|
|
|
|
|
|
|
|
|
|
if ( ! UM()->options()->get( 'profile_menu' ) ) {
|
|
|
|
|
|
|
|
|
|
$query_arg = get_query_var( 'profiletab' );
|
|
|
|
|
if ( ! empty( $query_arg ) && ! empty( $tabs[ $query_arg ]['hidden'] ) ) {
|
|
|
|
|
$this->active_tab = $query_arg;
|
|
|
|
|
} else {
|
|
|
|
|
if ( ! empty( $tabs ) ) {
|
|
|
|
|
foreach ( $tabs as $k => $tab ) {
|
|
|
|
|
if ( ! empty( $tab['hidden'] ) ) {
|
|
|
|
|
$this->active_tab = $k;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2018-03-20 13:24:38 +02:00
|
|
|
|
2019-07-19 15:41:10 +03:00
|
|
|
} else {
|
|
|
|
|
$query_arg = get_query_var( 'profiletab' );
|
|
|
|
|
if ( ! empty( $query_arg ) && ! empty( $tabs[ $query_arg ] ) ) {
|
|
|
|
|
$this->active_tab = $query_arg;
|
|
|
|
|
} else {
|
|
|
|
|
$default_tab = UM()->options()->get( 'profile_menu_default_tab' );
|
|
|
|
|
|
|
|
|
|
if ( ! empty( $tabs[ $default_tab ] ) ) {
|
|
|
|
|
$this->active_tab = $default_tab;
|
|
|
|
|
} else {
|
|
|
|
|
if ( ! empty( $tabs ) ) {
|
|
|
|
|
foreach ( $tabs as $k => $tab ) {
|
|
|
|
|
if ( ! empty( $tab['hidden'] ) ) {
|
|
|
|
|
$this->active_tab = $k;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2018-03-20 13:24:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* UM hook
|
|
|
|
|
*
|
|
|
|
|
* @type filter
|
|
|
|
|
* @title um_profile_active_tab
|
|
|
|
|
* @description Change active profile tab
|
|
|
|
|
* @input_vars
|
|
|
|
|
* [{"var":"$tab","type":"string","desc":"Active Profile tab"}]
|
|
|
|
|
* @change_log
|
|
|
|
|
* ["Since: 2.0"]
|
|
|
|
|
* @usage
|
|
|
|
|
* <?php add_filter( 'um_profile_active_tab', 'function_name', 10, 1 ); ?>
|
|
|
|
|
* @example
|
|
|
|
|
* <?php
|
|
|
|
|
* add_filter( 'um_profile_active_tab', 'my_profile_active_tab', 10, 1 );
|
|
|
|
|
* function my_profile_active_tab( $tab ) {
|
|
|
|
|
* // your code here
|
|
|
|
|
* return $tab;
|
|
|
|
|
* }
|
|
|
|
|
* ?>
|
|
|
|
|
*/
|
|
|
|
|
$this->active_tab = apply_filters( 'um_profile_active_tab', $this->active_tab );
|
|
|
|
|
|
|
|
|
|
return $this->active_tab;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get active active_subnav
|
|
|
|
|
*
|
2018-09-27 23:30:34 +03:00
|
|
|
* @return string|null
|
2018-03-20 13:24:38 +02:00
|
|
|
*/
|
|
|
|
|
function active_subnav() {
|
|
|
|
|
|
|
|
|
|
$this->active_subnav = null;
|
|
|
|
|
|
2019-08-08 00:36:33 +03:00
|
|
|
if ( get_query_var( 'subnav' ) ) {
|
|
|
|
|
$this->active_subnav = get_query_var( 'subnav' );
|
2018-03-20 13:24:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return $this->active_subnav;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Show meta in profile
|
|
|
|
|
*
|
|
|
|
|
* @param array $array Meta Array
|
|
|
|
|
* @return string
|
|
|
|
|
*/
|
|
|
|
|
function show_meta( $array ) {
|
|
|
|
|
$output = '';
|
|
|
|
|
|
|
|
|
|
if ( ! empty( $array ) ) {
|
|
|
|
|
foreach ( $array as $key ) {
|
|
|
|
|
if ( $key ) {
|
|
|
|
|
$data = array();
|
2019-05-29 18:51:22 +03:00
|
|
|
if ( isset( UM()->builtin()->all_user_fields[ $key ] ) ) {
|
2018-03-20 13:24:38 +02:00
|
|
|
$data = UM()->builtin()->all_user_fields[ $key ];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$data['in_profile_meta'] = true;
|
|
|
|
|
|
|
|
|
|
$value = um_filtered_value( $key, $data );
|
|
|
|
|
if ( ! $value )
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
if ( ! UM()->options()->get( 'profile_show_metaicon' ) ) {
|
|
|
|
|
$icon = '';
|
|
|
|
|
} else {
|
|
|
|
|
$icon = ! empty( $data['icon'] ) ? '<i class="' . $data['icon'] . '"></i>' : '';
|
|
|
|
|
}
|
|
|
|
|
|
2019-11-04 21:17:13 +02:00
|
|
|
$items[] = apply_filters( 'um_show_meta_item_html', '<span>' . $icon . $value . '</span>', $key );
|
2018-03-20 13:24:38 +02:00
|
|
|
$items[] = '<span class="b">•</span>';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ( isset( $items ) ) {
|
|
|
|
|
array_pop( $items );
|
|
|
|
|
foreach ( $items as $item ) {
|
|
|
|
|
$output .= $item;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return $output;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* New menu
|
|
|
|
|
*
|
|
|
|
|
* @param string $position
|
|
|
|
|
* @param string $element
|
|
|
|
|
* @param string $trigger
|
|
|
|
|
* @param array $items
|
2019-09-23 13:34:25 +03:00
|
|
|
* @param array $args
|
2018-03-20 13:24:38 +02:00
|
|
|
*/
|
2019-09-23 13:34:25 +03:00
|
|
|
function new_ui( $position, $element, $trigger, $items, $args = array() ) {
|
2018-03-20 13:24:38 +02:00
|
|
|
|
2019-09-23 13:34:25 +03:00
|
|
|
$additional_data = '';
|
|
|
|
|
foreach ( $args as $key => $value ) {
|
|
|
|
|
$additional_data .= " data-{$key}=\"{$value}\"";
|
|
|
|
|
} ?>
|
|
|
|
|
|
|
|
|
|
<div class="um-dropdown" data-element="<?php echo esc_attr( $element ); ?>" data-position="<?php echo esc_attr( $position ); ?>" data-trigger="<?php echo esc_attr( $trigger ); ?>"<?php echo $additional_data ?>>
|
2018-03-20 13:24:38 +02:00
|
|
|
<div class="um-dropdown-b">
|
|
|
|
|
<div class="um-dropdown-arr"><i class=""></i></div>
|
|
|
|
|
<ul>
|
|
|
|
|
<?php foreach ( $items as $k => $v ) { ?>
|
|
|
|
|
<li><?php echo $v; ?></li>
|
|
|
|
|
<?php } ?>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
}
|
2019-05-06 17:22:57 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* UM Placeholders for user link, avatar link
|
|
|
|
|
*
|
|
|
|
|
* @param $placeholders
|
|
|
|
|
*
|
|
|
|
|
* @return array
|
|
|
|
|
*/
|
|
|
|
|
function add_placeholder( $placeholders ) {
|
|
|
|
|
$placeholders[] = '{user_profile_link}';
|
|
|
|
|
$placeholders[] = '{user_avatar_url}';
|
|
|
|
|
$placeholders[] = '{password}';
|
|
|
|
|
return $placeholders;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* UM Replace Placeholders for user link, avatar link
|
|
|
|
|
*
|
|
|
|
|
* @param $replace_placeholders
|
|
|
|
|
*
|
|
|
|
|
* @return array
|
|
|
|
|
*/
|
|
|
|
|
function add_replace_placeholder( $replace_placeholders ) {
|
|
|
|
|
$replace_placeholders[] = um_get_user_avatar_url();
|
|
|
|
|
$replace_placeholders[] = um_user_profile_url();
|
|
|
|
|
$replace_placeholders[] = esc_html__( 'Your set password', 'ultimate-member' );
|
|
|
|
|
return $replace_placeholders;
|
|
|
|
|
}
|
|
|
|
|
|
2018-03-20 13:24:38 +02:00
|
|
|
}
|
2017-07-26 14:57:52 +03:00
|
|
|
}
|