Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] xProfile field being created with every reload


  • Hardeep Asrani
    Participant

    @hardeepasrani

    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?

Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Resolved] xProfile field being created with every reload’ is closed to new replies.
Skip to toolbar