pop_defaults_settings

Description

The “pop_defaults_settings” filter is used to add or remove popular widget default settings.

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

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

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

Example

// Apply filter
function add_pop_defaults_settings( $settings ) {
$settings['user'] = 0; 
return $settings; 
}
add_filter('pop_defaults_settings', 'add_pop_defaults_settings');

Note: $settings is an associative array.


Comments

Leave a Reply

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