[Resolved] xProfile field being created with every reload
-
I’m using following snippet to create xProfile fields in a custom plugin:
`
add_action(‘bp_init’, ‘field_xprofile_twitter’);function field_xprofile_twitter()
{
global $wpdb;
xprofile_insert_field(
array (
field_group_id => 1,
name => ‘WWWYKI’,
can_delete => false, // Doesn’t work *
field_order => 1,
is_required => false,
description => ‘Woo Woo Woo You Know it, bro!’,
type => ‘textbox’
)
);
}
`
But it’s creating a new field every time the script runs. Is there a way to prevent that from happening?
- The topic ‘[Resolved] xProfile field being created with every reload’ is closed to new replies.