This commit is contained in:
Javier Casares 2026-08-18 10:49:06 +00:00
commit 4f8ab239b0
5 changed files with 23 additions and 22 deletions

View file

@ -44,6 +44,7 @@ class Robotstxt_Manager_Settings {
$menu_hook = is_multisite() ? 'network_admin_menu' : 'admin_menu';
$loader->add_action( $menu_hook, $this, 'add_settings_page' );
$loader->add_action( 'admin_init', $this, 'register_settings' );
$loader->add_action( 'admin_init', $this, 'handle_form_submission' );
$loader->add_action( 'admin_enqueue_scripts', $this, 'enqueue_scripts' );
$loader->add_action( 'wp_ajax_robotstxt_manager_test_connection', $this, 'handle_test_connection' );
$loader->add_action( 'wp_ajax_robotstxt_manager_delete_key', $this, 'handle_delete_key' );
@ -209,8 +210,6 @@ class Robotstxt_Manager_Settings {
wp_die( esc_html__( 'You do not have sufficient permissions to access this page.', 'robotstxt-manager' ) );
}
$this->handle_form_submission();
require_once ROBOTSTXT_MANAGER_DIR . 'admin/views/page-settings.php';
}
@ -218,11 +217,12 @@ class Robotstxt_Manager_Settings {
* Handles manual form submission for network settings.
*
* The WordPress Settings API (options.php) does not handle network
* options, so the network settings page must process its own form.
* options, so the settings page must process its own form. Hooked to
* admin_init so the redirect runs before any output is sent.
*
* @return void
*/
private function handle_form_submission(): void {
public function handle_form_submission(): void {
if ( ! isset( $_POST['robotstxt_manager_settings_group_nonce'] ) ) {
return;
}

View file

@ -1,5 +1,13 @@
== Changelog ==
= 1.6.1 =
_Release date: 2026-08-18_
**Fixed**
* "Cannot modify header information — headers already sent" warning after saving the settings: the form handler ran inside the page renderer (after output started). It now runs on `admin_init`, before any output, so the redirect succeeds.
= 1.6.0 =
_Release date: 2026-08-18_

View file

@ -2,7 +2,7 @@
# This file is distributed under the GPL-3.0-or-later.
msgid ""
msgstr ""
"Project-Id-Version: Manager (by ROBOTSTXT) 1.6.0\n"
"Project-Id-Version: Manager (by ROBOTSTXT) 1.6.1\n"
"Report-Msgid-Bugs-To: https://www.robotstxt.software/plugins/robotstxt-manager/\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View file

@ -3,9 +3,9 @@ Contributors: robotstxt, javiercasares
Tags: dashboard, catalog, updates, subscriptions, management
Requires at least: 4.4
Tested up to: 7.1
Stable tag: 1.6.0
Stable tag: 1.6.1
Requires PHP: 8.0
Version: 1.6.0
Version: 1.6.1
License: GPL-3.0-or-later
License URI: https://www.gnu.org/licenses/gpl-3.0.txt
@ -94,6 +94,12 @@ Encrypted at rest using AES-256-CBC with a key derived from your site's WordPres
Only the 3 last versions. The full changelog will be at changelog.txt
= 1.6.1 =
_Release date: 2026-08-18_
* Fixed: "headers already sent" warning after saving the settings — the form handler now runs on `admin_init`, before any output.
= 1.6.0 =
_Release date: 2026-08-18_
@ -111,19 +117,6 @@ _Release date: 2026-08-18_
* Fixed: API key saving, test connection, settings error display, registration link.
= 1.4.1 =
_Release date: 2026-08-17_
* Housekeeping release: plugin identity now points at the ROBOTSTXT software site — Plugin URI and Update URI are `https://www.robotstxt.software/plugins/robotstxt-manager/`, Author URI is `https://www.robotstxt.software/`, and this readme's full-changelog link points to the same page.
* Tooling aligned with the declared real floors: PHPCS `testVersion` and the preflight scan range now cover PHP 8.0-8.5 (was 7.4/8.4).
= 1.4.0 =
_Release date: 2026-08-17_
* Premium update URLs carry a short-lived download token (Core 1.9.0+) instead of the API key; automatic fallback on older Core.
= Previous versions =
If you want to see the full changelog, visit the [plugin page](https://www.robotstxt.software/plugins/robotstxt-manager/).

View file

@ -3,7 +3,7 @@
* Plugin Name: Manager (by ROBOTSTXT)
* Plugin URI: https://www.robotstxt.software/plugins/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: 1.6.0
* Version: 1.6.1
* Requires at least: 4.4
* Requires PHP: 8.0
* Update URI: https://www.robotstxt.software/plugins/robotstxt-manager/
@ -23,7 +23,7 @@ if ( ! defined( 'ABSPATH' ) ) {
}
/** Plugin version. */
define( 'ROBOTSTXT_MANAGER_VERSION', '1.6.0' );
define( 'ROBOTSTXT_MANAGER_VERSION', '1.6.1' );
/** Absolute path to the plugin directory, with trailing slash. */
define( 'ROBOTSTXT_MANAGER_DIR', plugin_dir_path( __FILE__ ) );