From 87a37944805901e213f166601190dd9aa62a0073 Mon Sep 17 00:00:00 2001 From: Ken Gagne Date: Tue, 9 Nov 2021 08:54:48 -0700 Subject: [PATCH] Remove deprecated social media fields MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These were deprecated in/hidden since WP 3.6, so we’re fine to presume that simply don’t exist - we don’t need to support those fields in CAP, and there’s a filter if someone does want them added back in (along with any other contact methods). --- php/class-coauthors-guest-authors.php | 15 --------------- tests/test-coauthors-guest-authors.php | 5 +---- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/php/class-coauthors-guest-authors.php b/php/class-coauthors-guest-authors.php index 8441bbb2..9b3e2651 100644 --- a/php/class-coauthors-guest-authors.php +++ b/php/class-coauthors-guest-authors.php @@ -1062,21 +1062,6 @@ function get_guest_author_fields( $groups = 'all' ) { 'group' => 'contact-info', 'input' => 'url', ), - array( - 'key' => 'aim', - 'label' => __( 'AIM', 'co-authors-plus' ), - 'group' => 'contact-info', - ), - array( - 'key' => 'yahooim', - 'label' => __( 'Yahoo IM', 'co-authors-plus' ), - 'group' => 'contact-info', - ), - array( - 'key' => 'jabber', - 'label' => __( 'Jabber / Google Talk', 'co-authors-plus' ), - 'group' => 'contact-info', - ), array( 'key' => 'description', 'label' => __( 'Biographical Info', 'co-authors-plus' ), diff --git a/tests/test-coauthors-guest-authors.php b/tests/test-coauthors-guest-authors.php index a5bfec55..95aafa76 100644 --- a/tests/test-coauthors-guest-authors.php +++ b/tests/test-coauthors-guest-authors.php @@ -190,9 +190,6 @@ public function test_get_guest_author_fields() { 'user_email', 'linked_account', 'website', - 'aim', - 'yahooim', - 'jabber', 'description', ); @@ -219,7 +216,7 @@ public function test_get_guest_author_fields() { $fields = $guest_author_obj->get_guest_author_fields( 'contact-info' ); $keys = wp_list_pluck( $fields, 'key' ); - $this->assertEquals( array( 'user_email', 'website', 'aim', 'yahooim', 'jabber' ), $keys ); + $this->assertEquals( array( 'user_email', 'website' ), $keys ); // Checks all the meta fields with group "about". $fields = $guest_author_obj->get_guest_author_fields( 'about' );