Skip to content

Instantly share code, notes, and snippets.

@slaFFik
Forked from BoweFrankema/xprofile-field-message.php
Last active February 3, 2020 11:25
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 slaFFik/cfdf3d2ca96c4ca83d66 to your computer and use it in GitHub Desktop.
Save slaFFik/cfdf3d2ca96c4ca83d66 to your computer and use it in GitHub Desktop.
<?php
// Profile Edit Message
function cf_profile_field_intro_text() {
global $bp;
$user_id = bp_loggedin_user_id();
$profile_edit_link = bp_loggedin_user_domain() . $bp->profile->slug . 'profile/edit/group/2/';
if ( bp_get_profile_field_data( 'field=Your Relationship with CF&user_id='.$user_id) == FALSE && !bp_is_profile_edit() ) : ?>
<div id="complete-profile-message" class="intro-text important">
<img class='avatar user-2-avatar avatar-80 photo'src='<?php echo home_url(); ?>/wp-content/themes/cfcommunity/assets/img/cfchimp-large.png'/>
<?php printf( __( "Hey there!, you have not completed your profile yet. This is probably because you have created your account through Facebook. Please <a href='%s'>Complete Your Profile</a> and I will go back to eating those calorie rich bananas!", 'cfcommunity' ), bp_loggedin_user_domain() . $bp->profile->slug . '/edit/group/2/' );?>
</div>
<?php endif;
}
add_action('wp_head','cf_profile_field_intro_text');
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment