diff --git a/admin/views/page-catalog.php b/admin/views/page-catalog.php index 51fc99f..366e5ed 100644 --- a/admin/views/page-catalog.php +++ b/admin/views/page-catalog.php @@ -112,6 +112,8 @@ $compat_warnings = 0; $raw_cost = $entry['price_annual'] ?? 0; $raw_ver = $entry['current_version'] ?? ''; $raw_url = $entry['page_url'] ?? ''; + $raw_home = $entry['homepage'] ?? ''; + $raw_desc = $entry['description'] ?? ''; $raw_rwp = $entry['requires_wp'] ?? ''; $raw_rphp = $entry['requires_php'] ?? ''; @@ -121,9 +123,15 @@ $compat_warnings = 0; $cost = is_numeric( $raw_cost ) ? (float) ( $raw_cost + 0.0 ) : 0.0; $remote_v = is_string( $raw_ver ) ? $raw_ver : ''; $page_url = is_string( $raw_url ) ? $raw_url : ''; + $homepage = is_string( $raw_home ) ? $raw_home : ''; + $desc = is_string( $raw_desc ) ? trim( $raw_desc ) : ''; $req_wp = is_string( $raw_rwp ) ? $raw_rwp : ''; $req_php = is_string( $raw_rphp ) ? $raw_rphp : ''; + $website_url = '' !== $page_url ? $page_url : $homepage; + $expandable = ( '' !== $desc || '' !== $website_url ); + $toggle_id = 'robotstxt-manager-toggle-' . esc_attr( $slug ); + // Compatibility checks. $wp_ok = '' === $req_wp || version_compare( $local_wp_version, $req_wp, '>=' ); $php_ok = '' === $req_php || version_compare( $local_php_version, $req_php, '>=' ); @@ -148,7 +156,11 @@ $compat_warnings = 0; $row_class = ( ! $wp_ok || ! $php_ok ) ? ' robotstxt-manager-row--incompatible' : ''; ?> - + + + + +
@@ -228,6 +240,18 @@ $compat_warnings = 0; + + + + +

