|
<?php |
|
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/ |
|
|
|
/* Remove Yoast SEO Social Profiles From All Users |
|
* Credit: Yoast Developers |
|
* Last Tested: Dec 8th, 2021 using Yoast SEO Premium 17.6 on WordPress 5.8.2 |
|
*/ |
|
|
|
add_filter('user_contactmethods', 'yoast_seo_admin_user_remove_social', 99); |
|
|
|
/** |
|
* Remove annoying Yoast social fields from user profile forms. |
|
* @see https://gist.github.com/amboutwe/36a08f9d369860aec99500726065bd3f |
|
*/ |
|
public function yoast_seo_admin_user_remove_social($contactmethods) |
|
{ |
|
// we want none of them, remove them all by returning |
|
// an empty array. |
|
$contactmethods = array(); |
|
|
|
// or... remove one at a time... and return the modified $contactmethods |
|
//unset($contactmethods['facebook']); |
|
//unset($contactmethods['instagram']); |
|
//unset($contactmethods['linkedin']); |
|
//unset($contactmethods['myspace']); |
|
//unset($contactmethods['pinterest']); |
|
//unset($contactmethods['soundcloud']); |
|
//unset($contactmethods['tumblr']); |
|
//unset($contactmethods['twitter']); |
|
//unset($contactmethods['youtube']); |
|
//unset($contactmethods['wikipedia']); |
|
//unset($contactmethods['author_email']); |
|
//unset($contactmethods['author_facebook']); |
|
//unset($contactmethods['author_twitter']); |
|
//unset($contactmethods['author_linkedin']); |
|
//unset($contactmethods['author_dribble']); |
|
//unset($contactmethods['author_whatsapp']); |
|
//unset($contactmethods['author_custom']); |
|
return $contactmethods; |
|
} |