0

Hi Guys,

I'm trying to get an image to show instead of text in this button array

$button = array(
	'id'                => 'not_friends',
	'component'         => 'friends',
	'must_be_logged_in' => true,
	'block_self'        => true,
	'wrapper_class'     => 'friendship-button not_friends',
	'wrapper_id'        => 'friendship-button-' . $potential_friend_id,
	'link_class'        => '',
	'link_href'         => wp_nonce_url( $bp->loggedin_user->domain . $bp->friends->slug . '/add-friend/' . $potential_friend_id . '/', 'friends_add_friend' ),	'link_text'         => __( 'Follow', 'buddypress' ),
	'link_title'        => __( 'Follow', 'buddypress' ),
	'link_id'           => 'friend-' . $potential_friend_id,
	'link_rel'          => 'add',
	'link_class'        => 'add'
	'src'		    => 'http://www.pixelcove.co.uk/images/addcontact.png';
		);
break;

Obviously this is wrong, but does anyone have any idea how to get an image to show up?

Many Thanks

Chris

3
Contributors
4
Replies
5
Views
6 Years
Discussion Span
Last Post by diafol
0

THe above looked ok I suppose. It's the code that builds the button from the array that needs investigation.

0

THe above looked ok I suppose. It's the code that builds the button from the array that needs investigation.

This is code that builds the button (I think lol)

// Filter and return the HTML button
		return bp_get_button( apply_filters( 'bp_get_add_friend_button', $button ) );
0

An array holds data, it does not display anything.

As Ardav says, I suspect that the output of your <input> or <button> tag is what is causing the issue here.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.