+ + + + + + + @@ -265,4 +289,13 @@ $compat_warnings = 0; .robotstxt-manager-compat--fail { color: #d63638; font-weight: 600; } .robotstxt-manager-compat-warning { cursor: help; } .robotstxt-manager-row--incompatible { background-color: #fef7f0 !important; } + +/* Expandable detail rows (CSS-only toggle). */ +.robotstxt-manager-toggle { display: none; } +.robotstxt-manager-toggle-label { cursor: pointer; display: inline-block; width: 1.4em; } +.robotstxt-manager-toggle-arrow::before { content: "\25B8"; /* ▸ */ } +.robotstxt-manager-detail-row { display: none; } +.robotstxt-manager-detail-row td { border-top: none !important; } +tr:has(.robotstxt-manager-toggle:checked) + tr.robotstxt-manager-detail-row { display: table-row; } +tr:has(.robotstxt-manager-toggle:checked) .robotstxt-manager-toggle-arrow::before { content: "\25BE"; /* ▾ */ } diff --git a/changelog.txt b/changelog.txt index 830c028..84a9104 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,12 +1,41 @@ == Changelog == += 0.4.0 = + +_Release date: 2026-08-14_ + +**Highlights** + +* Click-to-expand rows in the catalog table: clicking the ▸ next to a plugin's name reveals a detail row with the plugin's description and a link to its website on the store, so users can understand what each plugin does before installing. Pure CSS toggle (`:has()` + hidden checkbox) — no JavaScript, consistent with the classic-flow philosophy. + +**Added** + +* Detail row under each catalog entry, shown when the entry has a description or a website URL (Core 1.4.2+ exposes `description` in the catalog list; entries without either keep a plain, non-expandable row). +* "Visit website" link using `page_url` (falling back to `homepage`), opened in a new tab with `rel="noopener noreferrer"`. + +**Changed** + +* Plugin version 0.3.1 → 0.4.0. No database schema changes (no custom tables). + +**Compatibility** + +* WordPress: 7.0 - 7.1 (declared floor of the ecosystem; scan-confirmed lower) +* PHP: 8.4 - 8.5 (declared floor of the ecosystem; scan-confirmed lower) + = 0.3.1 = _Release date: 2026-08-14_ +**Changed** + * Default store URL is now `https://www.robotstxt.software` (was `https://plugins.robotstxt.es`). Applies to new activations and fresh installs; existing saved URLs are preserved. The catalog API at the new domain is verified live. * Plugin version 0.3.0 → 0.3.1. +**Compatibility** + +* WordPress: 7.0 - 7.1 (declared floor of the ecosystem; scan-confirmed lower) +* PHP: 8.4 - 8.5 (declared floor of the ecosystem; scan-confirmed lower) + = 0.3.0 = _Release date: 2026-08-13_ diff --git a/readme.txt b/readme.txt index 9bfe948..8993d34 100644 --- a/readme.txt +++ b/readme.txt @@ -3,9 +3,9 @@ Contributors: javiercasares, robotstxt Tags: dashboard, catalog, updates, subscriptions, management Requires at least: 4.7 Tested up to: 7.1 -Stable tag: 0.3.1 +Stable tag: 0.4.0 Requires PHP: 7.4 -Version: 0.3.1 +Version: 0.4.0 License: GPL-3.0-or-later License URI: https://www.gnu.org/licenses/gpl-3.0.txt @@ -17,12 +17,13 @@ Manager (by ROBOTSTXT) is a WordPress plugin that customers install on **their o * Lists the full plugin catalog with name, type (free/premium), price, and current version. * For each catalog entry, shows the **local install state**: not installed, installed (inactive), up to date, or update available. -* One-click actions (Phase 2+): Install free plugins, Buy paid plugins (redirects to checkout on the store site), trigger native WordPress updates. +* Click a plugin's row to expand its description and a link to its website on the store. +* One-click actions: Install, Activate, and Update run on a classic page load with a standard admin notice (green/red) reporting the outcome; Buy redirects to checkout on the store site. * Subscription health dashboard (Phase 4+): license expiring soon, payment failed, expired — surfaced as admin notices so issues are visible before updates silently stop. This plugin does **not** re-implement the per-plugin update mechanism. Every ROBOTSTXT plugin bundles its own copy of the `Robotstxt_Core_Plugin_Updater` SDK, so updates keep working even if Manager is deactivated. Manager's value is visibility and one place to click. -**Phase 1 (current):** Read-only catalog view with local install-state resolution. Settings screen with API key (encrypted at rest), store URL, cache TTL, and connection test. Install/Update/Buy buttons are present but disabled pending Phase 2+. +**Requires Core 1.4.2+** on the store for descriptions in the catalog list (older Core versions still work; rows simply show no description). == Using the plugin == @@ -41,13 +42,13 @@ Configure at **ROBOTSTXT → Settings**: | Column | Description | |---|---| -| Plugin | Name and current version from the store. | +| Plugin | Name and current version from the store. Click ▸ to expand the description and website link. | | Type | Free or Premium. | | Price | Annual price in EUR, or — for free plugins. | | Local state | Not installed / Installed (inactive) / Up to date / Update available (vX → vY). | -| Action | Install / Buy / Update (Phase 2+; disabled in Phase 1). | +| Action | Install / Activate / Update / Buy, depending on local state. | -Click "Refresh catalog" to force a fresh fetch from Core. +Click "Refresh catalog" to force a fresh fetch from Core. Install, Activate, and Update run on a classic page load (no JavaScript) and report the result as a standard admin notice. == Extra Configurations == @@ -88,6 +89,30 @@ Encrypted at rest using AES-256-CBC with a key derived from your site's WordPres == Changelog == += 0.4.0 = + +_Release date: 2026-08-14_ + +* Click-to-expand rows in the catalog: each plugin's description and a link to its website are shown in a detail row under the plugin name (CSS-only toggle, no JavaScript). Requires Core 1.4.2+ on the store. + += 0.3.1 = + +_Release date: 2026-08-14_ + +* Default store URL is now `https://www.robotstxt.software`. Existing saved URLs are preserved. + += 0.3.0 = + +_Release date: 2026-08-13_ + +* Classic install/activate/update flow: actions run on a full page load (`admin-post.php` with per-action-and-slug nonces) and report the outcome through standard admin notices (green success / red error), replacing the previous AJAX flow. + += 0.2.0 = + +_Release date: 2026-08-13_ + +* Install action: free and premium plugins install directly from the catalog, authenticated with the account-level API key against Core's `/download` endpoint (requires Core 1.4.0+). + = 0.1.3 = _Release date: 2026-08-12_ diff --git a/robotstxt-manager.php b/robotstxt-manager.php index be2818b..a4d4f84 100644 --- a/robotstxt-manager.php +++ b/robotstxt-manager.php @@ -3,7 +3,7 @@ * Plugin Name: Manager (by ROBOTSTXT) * Plugin URI: https://git.robotstxt.es/ROBOTSTXT/robotstxt-manager * Description: Client-side dashboard for the ROBOTSTXT plugin ecosystem. Lists the catalog from a remote Plugins Core install, resolves local install/update state, and installs, activates, and updates plugins directly from the store. - * Version: 0.3.1 + * Version: 0.4.0 * Requires at least: 4.7 * Requires PHP: 7.4 * Author: ROBOTSTXT @@ -21,7 +21,7 @@ if ( ! defined( 'ABSPATH' ) ) { } /** Plugin version. */ -define( 'ROBOTSTXT_MANAGER_VERSION', '0.3.1' ); +define( 'ROBOTSTXT_MANAGER_VERSION', '0.4.0' ); /** Absolute path to the plugin directory, with trailing slash. */ define( 'ROBOTSTXT_MANAGER_DIR', plugin_dir_path( __FILE__ ) );