cwp bricks post-types enable
shipped 1.0.0cwp bricks post-types enable <slug> [env] [flags]
Acts on the local site unless an environment is named.
| Argument | What it is | Default |
|---|---|---|
<slug> | post type slug | |
[env] | environment to write to (omit for the local site) |
| Flag | What it does | Default |
|---|---|---|
--force | override the protected-environment refusal | off |
--no-backup | skip the remote backup taken before the write | on |
--yes | skip the confirmation prompt | off |
Plus the shared flags --json, --verbose and --dry-run.
What it does
Adds one post type to the list the Bricks builder will open for.
Against a remote this is an upward write and carries the guard set: a protected
environment refuses without --force, the change is confirmed, and a remote
backup is taken first.
The change is database state, so it does not travel. Enabling a post type locally and deploying code will not enable it on production — run the command against each environment that needs it.
Example
cwp bricks post-types enable buch
cwp bricks post-types enable buch prod --force
What it does not do
It does not register the post type. If the slug does not exist on the target,
enabling it in this list achieves nothing — the site plugin is what registers it,
and cwp deploy is what moves the site plugin.