Making WordPress.org

Changeset 4143


Ignore:
Timestamp:
09/27/2016 07:06:38 PM (9 years ago)
Author:
coffee2code
Message:

Support Forums: Remove archaic custom contact fields.

Removes fields for AIM, Yahoo IM, Jabber / Google Talk.

Props netweb.
Fixes #1975.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-users.php

    r4142 r4143  
    1515        add_action( 'personal_options_update', array( $this, 'save_custom_title' ), 10, 2 );
    1616        add_action( 'edit_user_profile_update', array( $this, 'save_custom_title' ), 10, 2 );
     17
     18        // Custom user contact methods.
     19        add_filter( 'user_contactmethods', array( $this, 'custom_contact_methods' ) );
    1720    }
    1821
     
    3134
    3235        return $role;
     36    }
     37
     38    /**
     39     * Custom contact methods
     40     *
     41     * @link https://codex.wordpress.org/Plugin_API/Filter_Reference/user_contactmethods
     42     *
     43     * @param array $user_contact_method Array of contact methods.
     44     * @return array An array of contact methods.
     45     */
     46    public function custom_contact_methods( $user_contact_method ) {
     47        /* Remove legacy user contact methods */
     48        unset( $user_contact_method['aim'] );
     49        unset( $user_contact_method['yim'] );
     50        unset( $user_contact_method['jabber'] );
     51
     52        return $user_contact_method;
    3353    }
    3454
Note: See TracChangeset for help on using the changeset viewer.