- updated hookdocs;

- partially reviewed site health functionality;
- hide notifications tab setting when there aren't any possible notifications for disabling in User Account (#1318)
This commit is contained in:
Mykyta Synelnikov
2023-10-03 13:30:02 +03:00
parent 5942a2828e
commit 47e97ceb59
10 changed files with 365 additions and 615 deletions
+27 -41
View File
@@ -6,7 +6,7 @@
*
* Page: "Account"
*
* @version 2.6.1
* @version 2.6.12
*
* @var string $mode
* @var int $form_id
@@ -14,7 +14,8 @@
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
} ?>
}
?>
<div class="um <?php echo esc_attr( $this->get_class( $mode ) ); ?> um-<?php echo esc_attr( $form_id ); ?>">
@@ -42,7 +43,8 @@ if ( ! defined( 'ABSPATH' ) ) {
* }
* ?>
*/
do_action( 'um_account_page_hidden_fields', $args ); ?>
do_action( 'um_account_page_hidden_fields', $args );
?>
<div class="um-account-meta radius-<?php echo esc_attr( UM()->options()->get( 'profile_photocorner' ) ); ?> uimob340-show uimob500-show">
@@ -56,7 +58,7 @@ if ( ! defined( 'ABSPATH' ) ) {
</a>
<div class="um-account-profile-link">
<a href="<?php echo esc_url( um_user_profile_url() ); ?>" class="um-link">
<?php _e( 'View profile', 'ultimate-member' ); ?>
<?php esc_html_e( 'View profile', 'ultimate-member' ); ?>
</a>
</div>
</div>
@@ -97,7 +99,7 @@ if ( ! defined( 'ABSPATH' ) ) {
</a>
<div class="um-account-profile-link">
<a href="<?php echo esc_url( um_user_profile_url() ); ?>" class="um-link">
<?php _e( 'View profile', 'ultimate-member' ); ?>
<?php esc_html_e( 'View profile', 'ultimate-member' ); ?>
</a>
</div>
</div>
@@ -105,9 +107,11 @@ if ( ! defined( 'ABSPATH' ) ) {
</div>
<ul>
<?php foreach ( UM()->account()->tabs as $id => $info ) {
if ( isset( $info['custom'] ) || UM()->options()->get( "account_tab_{$id}" ) == 1 || $id == 'general' ) { ?>
<?php
foreach ( UM()->account()->tabs as $id => $info ) {
$tab_enabled = UM()->options()->get( 'account_tab_' . $id );
if ( isset( $info['custom'] ) || ! empty( $tab_enabled ) || 'general' === $id ) {
?>
<li>
<a data-tab="<?php echo esc_attr( $id )?>" href="<?php echo esc_url( UM()->account()->tab_link( $id ) ); ?>" class="um-account-link <?php if ( $id == UM()->account()->current_tab ) echo 'current'; ?>">
<?php if ( UM()->mobile()->isMobile() ) { ?>
@@ -129,44 +133,27 @@ if ( ! defined( 'ABSPATH' ) ) {
</span>
</a>
</li>
<?php }
} ?>
<?php
}
}
?>
</ul>
</div>
<div class="um-account-main" data-current_tab="<?php echo esc_attr( UM()->account()->current_tab ); ?>">
<?php
/**
* UM hook
*
* @type action
* @title um_before_form
* @description Show some content before account form
* @input_vars
* [{"var":"$args","type":"array","desc":"Account shortcode arguments"}]
* @change_log
* ["Since: 2.0"]
* @usage add_action( 'um_before_form', 'function_name', 10, 1 );
* @example
* <?php
* add_action( 'um_before_form', 'my_before_form', 10, 1 );
* function my_before_form( $args ) {
* // your code here
* }
* ?>
*/
/** This action is documented in includes/core/um-actions-profile.php */
do_action( 'um_before_form', $args );
foreach ( UM()->account()->tabs as $id => $info ) {
$tab_enabled = UM()->options()->get( 'account_tab_' . $id );
$current_tab = UM()->account()->current_tab;
if ( isset( $info['custom'] ) || UM()->options()->get( 'account_tab_' . $id ) == 1 || $id == 'general' ) { ?>
if ( isset( $info['custom'] ) || ! empty( $tab_enabled ) || 'general' === $id ) {
?>
<div class="um-account-nav uimob340-show uimob500-show">
<a href="javascript:void(0);" data-tab="<?php echo esc_attr( $id ); ?>" class="<?php if ( $id == $current_tab ) echo 'current'; ?>">
<a href="javascript:void(0);" data-tab="<?php echo esc_attr( $id ); ?>" class="<?php if ( $id === $current_tab ) echo 'current'; ?>">
<?php echo esc_html( $info['title'] ); ?>
<span class="ico"><i class="<?php echo esc_attr( $info['icon'] ); ?>"></i></span>
<span class="arr"><i class="um-faicon-angle-down"></i></span>
@@ -177,10 +164,10 @@ if ( ! defined( 'ABSPATH' ) ) {
<?php $info['with_header'] = true;
UM()->account()->render_account_tab( $id, $info, $args ); ?>
</div>
<?php }
} ?>
<?php
}
}
?>
</div>
<div class="um-clear"></div>
</form>
@@ -203,8 +190,7 @@ if ( ! defined( 'ABSPATH' ) ) {
* }
* ?>
*/
do_action( 'um_after_account_page_load' ); ?>
do_action( 'um_after_account_page_load' );
?>
</div>
</div>
+11 -128
View File
@@ -6,7 +6,7 @@
*
* Page: "Login"
*
* @version 2.6.1
* @version 2.6.12
*
* @var string $mode
* @var int $form_id
@@ -14,143 +14,26 @@
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
} ?>
}
?>
<div class="um <?php echo esc_attr( $this->get_class( $mode ) ); ?> um-<?php echo esc_attr( $form_id ); ?>">
<div class="um-form">
<form method="post" action="" autocomplete="off">
<?php
/**
* UM hook
*
* @type action
* @title um_before_form
* @description Some actions before login form
* @input_vars
* [{"var":"$args","type":"array","desc":"Login form shortcode arguments"}]
* @change_log
* ["Since: 2.0"]
* @usage add_action( 'um_before_form', 'function_name', 10, 1 );
* @example
* <?php
* add_action( 'um_before_form', 'my_before_form', 10, 1 );
* function my_before_form( $args ) {
* // your code here
* }
* ?>
*/
/** This action is documented in includes/core/um-actions-profile.php */
do_action( 'um_before_form', $args );
/**
* UM hook
*
* @type action
* @title um_before_{$mode}_fields
* @description Some actions before login form fields
* @input_vars
* [{"var":"$args","type":"array","desc":"Login form shortcode arguments"}]
* @change_log
* ["Since: 2.0"]
* @usage add_action( 'um_before_{$mode}_fields', 'function_name', 10, 1 );
* @example
* <?php
* add_action( 'um_before_{$mode}_fields', 'my_before_fields', 10, 1 );
* function my_before_form( $args ) {
* // your code here
* }
* ?>
*/
/** This action is documented in includes/core/um-actions-profile.php */
do_action( "um_before_{$mode}_fields", $args );
/**
* UM hook
*
* @type action
* @title um_main_{$mode}_fields
* @description Some actions before login form fields
* @input_vars
* [{"var":"$args","type":"array","desc":"Login form shortcode arguments"}]
* @change_log
* ["Since: 2.0"]
* @usage add_action( 'um_before_{$mode}_fields', 'function_name', 10, 1 );
* @example
* <?php
* add_action( 'um_before_{$mode}_fields', 'my_before_fields', 10, 1 );
* function my_before_form( $args ) {
* // your code here
* }
* ?>
*/
/** This action is documented in includes/core/um-actions-profile.php */
do_action( "um_main_{$mode}_fields", $args );
/**
* UM hook
*
* @type action
* @title um_after_form_fields
* @description Some actions after login form fields
* @input_vars
* [{"var":"$args","type":"array","desc":"Login form shortcode arguments"}]
* @change_log
* ["Since: 2.0"]
* @usage add_action( 'um_after_form_fields', 'function_name', 10, 1 );
* @example
* <?php
* add_action( 'um_after_form_fields', 'my_after_form_fields', 10, 1 );
* function my_after_form_fields( $args ) {
* // your code here
* }
* ?>
*/
/** This action is documented in includes/core/um-actions-profile.php */
do_action( 'um_after_form_fields', $args );
/**
* UM hook
*
* @type action
* @title um_after_{$mode}_fields
* @description Some actions after login form fields
* @input_vars
* [{"var":"$args","type":"array","desc":"Login form shortcode arguments"}]
* @change_log
* ["Since: 2.0"]
* @usage add_action( 'um_after_{$mode}_fields', 'function_name', 10, 1 );
* @example
* <?php
* add_action( 'um_after_{$mode}_fields', 'my_after_form_fields', 10, 1 );
* function my_after_form_fields( $args ) {
* // your code here
* }
* ?>
*/
/** This action is documented in includes/core/um-actions-profile.php */
do_action( "um_after_{$mode}_fields", $args );
/**
* UM hook
*
* @type action
* @title um_after_form
* @description Some actions after login form fields
* @input_vars
* [{"var":"$args","type":"array","desc":"Login form shortcode arguments"}]
* @change_log
* ["Since: 2.0"]
* @usage add_action( 'um_after_form', 'function_name', 10, 1 );
* @example
* <?php
* add_action( 'um_after_form', 'my_after_form', 10, 1 );
* function my_after_form( $args ) {
* // your code here
* }
* ?>
*/
do_action( 'um_after_form', $args ); ?>
/** This action is documented in includes/core/um-actions-profile.php */
do_action( 'um_after_form', $args );
?>
</form>
</div>
</div>
+6 -23
View File
@@ -6,7 +6,7 @@
*
* Call: function ultimatemember_password()
*
* @version 2.6.1
* @version 2.6.12
*
* @var string $mode
* @var string $rp_key
@@ -15,7 +15,8 @@
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
} ?>
}
?>
<div class="um <?php echo esc_attr( $this->get_class( $mode ) ); ?> um-<?php echo esc_attr( $form_id ); ?>">
@@ -90,27 +91,9 @@ if ( ! defined( 'ABSPATH' ) ) {
* ?>
*/
do_action( 'um_change_password_form', $args );
/**
* UM hook
*
* @type action
* @title um_after_form_fields
* @description Password change after form content
* @input_vars
* [{"var":"$args","type":"array","desc":"Password change shortcode arguments"}]
* @change_log
* ["Since: 2.0"]
* @usage add_action( 'um_after_form_fields', 'function_name', 10, 1 );
* @example
* <?php
* add_action( 'um_after_form_fields', 'my_after_form_fields', 10, 1 );
* function my_after_form_fields( $args ) {
* // your code here
* }
* ?>
*/
do_action( 'um_after_form_fields', $args ); ?>
/** This action is documented in includes/core/um-actions-profile.php */
do_action( 'um_after_form_fields', $args );
?>
</form>
</div>
</div>
+6 -23
View File
@@ -6,7 +6,7 @@
*
* Call: function ultimatemember_password()
*
* @version 2.6.1
* @version 2.6.12
*
* @var string $mode
* @var int $form_id
@@ -14,7 +14,8 @@
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
} ?>
}
?>
<div class="um <?php echo esc_attr( $this->get_class( $mode ) ); ?> um-<?php echo esc_attr( $form_id ); ?>">
<div class="um-form">
@@ -143,28 +144,10 @@ if ( ! defined( 'ABSPATH' ) ) {
* ?>
*/
do_action( 'um_reset_password_form', $args );
/**
* UM hook
*
* @type action
* @title um_after_form_fields
* @description Password reset after display form
* @input_vars
* [{"var":"$args","type":"array","desc":"Password reset shortcode arguments"}]
* @change_log
* ["Since: 2.0"]
* @usage add_action( 'um_after_form_fields', 'function_name', 10, 1 );
* @example
* <?php
* add_action( 'um_after_form_fields', 'my_after_form_fields', 10, 1 );
* function my_after_form_fields( $args ) {
* // your code here
* }
* ?>
*/
/** This action is documented in includes/core/um-actions-profile.php */
do_action( 'um_after_form_fields', $args );
} ?>
}
?>
</form>
</div>
</div>
+13 -130
View File
@@ -6,7 +6,7 @@
*
* Page: "Register"
*
* @version 2.6.1
* @version 2.6.12
*
* @var string $mode
* @var int $form_id
@@ -18,143 +18,26 @@ if ( ! defined( 'ABSPATH' ) ) {
if ( ! is_user_logged_in() ) {
um_reset_user();
} ?>
}
?>
<div class="um <?php echo esc_attr( $this->get_class( $mode ) ); ?> um-<?php echo esc_attr( $form_id ); ?>">
<div class="um-form" data-mode="<?php echo esc_attr( $mode ) ?>">
<div class="um-form" data-mode="<?php echo esc_attr( $mode ); ?>">
<form method="post" action="">
<?php
/**
* UM hook
*
* @type action
* @title um_before_form
* @description Some actions before register form
* @input_vars
* [{"var":"$args","type":"array","desc":"Register form shortcode arguments"}]
* @change_log
* ["Since: 2.0"]
* @usage add_action( 'um_before_form', 'function_name', 10, 1 );
* @example
* <?php
* add_action( 'um_before_form', 'my_before_form', 10, 1 );
* function my_before_form( $args ) {
* // your code here
* }
* ?>
*/
do_action( "um_before_form", $args );
/**
* UM hook
*
* @type action
* @title um_before_{$mode}_fields
* @description Some actions before register form fields
* @input_vars
* [{"var":"$args","type":"array","desc":"Register form shortcode arguments"}]
* @change_log
* ["Since: 2.0"]
* @usage add_action( 'um_before_{$mode}_fields', 'function_name', 10, 1 );
* @example
* <?php
* add_action( 'um_before_{$mode}_fields', 'my_before_fields', 10, 1 );
* function my_before_form( $args ) {
* // your code here
* }
* ?>
*/
/** This action is documented in includes/core/um-actions-profile.php */
do_action( 'um_before_form', $args );
/** This action is documented in includes/core/um-actions-profile.php */
do_action( "um_before_{$mode}_fields", $args );
/**
* UM hook
*
* @type action
* @title um_before_{$mode}_fields
* @description Some actions before register form fields
* @input_vars
* [{"var":"$args","type":"array","desc":"Register form shortcode arguments"}]
* @change_log
* ["Since: 2.0"]
* @usage add_action( 'um_before_{$mode}_fields', 'function_name', 10, 1 );
* @example
* <?php
* add_action( 'um_before_{$mode}_fields', 'my_before_fields', 10, 1 );
* function my_before_form( $args ) {
* // your code here
* }
* ?>
*/
/** This action is documented in includes/core/um-actions-profile.php */
do_action( "um_main_{$mode}_fields", $args );
/**
* UM hook
*
* @type action
* @title um_after_form_fields
* @description Some actions after register form fields
* @input_vars
* [{"var":"$args","type":"array","desc":"Register form shortcode arguments"}]
* @change_log
* ["Since: 2.0"]
* @usage add_action( 'um_after_form_fields', 'function_name', 10, 1 );
* @example
* <?php
* add_action( 'um_after_form_fields', 'my_after_form_fields', 10, 1 );
* function my_after_form_fields( $args ) {
* // your code here
* }
* ?>
*/
/** This action is documented in includes/core/um-actions-profile.php */
do_action( 'um_after_form_fields', $args );
/**
* UM hook
*
* @type action
* @title um_after_{$mode}_fields
* @description Some actions after register form fields
* @input_vars
* [{"var":"$args","type":"array","desc":"Register form shortcode arguments"}]
* @change_log
* ["Since: 2.0"]
* @usage add_action( 'um_after_{$mode}_fields', 'function_name', 10, 1 );
* @example
* <?php
* add_action( 'um_after_{$mode}_fields', 'my_after_form_fields', 10, 1 );
* function my_after_form_fields( $args ) {
* // your code here
* }
* ?>
*/
/** This action is documented in includes/core/um-actions-profile.php */
do_action( "um_after_{$mode}_fields", $args );
/**
* UM hook
*
* @type action
* @title um_after_form
* @description Some actions after register form fields
* @input_vars
* [{"var":"$args","type":"array","desc":"Register form shortcode arguments"}]
* @change_log
* ["Since: 2.0"]
* @usage add_action( 'um_after_form', 'function_name', 10, 1 );
* @example
* <?php
* add_action( 'um_after_form', 'my_after_form', 10, 1 );
* function my_after_form( $args ) {
* // your code here
* }
* ?>
*/
do_action( 'um_after_form', $args ); ?>
/** This action is documented in includes/core/um-actions-profile.php */
do_action( 'um_after_form', $args );
?>
</form>
</div>
</div>