BP_Nouveau_Friends::setup_filters()

Register add_filter() hooks


Source Source

File: bp-templates/bp-nouveau/includes/friends/loader.php

	protected function setup_filters() {
		$buttons = array(
			'friends_pending',
			'friends_is_friend',
			'friends_not_friends',
			'friends_member_friendship',
			'friends_accept_friendship',
			'friends_reject_friendship',
		);

		foreach ( $buttons as $button ) {
			add_filter( 'bp_button_' . $button, 'bp_nouveau_ajax_button', 10, 5 );
		}

		// The number formatting is done into the `bp_nouveau_nav_count()` template tag.
		remove_filter( 'friends_get_total_friend_count', 'bp_core_number_format' );
		remove_filter( 'bp_get_total_friend_count',      'bp_core_number_format' );
	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.