=== MNP Newsroom - Popular Posts ===
Contributors: lcofano
Tags: popular posts, trending, widget, analytics, performance
Requires at least: 6.0
Tested up to: 6.9
Stable tag: 7.3.2
Requires PHP: 7.4
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Donate link: https://www.paypal.com/paypalme/lcofano

A lightweight popular posts widget featuring smart tracking, anti-bot logic and REST API data loading.

== Description ==

**MNP Newsroom** allows you to display trending content on your site using a performance-focused approach. Instead of querying the main database on every page load, it uses a dedicated lightweight table and the WordPress REST API to serve data asynchronously.

This plugin is designed to minimize server load on high-traffic websites.

### Key Features

* **Performance:** Data is loaded via AJAX (REST API) to avoid caching conflicts.
* **Smart Tracking:** Visits are counted after a configurable delay (default 3 seconds) to improve accuracy.
* **Bot Handling:** Logic included to detect common bots and prevent them from inflating view counts.
* **Time Ranges:** Filter posts by Today (24h), Trending (48h), or Week (7 days).
* **Customization:** Includes a custom CSS editor and multiple layouts (Image Left, Right, or Text Only).

== Installation ==

1.  Upload the plugin folder to the `/wp-content/plugins/` directory.
2.  Activate the plugin through the 'Plugins' menu in WordPress.
3.  Go to **Settings > Mis Noticias Top** to configure preferences.
4.  Use the shortcode `[mnpn_populares]` in your content.

== Screenshots ==

1.  General settings panel.
2.  Frontend display example.

== Frequently Asked Questions ==

= I updated from an older version and the widget disappeared. =
We updated the shortcode prefix for security reasons. Please replace `[mis_populares]` with `[mnpn_populares]` in your widgets or pages.

== Changelog ==

= 7.3.2 =
* Minor fix: Adjusted late escaping and remaining constants prefix.

= 7.3.1 =
* **Security Hardening:** Implemented strict Late Escaping (esc_html, esc_attr) on all outputs.
* **Refactor:** Updated all function prefixes, variables, and database options to `mnpn_` (4 chars) to prevent conflicts, per WP.org guidelines.
* **Shortcode:** Changed main shortcode to `[mnpn_populares]`.
* **Database:** Updated log table name to comply with new naming conventions.
* **Performance:** Increased transient cache time to 15 minutes for better scalability.

= 7.3 =
* **Security:** Implemented Nonce verification for REST API endpoints.
* **Refactor:** Updated asset loading to use WordPress standards (wp_add_inline_style).
* **Anti-Bot:** Added "Silent Ignore" logic for bots to protect SEO and database integrity.
* **Fix:** Improved image retrieval logic (checks Thumbnail -> Medium -> Full).
* **Feature:** Added `offset` parameter to shortcodes.
* **UX:** Added help text for "Max Age" setting (0 for unlimited).

= 7.2 =
* Refactored CSS loading to support Roboto Variable font.
* Fixed sidebar visibility issue in specific views.
* Optimized SQL queries for high-traffic sites.

= 1.0 =
* Initial release.