2023-04-07 11:33:22 +03:00
|
|
|
<?php
|
|
|
|
|
/**
|
2023-04-11 16:25:25 +03:00
|
|
|
* Template for the profile page
|
|
|
|
|
*
|
|
|
|
|
* This template can be overridden by copying it to yourtheme/ultimate-member/profile.php
|
|
|
|
|
*
|
|
|
|
|
* Page: "Profile"
|
|
|
|
|
*
|
2023-04-17 17:24:42 +03:00
|
|
|
* @version 2.6.1
|
2023-04-11 16:25:25 +03:00
|
|
|
*
|
|
|
|
|
* @var string $mode
|
|
|
|
|
* @var int $form_id
|
|
|
|
|
* @var array $args
|
2023-04-07 11:33:22 +03:00
|
|
|
*/
|
2023-04-11 16:25:25 +03:00
|
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
|
|
|
|
exit;
|
|
|
|
|
} ?>
|
2019-07-17 16:55:09 +03:00
|
|
|
|
2019-07-16 18:40:07 +03:00
|
|
|
<div class="um <?php echo esc_attr( $this->get_class( $mode ) ); ?> um-<?php echo esc_attr( $form_id ); ?> um-role-<?php echo esc_attr( um_user( 'role' ) ); ?> ">
|
2014-12-15 22:38:07 +02:00
|
|
|
|
2020-01-16 10:25:30 +02:00
|
|
|
<div class="um-form" data-mode="<?php echo esc_attr( $mode ) ?>">
|
2019-08-08 00:36:33 +03:00
|
|
|
|
2018-03-05 16:35:51 +02:00
|
|
|
<?php
|
|
|
|
|
/**
|
|
|
|
|
* UM hook
|
|
|
|
|
*
|
|
|
|
|
* @type action
|
|
|
|
|
* @title um_profile_before_header
|
|
|
|
|
* @description Some actions before profile form header
|
|
|
|
|
* @input_vars
|
|
|
|
|
* [{"var":"$args","type":"array","desc":"Profile form shortcode arguments"}]
|
|
|
|
|
* @change_log
|
|
|
|
|
* ["Since: 2.0"]
|
|
|
|
|
* @usage add_action( 'um_profile_before_header', 'function_name', 10, 1 );
|
|
|
|
|
* @example
|
|
|
|
|
* <?php
|
|
|
|
|
* add_action( 'um_profile_before_header', 'my_profile_before_header', 10, 1 );
|
|
|
|
|
* function my_profile_before_header( $args ) {
|
|
|
|
|
* // your code here
|
|
|
|
|
* }
|
|
|
|
|
* ?>
|
|
|
|
|
*/
|
|
|
|
|
do_action( 'um_profile_before_header', $args );
|
2018-03-02 09:55:49 +02:00
|
|
|
|
|
|
|
|
if ( um_is_on_edit_profile() ) { ?>
|
|
|
|
|
<form method="post" action="">
|
|
|
|
|
<?php }
|
|
|
|
|
|
2018-03-05 16:35:51 +02:00
|
|
|
/**
|
|
|
|
|
* UM hook
|
|
|
|
|
*
|
|
|
|
|
* @type action
|
|
|
|
|
* @title um_profile_header_cover_area
|
|
|
|
|
* @description Profile header cover area
|
|
|
|
|
* @input_vars
|
|
|
|
|
* [{"var":"$args","type":"array","desc":"Profile form shortcode arguments"}]
|
|
|
|
|
* @change_log
|
|
|
|
|
* ["Since: 2.0"]
|
|
|
|
|
* @usage add_action( 'um_profile_header_cover_area', 'function_name', 10, 1 );
|
|
|
|
|
* @example
|
|
|
|
|
* <?php
|
|
|
|
|
* add_action( 'um_profile_header_cover_area', 'my_profile_header_cover_area', 10, 1 );
|
|
|
|
|
* function my_profile_header_cover_area( $args ) {
|
|
|
|
|
* // your code here
|
|
|
|
|
* }
|
|
|
|
|
* ?>
|
|
|
|
|
*/
|
|
|
|
|
do_action( 'um_profile_header_cover_area', $args );
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* UM hook
|
|
|
|
|
*
|
|
|
|
|
* @type action
|
|
|
|
|
* @title um_profile_header
|
|
|
|
|
* @description Profile header area
|
|
|
|
|
* @input_vars
|
|
|
|
|
* [{"var":"$args","type":"array","desc":"Profile form shortcode arguments"}]
|
|
|
|
|
* @change_log
|
|
|
|
|
* ["Since: 2.0"]
|
|
|
|
|
* @usage add_action( 'um_profile_header', 'function_name', 10, 1 );
|
|
|
|
|
* @example
|
|
|
|
|
* <?php
|
|
|
|
|
* add_action( 'um_profile_header', 'my_profile_header', 10, 1 );
|
|
|
|
|
* function my_profile_header( $args ) {
|
|
|
|
|
* // your code here
|
|
|
|
|
* }
|
|
|
|
|
* ?>
|
|
|
|
|
*/
|
|
|
|
|
do_action( 'um_profile_header', $args );
|
2018-03-02 09:55:49 +02:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* UM hook
|
|
|
|
|
*
|
|
|
|
|
* @type filter
|
|
|
|
|
* @title um_profile_navbar_classes
|
|
|
|
|
* @description Additional classes for profile navbar
|
|
|
|
|
* @input_vars
|
|
|
|
|
* [{"var":"$classes","type":"string","desc":"UM Posts Tab query"}]
|
|
|
|
|
* @change_log
|
|
|
|
|
* ["Since: 2.0"]
|
|
|
|
|
* @usage
|
|
|
|
|
* <?php add_filter( 'um_profile_navbar_classes', 'function_name', 10, 1 ); ?>
|
|
|
|
|
* @example
|
|
|
|
|
* <?php
|
|
|
|
|
* add_filter( 'um_profile_navbar_classes', 'my_profile_navbar_classes', 10, 1 );
|
|
|
|
|
* function my_profile_navbar_classes( $classes ) {
|
|
|
|
|
* // your code here
|
|
|
|
|
* return $classes;
|
|
|
|
|
* }
|
|
|
|
|
* ?>
|
|
|
|
|
*/
|
|
|
|
|
$classes = apply_filters( 'um_profile_navbar_classes', '' ); ?>
|
|
|
|
|
|
2019-07-16 18:40:07 +03:00
|
|
|
<div class="um-profile-navbar <?php echo esc_attr( $classes ); ?>">
|
2018-03-05 16:35:51 +02:00
|
|
|
<?php
|
|
|
|
|
/**
|
|
|
|
|
* UM hook
|
|
|
|
|
*
|
|
|
|
|
* @type action
|
|
|
|
|
* @title um_profile_navbar
|
|
|
|
|
* @description Profile navigation bar
|
|
|
|
|
* @input_vars
|
|
|
|
|
* [{"var":"$args","type":"array","desc":"Profile form shortcode arguments"}]
|
|
|
|
|
* @change_log
|
|
|
|
|
* ["Since: 2.0"]
|
|
|
|
|
* @usage add_action( 'um_profile_navbar', 'function_name', 10, 1 );
|
|
|
|
|
* @example
|
|
|
|
|
* <?php
|
|
|
|
|
* add_action( 'um_profile_navbar', 'my_profile_navbar', 10, 1 );
|
|
|
|
|
* function my_profile_navbar( $args ) {
|
|
|
|
|
* // your code here
|
|
|
|
|
* }
|
|
|
|
|
* ?>
|
|
|
|
|
*/
|
|
|
|
|
do_action( 'um_profile_navbar', $args ); ?>
|
2018-03-02 09:55:49 +02:00
|
|
|
<div class="um-clear"></div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2018-03-05 16:35:51 +02:00
|
|
|
<?php
|
|
|
|
|
/**
|
|
|
|
|
* UM hook
|
|
|
|
|
*
|
|
|
|
|
* @type action
|
|
|
|
|
* @title um_profile_menu
|
|
|
|
|
* @description Profile menu
|
|
|
|
|
* @input_vars
|
|
|
|
|
* [{"var":"$args","type":"array","desc":"Profile form shortcode arguments"}]
|
|
|
|
|
* @change_log
|
|
|
|
|
* ["Since: 2.0"]
|
|
|
|
|
* @usage add_action( 'um_profile_menu', 'function_name', 10, 1 );
|
|
|
|
|
* @example
|
|
|
|
|
* <?php
|
|
|
|
|
* add_action( 'um_profile_menu', 'my_profile_navbar', 10, 1 );
|
|
|
|
|
* function my_profile_navbar( $args ) {
|
|
|
|
|
* // your code here
|
|
|
|
|
* }
|
|
|
|
|
* ?>
|
|
|
|
|
*/
|
|
|
|
|
do_action( 'um_profile_menu', $args );
|
2018-03-02 09:55:49 +02:00
|
|
|
|
2019-10-23 17:40:35 +03:00
|
|
|
if ( um_is_on_edit_profile() || UM()->user()->preview ) {
|
2019-07-19 15:41:10 +03:00
|
|
|
|
2019-08-01 14:23:13 +03:00
|
|
|
$nav = 'main';
|
|
|
|
|
$subnav = UM()->profile()->active_subnav();
|
|
|
|
|
$subnav = ! empty( $subnav ) ? $subnav : 'default'; ?>
|
2019-07-19 15:41:10 +03:00
|
|
|
|
|
|
|
|
<div class="um-profile-body <?php echo esc_attr( $nav . ' ' . $nav . '-' . $subnav ); ?>">
|
|
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
/**
|
|
|
|
|
* UM hook
|
|
|
|
|
*
|
|
|
|
|
* @type action
|
|
|
|
|
* @title um_profile_content_{$nav}
|
|
|
|
|
* @description Custom hook to display tabbed content
|
|
|
|
|
* @input_vars
|
|
|
|
|
* [{"var":"$args","type":"array","desc":"Profile form shortcode arguments"}]
|
|
|
|
|
* @change_log
|
|
|
|
|
* ["Since: 2.0"]
|
|
|
|
|
* @usage add_action( 'um_profile_content_{$nav}', 'function_name', 10, 1 );
|
|
|
|
|
* @example
|
|
|
|
|
* <?php
|
|
|
|
|
* add_action( 'um_profile_content_{$nav}', 'my_profile_content', 10, 1 );
|
|
|
|
|
* function my_profile_content( $args ) {
|
|
|
|
|
* // your code here
|
|
|
|
|
* }
|
|
|
|
|
* ?>
|
|
|
|
|
*/
|
|
|
|
|
do_action("um_profile_content_{$nav}", $args);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* UM hook
|
|
|
|
|
*
|
|
|
|
|
* @type action
|
|
|
|
|
* @title um_profile_content_{$nav}_{$subnav}
|
|
|
|
|
* @description Custom hook to display tabbed content
|
|
|
|
|
* @input_vars
|
|
|
|
|
* [{"var":"$args","type":"array","desc":"Profile form shortcode arguments"}]
|
|
|
|
|
* @change_log
|
|
|
|
|
* ["Since: 2.0"]
|
|
|
|
|
* @usage add_action( 'um_profile_content_{$nav}_{$subnav}', 'function_name', 10, 1 );
|
|
|
|
|
* @example
|
|
|
|
|
* <?php
|
|
|
|
|
* add_action( 'um_profile_content_{$nav}_{$subnav}', 'my_profile_content', 10, 1 );
|
|
|
|
|
* function my_profile_content( $args ) {
|
|
|
|
|
* // your code here
|
|
|
|
|
* }
|
|
|
|
|
* ?>
|
|
|
|
|
*/
|
|
|
|
|
do_action( "um_profile_content_{$nav}_{$subnav}", $args ); ?>
|
|
|
|
|
|
|
|
|
|
<div class="clear"></div>
|
|
|
|
|
</div>
|
2018-03-02 09:55:49 +02:00
|
|
|
|
2019-10-23 17:40:35 +03:00
|
|
|
<?php if ( ! UM()->user()->preview ) { ?>
|
2018-03-02 09:55:49 +02:00
|
|
|
|
2019-10-23 17:40:35 +03:00
|
|
|
</form>
|
|
|
|
|
|
|
|
|
|
<?php }
|
|
|
|
|
} else {
|
2019-08-01 14:23:13 +03:00
|
|
|
$menu_enabled = UM()->options()->get( 'profile_menu' );
|
|
|
|
|
$tabs = UM()->profile()->tabs_active();
|
|
|
|
|
|
|
|
|
|
$nav = UM()->profile()->active_tab();
|
|
|
|
|
$subnav = UM()->profile()->active_subnav();
|
|
|
|
|
$subnav = ! empty( $subnav ) ? $subnav : 'default';
|
|
|
|
|
|
|
|
|
|
if ( $menu_enabled || ! empty( $tabs[ $nav ]['hidden'] ) ) { ?>
|
|
|
|
|
|
|
|
|
|
<div class="um-profile-body <?php echo esc_attr( $nav . ' ' . $nav . '-' . $subnav ); ?>">
|
|
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
// Custom hook to display tabbed content
|
|
|
|
|
/**
|
|
|
|
|
* UM hook
|
|
|
|
|
*
|
|
|
|
|
* @type action
|
|
|
|
|
* @title um_profile_content_{$nav}
|
|
|
|
|
* @description Custom hook to display tabbed content
|
|
|
|
|
* @input_vars
|
|
|
|
|
* [{"var":"$args","type":"array","desc":"Profile form shortcode arguments"}]
|
|
|
|
|
* @change_log
|
|
|
|
|
* ["Since: 2.0"]
|
|
|
|
|
* @usage add_action( 'um_profile_content_{$nav}', 'function_name', 10, 1 );
|
|
|
|
|
* @example
|
|
|
|
|
* <?php
|
|
|
|
|
* add_action( 'um_profile_content_{$nav}', 'my_profile_content', 10, 1 );
|
|
|
|
|
* function my_profile_content( $args ) {
|
|
|
|
|
* // your code here
|
|
|
|
|
* }
|
|
|
|
|
* ?>
|
|
|
|
|
*/
|
|
|
|
|
do_action("um_profile_content_{$nav}", $args);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* UM hook
|
|
|
|
|
*
|
|
|
|
|
* @type action
|
|
|
|
|
* @title um_profile_content_{$nav}_{$subnav}
|
|
|
|
|
* @description Custom hook to display tabbed content
|
|
|
|
|
* @input_vars
|
|
|
|
|
* [{"var":"$args","type":"array","desc":"Profile form shortcode arguments"}]
|
|
|
|
|
* @change_log
|
|
|
|
|
* ["Since: 2.0"]
|
|
|
|
|
* @usage add_action( 'um_profile_content_{$nav}_{$subnav}', 'function_name', 10, 1 );
|
|
|
|
|
* @example
|
|
|
|
|
* <?php
|
|
|
|
|
* add_action( 'um_profile_content_{$nav}_{$subnav}', 'my_profile_content', 10, 1 );
|
|
|
|
|
* function my_profile_content( $args ) {
|
|
|
|
|
* // your code here
|
|
|
|
|
* }
|
|
|
|
|
* ?>
|
|
|
|
|
*/
|
|
|
|
|
do_action( "um_profile_content_{$nav}_{$subnav}", $args ); ?>
|
|
|
|
|
|
|
|
|
|
<div class="clear"></div>
|
|
|
|
|
</div>
|
2018-10-22 21:53:43 +03:00
|
|
|
|
2019-08-01 14:23:13 +03:00
|
|
|
<?php }
|
|
|
|
|
}
|
2018-10-22 21:53:43 +03:00
|
|
|
|
|
|
|
|
do_action( 'um_profile_footer', $args ); ?>
|
2014-12-15 22:38:07 +02:00
|
|
|
</div>
|
2023-02-14 11:44:14 +02:00
|
|
|
</div>
|