Action: wp_most_popular_list_item

This action is applied during the rendering of each individual list item that is outputted to the page by the widget. It can for example be used to add additional markup after each list item is rendered to the page.

Filter Parameters

  • $post (array) – The post data
  • $defaults (array) – The widget settings

Example

Add additional markup after each list item is rendered.

<?php
/**
 * Render a `<hr>` after each list item.
 * 
 * @param array $post The post data.
 */
function thenga_render_hr( $post ) {
   echo '<li><hr /></li>';
}
add_action( 'wp_most_popular_list_item', 'thenga_render_hr', 10, 1 );

Source

Found in system/widget.php

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.