slaFFik
11/24/2014 - 9:20 PM

xprofile-field-message.php

<?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');
?>