JPKCom Harden & Trim

cli.php

WP-CLI command `wp harden-trim`

Reads and writes the settings through exactly the paths the settings page uses: every value goes through jpkcom_harden_trim_sanitize_value(), every write through jpkcom_harden_trim_save_settings(), presets through jpkcom_harden_trim_apply_preset(), import and export through the same functions as the import / export section. The command is stricter than the form in one respect: a value it cannot store as given (invalid, locked by a constant, an unknown role) is an error and nothing is written, instead of a notice after the fact.

Output is English, like WP-CLI itself. Settings are per site; on multisite pick the site with WP-CLI's global --url parameter.

Tags
since
1.2.0

Table of Contents

Classes

JPKCom_Harden_Trim_CLI
Inspect and change the JPKCom Harden & Trim settings of a site.
On this page

Search results