Created
March 3, 2022 23:46
-
-
Save KaineLabs/640d799f206d768083dddfcfb4ae3e08 to your computer and use it in GitHub Desktop.
Youzify - BuddyPress Add Info Group Fields Description
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Youzify - BuddyPress Add Info Group Fields Description. | |
*/ | |
add_action( 'youzify_before_account_settings_form', 'yzc_add_field_group_description' ); | |
function yzc_add_field_group_description() { | |
// Get Current Page. | |
if ( bp_current_action() != 'edit' ) { | |
return; | |
} | |
$group_data = BP_XProfile_Group::get( | |
array( 'profile_group_id' => bp_get_current_profile_group_id() ) | |
); | |
if ( ! empty( $group_data ) && ! empty( $group_data[0]->description ) ) { | |
echo '<span style="margin-top: 15px;padding: 19px 50px 0;display: block;color: #898989;font-size: 15px;">' . $group_data[0]->description . '</span>'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment