Skip to:
Content
Pages
Categories
Search
Top
Bottom

User edit form won't show custom contact fields after save.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Oops! It looks like this patch did not make it into the 2.1.3 branch, it is ready to go in 2.2 for when it is released.


    robertFudge
    Participant

    @robertfudge

    Any idea when the next release is scheduled? I have not been able to resolve this from the method explained. Thanks.

    No specific date yet though it is not far away…


    robertFudge
    Participant

    @robertfudge

    Great.


    robertFudge
    Participant

    @robertfudge

    I like to also know if the new release will read the WP profile fields added by “cimy user extra fields” plugin?


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    @robertfudge – unlikely, though it depends how that plugin adds fields. WordPress only provides one hook for adding extra profile fields, and it’s not robust enough to do very much with.


    robertFudge
    Participant

    @robertfudge

    Added manually for development purposes… how can I hook these into bb profile and save them from there? I have been working on this for 2 days with no success. At this point I can not change bbpress, I need a way to do this. Thanks in Advance.


    add_action( 'show_user_profile', 'extra_user_profile_fields' );
    add_action( 'edit_user_profile', 'extra_user_profile_fields' );

    function extra_user_profile_fields( $user ) { ?>

    <input type="text" name="address" id="address" value="ID ) ); ?>" class="regular-text" />

    <input type="text" name="city" id="city" value="ID ) ); ?>" class="regular-text" />

    <input type="text" name="province" id="province" value="ID ) ); ?>" class="regular-text" />

    <input type="text" name="postalcode" id="postalcode" value="ID ) ); ?>" class="regular-text" />

    < ?php }

    add_action( 'personal_options_update', 'save_extra_user_profile_fields' );
    add_action( 'edit_user_profile_update', 'save_extra_user_profile_fields' );

    function save_extra_user_profile_fields( $user_id ) {

    if ( !current_user_can( 'edit_user', $user_id ) ) { return false; }

    update_user_meta( $user_id, 'address', $_POST['address'] );
    update_user_meta( $user_id, 'city', $_POST['city'] );
    update_user_meta( $user_id, 'province', $_POST['province'] );
    update_user_meta( $user_id, 'postalcode', $_POST['postalcode'] );
    }

    • This reply was modified 1 year, 5 months ago by  robertFudge.
    • This reply was modified 1 year, 5 months ago by  robertFudge.
    • This reply was modified 1 year, 5 months ago by  robertFudge.
    • This reply was modified 1 year, 5 months ago by  robertFudge.

    robertFudge
    Participant

    @robertfudge

    I took another approach and used WP User Frontend Plugin and just pointed to that.

Viewing 8 replies - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.