mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 10:46:11 +09:00
Add $args and $user_id to 'um_after_profile_header_name'
Enhanced the action hook 'um_after_profile_header_name' by including `$args` and `$user_id` parameters. Updated documentation and examples to reflect these changes, enabling more flexible and detailed customization options for developers.
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
|
||||
- Added: Extra condition for checking the license activation requests.
|
||||
- Added: 2nd `$args` attribute to the action hook 'um_cover_area_content'.
|
||||
- Added: `$args` and `$user_id` attributes to the action hook 'um_after_profile_header_name'.
|
||||
- Added: Class `um-profile-subnav-{$subnav_id}-link` to the sub navigation links in the User Profile page.
|
||||
- Tweak: Updated `Extensions_Updater` class to use Action Scheduler in the upgrade process of the UM extensions.
|
||||
|
||||
|
||||
@@ -1230,24 +1230,24 @@ function um_profile_header( $args ) {
|
||||
*/
|
||||
do_action( 'um_after_profile_header_name_args', $args, um_user( 'ID' ) );
|
||||
/**
|
||||
* UM hook
|
||||
* Fires after profile name in the header of the User Profile.
|
||||
*
|
||||
* @type action
|
||||
* @title um_after_profile_name_inline
|
||||
* @description Insert after profile name some content
|
||||
* @change_log
|
||||
* ["Since: 2.0"]
|
||||
* @usage add_action( 'um_after_profile_name_inline', 'function_name', 10 );
|
||||
* @example
|
||||
* <?php
|
||||
* add_action( 'um_after_profile_name_inline', 'my_after_profile_name_inline', 10 );
|
||||
* function my_after_profile_name_inline() {
|
||||
* @hook um_after_profile_header_name
|
||||
*
|
||||
* @since 1.3.x
|
||||
* @since 2.11.0 Added $args and $user_id attributes.
|
||||
*
|
||||
* @param {array} $args User Profile data.
|
||||
* @param {int} $user_id User Profile ID.
|
||||
*
|
||||
* @example <caption>Display any custom content after profile name in the header of the User Profile.</caption>
|
||||
* function my_after_profile_header_name( $args, $user_id ) {
|
||||
* // your code here
|
||||
* }
|
||||
* ?>
|
||||
* add_action( 'um_after_profile_header_name', 'my_after_profile_header_name', 10, 2 );
|
||||
*/
|
||||
do_action( 'um_after_profile_header_name' ); ?>
|
||||
|
||||
do_action( 'um_after_profile_header_name', $args, um_user( 'ID' ) );
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php if ( ! empty( $args['metafields'] ) ) { ?>
|
||||
|
||||
@@ -173,6 +173,7 @@ IMPORTANT: PLEASE UPDATE THE PLUGIN TO AT LEAST VERSION 2.6.7 IMMEDIATELY. VERSI
|
||||
|
||||
* Added: Extra condition for checking the license activation requests.
|
||||
* Added: 2nd `$args` attribute to the action hook 'um_cover_area_content'.
|
||||
* Added: `$args` and `$user_id` attributes to the action hook 'um_after_profile_header_name'.
|
||||
* Added: Class `um-profile-subnav-{$subnav_id}-link` to the sub navigation links in the User Profile page.
|
||||
* Tweak: Updated `Extensions_Updater` class to use Action Scheduler in the upgrade process of the UM extensions.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user