=== AddonLogic Most-Commented Posts Widget ===
Contributors: snehalpancholi
Tags: comments, widget, popular posts, most commented, sidebar
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.1
Stable tag: 1.0.0
License: GPL-2.0+
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A configurable sidebar widget and shortcode that lists the posts with the highest comment counts.

== Description ==

AddonLogic Most-Commented Posts Widget surfaces your most-discussed content in any sidebar or via the `[addlc_mcp_posts]` shortcode.

**Widget controls:** title, number of posts (1–20), post type, optional date range filter, optional featured image thumbnail.

Results are cached for 30 minutes and flushed automatically when a new comment is approved or a post is saved — so the list always stays current without hammering the database.

= Features =
* Classic sidebar widget + shortcode
* Filter by any public post type
* Optional "last N days" window for trending content
* Optional featured image thumbnail (configurable size)
* 30-minute transient cache, auto-invalidated on save/comment events
* No JavaScript dependencies

== Installation ==
1. Upload the `most-commented-posts-widget` folder to `/wp-content/plugins/`.
2. Activate via **Plugins → Installed Plugins**.
3. Go to **Appearance → Widgets** and drag **AddonLogic: Most-Commented Posts** into a sidebar — OR — use the shortcode in any post or page.

== Shortcode ==

    [addlc_mcp_posts number="5" post_type="post" days="0" show_thumb="false" thumb_size="thumbnail" title=""]

| Attribute    | Default      | Description                                      |
|--------------|--------------|--------------------------------------------------|
| number       | 5            | Number of posts to list (max 20)                 |
| post_type    | post         | Any registered public post type slug             |
| days         | 0            | Limit to posts published in the last N days (0 = all time) |
| show_thumb   | false        | true/false — show featured image thumbnail       |
| thumb_size   | thumbnail    | Any registered image size slug                   |
| title        | (empty)      | Optional heading rendered above the list         |

== Frequently Asked Questions ==

= Does it update in real time? =
Results are cached for 30 minutes and the cache is cleared every time a comment is approved or a post is saved.

= Can I style the list? =
All elements carry BEM-like CSS classes (`mcp-list`, `mcp-item`, `mcp-thumb`, `mcp-title`, `mcp-count`) that you can target in your theme's stylesheet.

== Changelog ==

= 1.0.0 =
* Initial release.

== Screenshots ==

1. Sidebar widget showing five most-commented posts with thumbnails and comment counts.
2. Widget configuration panel in the Customizer.
