$social_site ) { $label = ucfirst( $key ); if ( $key == 'google-plus' ) { $label = 'Google Plus'; } elseif ( $key == 'rss' ) { $label = 'RSS'; } elseif ( $key == 'soundcloud' ) { $label = 'SoundCloud'; } elseif ( $key == 'slideshare' ) { $label = 'SlideShare'; } elseif ( $key == 'codepen' ) { $label = 'CodePen'; } elseif ( $key == 'stumbleupon' ) { $label = 'StumbleUpon'; } elseif ( $key == 'deviantart' ) { $label = 'DeviantArt'; } elseif ( $key == 'hacker-news' ) { $label = 'Hacker News'; } elseif ( $key == 'whatsapp' ) { $label = 'WhatsApp'; } elseif ( $key == 'qq' ) { $label = 'QQ'; } elseif ( $key == 'vk' ) { $label = 'VK'; } elseif ( $key == 'wechat' ) { $label = 'WeChat'; } elseif ( $key == 'tencent-weibo' ) { $label = 'Tencent Weibo'; } elseif ( $key == 'paypal' ) { $label = 'PayPal'; } elseif ( $key == 'email-form' ) { $label = 'Contact Form'; } elseif ( $key == 'google-wallet' ) { $label = 'Google Wallet'; } ?>

'/>
$social_site ) { if ( $key == 'email' ) { // if email, only accept 'mailto' protocol if ( isset( $_POST["$key-profile"] ) ) { update_user_meta( $user_id, $social_site, sanitize_email( wp_unslash( $_POST["$key-profile"] ) ) ); } } elseif ( $key == 'skype' ) { // accept skype protocol if ( isset( $_POST["$key-profile"] ) ) { update_user_meta( $user_id, $social_site, esc_url_raw( wp_unslash( $_POST["$key-profile"] ), array( 'http', 'https', 'skype' ) ) ); } } else { if ( isset( $_POST["$key-profile"] ) ) { update_user_meta( $user_id, $social_site, esc_url_raw( wp_unslash( $_POST["$key-profile"] ) ) ); } } } } } add_action( 'personal_options_update', 'startup_blog_save_social_profiles' ); add_action( 'edit_user_profile_update', 'startup_blog_save_social_profiles' );