pop_defaults_tabs

Description

The “pop_defaults_tabs” filter is used to add or remove popular widget default tabs like recent comments, recent posts, tags and most viewed.

A plugin (or theme) can modify the array with the code:

<?php add_filter( 'pop_defaults_tabs', 'filter_function_name' ); ?>

The hook is located in the popular-widget/popular-widget.php file.

Example

// Apply filter
function add_pop_defaults_tabs( $tabs ) {
	$tabs['users'] = __('Users'); 
	return $tabs; 
}
add_filter('pop_defaults_tabs', 'add_pop_defaults_tabs');

Note:  $tabs is an associative array.


Leave a Reply

Your email address will not be published. Required fields are marked *