Opened 8 years ago
Closed 7 months ago
#44374 closed defect (bug) (fixed)
Remove deprecated contact methods
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 6.9 | Priority: | normal |
| Severity: | normal | Version: | 4.9.6 |
| Component: | Users | Keywords: | has-patch has-unit-tests |
| 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 (11)
#3
follow-up:
↓ 4
@
8 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
;
follow-up:
↓ 10
@
8 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
@
6 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
@
6 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.
#7
@
6 years ago
That would mean to strip it also from get_the_author_meta(), as seen in author-template.php
(Valid values for the $field parameter)
That's all - nowhere else they are to find.
This ticket was mentioned in PR #9391 on WordPress/wordpress-develop by @yashjawale.
7 months ago
#8
- Keywords has-patch has-unit-tests added; needs-patch removed
Removes all references to aim, yim and jabber from the codebase, as these services have shutdown long time ago...
Trac ticket: https://core.trac.wordpress.org/ticket/44374
#9
@
7 months ago
Attached PR to resolve this, Although I haven't touched content in src/wp-includes/deprecated.php as I was unsure if this should be changed
Let me know if there are any changes that need to be done
Thanks!
#10
in reply to:
↑ 4
@
7 months ago
- Milestone changed from Awaiting Review to 6.9
- Owner set to SergeyBiryukov
- Status changed from new to accepted
Replying to birgire:
So checking
get_site_option('initial_db_version') < 23588is to ensure backward compatibility, that only activates these deprecated user contacts, for installs made before the deprecated change was made when$wp_db_versionwas23588.
Correct, this check means that those fields are no longer displayed in the UI for new installations as of WordPress 3.6, and are only displayed on older installations.
That said, I think it's now safe to remove them completely from the codebase.
@butterflymedia wasn't this covered in #11541 and e.g. [23588] ?