Skip to:
Content
Pages
Categories
Search
Top
Bottom

Non-static method bphelp_remove_profile_links::remove_xprofile_links()


  • MorgunovVit
    Participant

    @morgunovvit

    What can I do with this:
    [17-Oct-2018 18:40:14 UTC] PHP Deprecated: Non-static method bphelp_remove_profile_links::remove_xprofile_links() should not be called statically in ../wp-includes/class-wp-hook.php on line 286
    ?

Viewing 3 replies - 1 through 3 (of 3 total)

  • Prashant Singh
    Participant

    @prashantvatsh

    class bphelp_remove_profile_links {
    	function remove_xprofile_links() {
    		remove_filter( 'bp_get_the_profile_field_value', 'xprofile_filter_link_profile_data', 9, 2 );
    	}
    }
    add_action( 'init', array( 'bphelp_remove_profile_links', 'remove_xprofile_links' ));

    Please try replacing the above code with this code:

    add_action( 'init',  'remove_xprofile_links' );
    function remove_xprofile_links() {
    		remove_filter( 'bp_get_the_profile_field_value', 'xprofile_filter_link_profile_data', 9, 3 );
    	}
    

    Thanks


    MorgunovVit
    Participant

    @morgunovvit

    Prashant, big thanks!
    But will it be fixed in new upgrade? Do you know?


    Prashant Singh
    Participant

    @prashantvatsh

    It is from a third party plugin https://github.com/bphelp/bp-remove-profile-links, not BuddyPress. It seems there is no active development there from the last 5 years so you are safe to do this in the plugin, it will not be updated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar