... * wp adminkeep feature disable ... * Switch features on or off. Their settings are kept. * wp adminkeep feature get * A feature's settings: key, value, type, accepted values. * wp adminkeep feature set key=value... * Change settings. Everything not named is kept. * * wp adminkeep comments count [--approved] [--woo] * How many comments `purge` would delete. Prints a number. * wp adminkeep comments purge [--approved] [--woo] [--yes] * Delete them for good, in batches. Spam and trash by default. * * wp adminkeep css get * Print the site's Custom CSS, and nothing else. * wp adminkeep css set [] [--yes] * Replace it from a file, or from standard input. * * wp adminkeep code get * Print one Header & Footer Code box, and nothing else. * wp adminkeep code set [] [--yes] * Replace that box from a file, or from standard input. * Up to 64 KB per box. * * wp adminkeep smtp get * SMTP settings and where each value comes from. * wp adminkeep smtp set --host= --port= ... * Change SMTP settings. Flags: `wp help adminkeep smtp set`. * wp adminkeep smtp test [--log] * Send a test email. Shows the server's reply on failure. * wp adminkeep contact-form get * Contact form settings, where each comes from, and whether it is live. * wp adminkeep contact-form set --provider= ... * Change contact form settings. Flags: `wp help adminkeep contact-form set`. * * wp adminkeep email-log list [--status=] [--search=] * List logged email, newest first. Never the message content. * wp adminkeep email-log get * Print one logged email, content included. * wp adminkeep email-log count [--status=] * How many emails are logged. Prints a number. * wp adminkeep email-log purge [--all] [--older-than=] [--yes] * Delete logged email for good. Works whether or not the * Email Log feature is on. * * wp adminkeep emails list * WordPress core's own emails, the ones Nice Default Emails * covers: id, what it is, the core function that sends it. * wp adminkeep emails send ... --to= * wp adminkeep emails send --all --to= * Send them, through core, to one address to see how they * look. Needs Nice Default Emails on. Leaves nothing behind. * * wp adminkeep setting get [] * Plugin-level settings (not tied to one feature): key, value, * type, accepted values. With a key, just its value. * wp adminkeep setting set key=value... * Change them. Today: hide_unused=true|false, the "Hide unused * features" switch on the settings screen. Site-wide. * * ## HOW TO FIND YOUR WAY * * Feature ids come from `wp adminkeep feature list`. * A feature's setting keys, their types and the values each accepts * come from `wp adminkeep feature get `. * The `smtp`, `custom_css` and `header_footer_code` features are * switched on with `feature enable`, and configured with the `smtp`, * `css` and `code` groups. * * ## FOR SCRIPTS AND AGENTS * * * `feature list`, `feature get`, `setting get`, `smtp get`, `emails list` * and `emails send` take `--format=json` (also csv, yaml, table). * * Exit code 0 means the change was made. Any mistake (unknown id, * unknown key, wrong type of value) exits 1, names the valid * choices, and writes nothing. * * `comments purge` always asks first, and `css set` and `code set` * ask before clearing what is stored. Pass `--yes` to skip the question. * * The SMTP password is never printed. Set it with `--password-stdin` * so it stays out of the shell history. A setting fixed by an * ADMINKEEP_SMTP_* constant in wp-config.php is refused. * * A change takes effect from the next request. On multisite, pick * the site with `--url=`. * * ## EXAMPLES * * # See every feature and whether it is on, as JSON. * $ wp adminkeep feature list --format=json * * # Turn comments off, then clear out spam and trash. * $ wp adminkeep feature enable disable_comments * $ wp adminkeep comments purge --yes * * # Manual ordering for posts and pages. * $ wp adminkeep feature enable order * $ wp adminkeep feature set order post_types=post,page * * # Add a site-verification tag, saved in a file, to every page's head. * $ wp adminkeep feature enable header_footer_code * $ wp adminkeep code set head verification.html * * # Configure SMTP, then prove it works. * $ wp adminkeep smtp set --host=smtp.example.com --port=587 * $ printf %s "$SMTP_PASSWORD" | wp adminkeep smtp set --password-stdin * $ wp adminkeep feature enable smtp * $ wp adminkeep smtp test you@example.com * * # See WordPress's own emails in the Nice Default Emails layout. * $ wp adminkeep feature enable nice_emails * $ wp adminkeep emails send --all --to=you@example.com */ class AdminkeepNamespace extends \WP_CLI\Dispatcher\CommandNamespace { }