• I’m coding a plugin that adds a custom profile option to the settings.
    I first used the show_user_profile hook to add my custom fields but I decided that that would look too messy and put the options in a separate page.
    I used add_submenu_page to add one to the users section.
    Now the problem is that I cannot use the profile_update callback any more so I have to come up with a different way to do this.
    I could use the settings API and use the sanitize hook to add the metadata to the users but that feels rather hackish. Also I do not need to add the settings data to the plugin since it’s user data and will ‘manually’ be added by using update_user_meta. If I use an external php script to receive the post request, at least in my understanding, I won’t have access to the wordpress functions anymore and cannot manipulate the user data that way.
    Is there a way to register a callback for a POST request?
    I’m quite new to PHP and wordpress so perhaps there is something painfully obvious that I am not seeing.

  • The topic ‘Custom User Profile’ is closed to new replies.