Results 1 to 1 of 1

Thread: bug using user_contactmethods

  1. #1
    Marketplace Seller roidayan's Avatar
    Join Date
    Apr 2014
    Location
    Israel
    Posts
    1,196
    Thanks
    34
    Thanked 157 Times in 144 Posts

    bug using user_contactmethods

    Currently being used as an action:
    PHP Code:
    function cp_user_contact_methods$methods ) {
        return array(
            
    'twitter_id' => __'Twitter'APP_TD ),
            
    'facebook_id' => __'Facebook'APP_TD ),
        );
    }
    add_action'user_contactmethods''cp_user_contact_methods' ); 
    but it's actually a filter and should be used as a filter.
    currently cp_user_contact_methods is ignoring $methods which could be already populated with contact fields.
    current workarounds for other plugins is to make their filter come later than classipress overrider.

    this should be fixed to something like this:


    PHP Code:
    function cp_user_contact_methods$methods ) {
        
    $methods['twitter_id'] = __'Twitter'APP_TD );
        
    $methods['facebook_id'] = __'Facebook'APP_TD );
        return 
    $methods;
    }
    add_filter'user_contactmethods''cp_user_contact_methods' ); 

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)