Customising the Blocked Members Settings Page

You can use hooks to change the content on the settings page that shows your members the members they have blocked. You use hooks by adding them into your theme’s ‘functions.php’ file.

The following hook changes the title shown on the page:

function myprefix_change_post_type_params( $nav_title ) {
    $nav_title = 'Title set via hook';
    return $nav_title;
}
add_filter( 'bsr_blocked_users_panel_heading', 'myprefix_change_post_type_params' );

The next hook allows you to add content above the blocked members table (and below the title):

add_action('bsr_before_blocked_users_panel', 'before');
function before() {
	echo '<h4>Extra content for before the blocked users panel</h4>';
}

Finally, the last hook allows you to add content below the blocked members table:

add_action('bsr_after_blocked_users_panel', 'after');
function after() {
	echo '<h4>Extra content for after the blocked users panel</h4>';
}

The image below demonstrates how the above three hooks would look on the blocked members page. Remember that the overall look and feel is controlled by your chosen theme.

Was this helpful?