The button on the front end is displayed with:
do_action( 'profile_personal_options', $profileuser );
And it is updated with:
do_action( 'personal_options_update', $user_id );
do_action( 'edit_user_profile_update', $user_id );
What actions am I missing?
Searched through the SFC plugin files and I found a solution!
in sfc-login.php I replaced the following line:
add_action('admin_footer','sfc_login_update_js',30);
with
add_action('wp_footer','sfc_login_update_js',30);
and in the same file sfc-login.php in the sfc_login_update_js function I replaced
if (defined('IS_PROFILE_PAGE')) {
with
if (is_page('profile')) {
What this does is that it displays the piece of javascript in the wp_footer and it only displays when on my edit profile front end page.
Normally, the piece of javascript only displays in admin_footer and on the Edit Profile back end page.
It’s probably a pretty dirty solution, and I don’t know if there are any security issues, but it works!
Thank you heaps for this!
Could you go into a little bit more depth with your edited code? I am close, managed to get the connect with FB to show up on front end.
However it won’t refresh and show the connection.
Also I am having trouble disconnecting accounts once connected, not sure what going on there 😐
If you could post your edited sfc-login.php and give me any tips that would be great!
Wish they had a shortcode for doing what we are trying.
The fact that it does not refresh and show the connection is probably because of the absence of the javascript code in your footer.
The same for the disconnecting.
open your sfc-login.php and do a search (ctrl + f) for:
add_action('admin_footer','sfc_login_update_js',30);
and replace that exact line with:
add_action('wp_footer','sfc_login_update_js',30);
Then, do another search for:
if (defined('IS_PROFILE_PAGE'))
and replace that exact line with:
if (is_page('profile'))
My frontend edit profile page where the wpuf editprofile shortcode is located is named ‘Profile’ and has the slug ‘Profile’.. so that’s why
it is is_page('profile')
.. if the page where your wpuf shortcode is located has another name, for example: Editpage.. then the code will be:
if (is_page('Editpage'))