Opened 6 years ago
Last modified 5 years ago
#44374 new defect (bug)
Remove deprecated contact methods
Reported by: | butterflymedia | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 4.9.6 |
Component: | Users | Keywords: | needs-patch |
Focuses: | Cc: |
Description
AIM is dead (December 15, 2017), Yahoo Messenger will be shut down on July 17, 2018. I'm not sure about Google Talk, I think it's been retired a long time ago. In May 2013, Hangouts replaced Google Talk.
The way people are managing the contact methods nowadays is:
<?php function cinnamon_extra_contact_info($contactmethods) { // Remove default contact methods unset($contactmethods['aim']); unset($contactmethods['yim']); unset($contactmethods['jabber']); // Add extra contact methods $contactmethods['facebook'] = 'Facebook'; $contactmethods['twitter'] = 'Twitter'; $contactmethods['googleplus'] = 'Google+'; return $contactmethods; } add_filter('user_contactmethods', 'cinnamon_extra_contact_info');
All three of them need to be removed.
Change History (7)
#3
follow-up:
↓ 4
@
6 years ago
And what is [23588] doing? Why is it checking get_site_option('initial_db_version')
? What is that version for?
#4
in reply to:
↑ 3
@
6 years ago
Replying to butterflymedia:
And what is [23588] doing? Why is it checking
get_site_option('initial_db_version')
? What is that version for?
As I understand it:
$wp_db_version
, defined in wp-includes/version.php
, is the latest committed revision number from the WordPress Trac, for changes that matters to the database schema.
The initial_db_version
option stores the value of $wp_db_version
when the WordPress is installed.
So checking get_site_option('initial_db_version') < 23588
is to ensure backward compatibility, that only activates these deprecated user contacts, for installs made before the deprecated change was made when $wp_db_version
was 23588
.
ps: I hope I'm not misunderstanding the ticket, but I think it would be helpful to refer to the core code that should be removed. Thanks.
#5
follow-up:
↓ 6
@
5 years ago
As far as I understand this I'd say we could at least empty out the function wp_get_user_contact_methods(), meaning to delete the complete if statement in user.php, Line 2210:
function wp_get_user_contact_methods( $user = null ) { $methods = array(); if ( get_site_option( 'initial_db_version' ) < 23588 ) { $methods = array( 'aim' => __( 'AIM' ), 'yim' => __( 'Yahoo IM' ), 'jabber' => __( 'Jabber / Google Talk' ), ); }
#6
in reply to:
↑ 5
@
5 years ago
Replying to Presskopp:
As far as I understand this I'd say we could at least empty out the function wp_get_user_contact_methods(), meaning to delete the complete if statement in user.php, Line 2210:
function wp_get_user_contact_methods( $user = null ) { $methods = array(); if ( get_site_option( 'initial_db_version' ) < 23588 ) { $methods = array( 'aim' => __( 'AIM' ), 'yim' => __( 'Yahoo IM' ), 'jabber' => __( 'Jabber / Google Talk' ), ); }
It's been a while since this ticket has been opened, but the general idea is to completely remove all references to aim
, yim
and jabber
from the codebase.
@butterflymedia wasn't this covered in #11541 and e.g. [23588] ?