Skip to content

Instantly share code, notes, and snippets.

@KaineLabs
Created March 3, 2022 23:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KaineLabs/640d799f206d768083dddfcfb4ae3e08 to your computer and use it in GitHub Desktop.
Save KaineLabs/640d799f206d768083dddfcfb4ae3e08 to your computer and use it in GitHub Desktop.
Youzify - BuddyPress Add Info Group Fields Description
<?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