Easily manage and automate post expiration in WordPress.
Post status | Label | Link |
---|---|---|
publish |
Published | wp-includes/post.php#L640-L652 |
future |
Scheduled | wp-includes/post.php#L654-L666 |
draft |
Draft | wp-includes/post.php#L668-L681 |
pending |
Pending | wp-includes/post.php#L683-L696 |
private |
Private | wp-includes/post.php#L698-L710 |
trash |
Trash | wp-includes/post.php#L712-L725 |
auto-draft |
auto-draft | wp-includes/post.php#L727-L735 |
inherit |
inherit | wp-includes/post.php#L737-L745 |
request-pending |
Pending | wp-includes/post.php#L747-L760 |
request-confirmed |
Confirmed | wp-includes/post.php#L762-L775 |
request-failed |
Failed | wp-includes/post.php#L777-L790 |
request-completed |
Completed | wp-includes/post.php#L792-L805 |
This plugin registers the post status pronamic_expired
.
\register_post_type(
'your_post_type',
[
// …
'supports' => [
'title',
'editor',
'thumbnail',
// …
'pronamic_expiration',
],
// …
]
);
\register_post_type(
'your_post_type',
[
// …
'supports' => [
'title',
'editor',
'thumbnail',
// …
'pronamic_expiration' => [
'post_status' => 'pronamic_expired',
'show_ui' => true,
'source' => 'your-plugin-slug',
],
],
// …
]
);