Support » Plugin: Restrict Content » Remove custom fields (and save empty values)

Viewing 2 replies - 1 through 2 (of 2 total)
  • Think I solved it:

    if( ! empty( $_POST[‘rcp_youtube’] ) ) {
    update_user_meta( $user_id, ‘rcp_youtube’, esc_url_raw( $_POST[‘rcp_youtube’] ) );
    } else {
    // Delete the user meta if the box is unchecked.
    delete_user_meta( $user_id, ‘rcp_youtube’ );
    }

    Plugin Author John Parris

    (@mindctrl)

    Hi @ladygeekgeek,

    Glad to hear you figured it out! 🙂

    If you have any more questions, shoot us an email here. (the wordpress.org forum policy doesn’t allow us to support the Pro version here)

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Remove custom fields (and save empty values)’ is closed to new replies.