Linux 软件免费装

WST Post Expiration

开发者 webtatsu
更新时间 2026年9月30日 23:01
PHP版本: 8.2 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

cron schedule editorial workflow expiration unpublish

下载

1.0.0

详情介绍:

WST Post Expiration adds an expiration date and time to your posts. Once that time passes, the post switches from published to draft automatically. It keeps announcements and campaign pages with a fixed run time from staying public after they are over. The date is set where you already work: the block editor sidebar, the classic editor meta box, or Quick Edit on the post list. An "Expiration" column is added to the post list, so you can see at a glance which posts expire and when. How it works Features Capabilities Before you start

安装:

  1. Upload the plugin files to /wp-content/plugins/wst-post-expiration, or install it from the Plugins > Add New screen.
  2. Activate the plugin from the Plugins screen.
  3. Open the "Post Expiration" menu in wp-admin and choose the post types that can have an expiration date.
  4. Edit a post of one of those post types and set the date from the sidebar, the classic editor, or Quick Edit.

屏幕截图:

  • The settings screen: enabled post types and scheduled events
  • The "Expiration" column and the Quick Edit field on the post list

升级注意事项:

1.0.0 Initial release.

常见问题:

What happens when a post reaches its expiration date?

Its status changes from published to draft. The content, the title, and everything else stay as they are.

Can it move the post to the trash or make it private instead of a draft?

Yes, with code. Return private, pending, trash, or any registered status from the wst_post_expiration_new_status filter. trash goes through the standard WordPress trash handling. When the trash is disabled (EMPTY_TRASH_DAYS is 0), the post is kept as a draft instead of being deleted permanently.

I set a time, but nothing changed right away

Expiration runs through WP-Cron, which fires when someone visits the site. On a quiet site it waits for the next visit. Calling wp-cron.php from a server-side cron job removes the delay.

Which timezone is used?

The site timezone (Settings > General). The date and time you enter is treated as local site time.

Does it work with pages and custom post types?

Yes. The "Enabled post types" setting lets you pick which post types can have an expiration date.

What happens when I deactivate the plugin?

Every scheduled expiration event is removed. The dates stay on the posts, so activating the plugin again schedules them once more.

更新日志:

1.0.0