This function has been deprecated. Don't use it!

apply_filters ( 'jetpack_widget_authors_exclude', array $default_excluded_authors )

Filter authors from the Widget Authors widget.

Source file: modules/widgets/authors.php

View in GitHub

Parameters

$default_excluded_authors

(array) Array of user ID’s that will be excluded


Changelog

Since: Jetpack 4.5.0


How to use this hook

See Using actions and filters to customize Jetpack.

Notes

You can use this filter to exclude specific authors from ever appearing in the Authors Widget. In the example below, the author matching ID 5 will be excluded:

/**
 * Exclude specific authors from ever appearing in the Authors Widget.
 *
 * @param array $default_excluded_authors Array of user ID's that will be excluded.
 */
function jeherve_exclude_authors_widget( $default_excluded_authors ) {
	$default_excluded_authors[] = 5;

	return $default_excluded_authors;
}
add_filter( 'jetpack_widget_authors_exclude', 'jeherve_exclude_authors_widget' );

To find out the ID of each author you’d like to exclude, you can go to the Users menu in your dashboard, and click on an author’s name to edit their profile: their profile editing page URL will include the author ID.

Leave a Reply to Ahmet Usta Cancel reply

Comments

  1. Ben Potter says:

    Where do I add this code?

  2. Ahmet Usta says:

    How can I add several authors to filter? Or is there any other way only to list the selected authors?