pop_most_commented_content

Description

The “pop_most_commented_content” filter is used to modify the HTML in the most commented tab.

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

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

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

Example

// Apply filter
function modifY_pop_most_commented_content( $output, $instance, $results  ) {
return $output . '<div>'. __( 'Custom content' ) .'</div>' ; 
}
add_filter('pop_most_commented_content', 'modifY_pop_most_commented_content');

Note: $output is a HTML string, $instance is an the widget object, $results is an numeric array of post objects.


Comments

Leave a Reply

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