Title: Raptor Scheduled Content Expiry
Author: Amr Issa
Published: <strong>05. svibnja 2026.</strong>
Last modified: 02. listopada 2026.

---

Pretraga dodataka

![](https://ps.w.org/raptor-scheduled-content-expiry/assets/banner-772x250.png?rev
=3526969)

![](https://ps.w.org/raptor-scheduled-content-expiry/assets/icon-256x256.png?rev
=3523801)

# Raptor Scheduled Content Expiry

 Od [Amr Issa](https://profiles.wordpress.org/amr267/)

[Preuzmi](https://downloads.wordpress.org/plugin/raptor-scheduled-content-expiry.1.10.0.zip)

 * [Detalji](https://hr.wordpress.org/plugins/raptor-scheduled-content-expiry/#description)
 * [Recenzije](https://hr.wordpress.org/plugins/raptor-scheduled-content-expiry/#reviews)
 *  [Instalacija](https://hr.wordpress.org/plugins/raptor-scheduled-content-expiry/#installation)
 * [Razvoj](https://hr.wordpress.org/plugins/raptor-scheduled-content-expiry/#developers)

 [Podrška](https://wordpress.org/support/plugin/raptor-scheduled-content-expiry/)

## Opis

Raptor Scheduled Content Expiry gives you full control over what happens to your
content when it reaches its expiration date. Set precise expiry dates on posts, 
pages, and custom post types, then choose from multiple expiry actions: auto-unpublish(
move to draft), redirect to any URL, swap the content with a replacement, or simply
hide it from visitors.

**What You Can Do (Free)**

 * Set expiry dates and times on any post, page, public custom post type, or WooCommerce
   product
 * Choose an expiry action per post: move to draft, redirect (301 or 302), swap 
   content, or hide from visitors
 * Content swap lets you prepare a replacement message, archived notice, or seasonal
   placeholder
 * Auto-redirect expired URLs to any destination so visitors never hit a dead page
 * A Minimum Capability setting controls who can create, change or run expiry rules(
   Contributors and above by default)
 * Timezone-aware scheduling that respects your WordPress timezone setting
 * Audit log showing every expiry event with timestamp, action taken, and which 
   user configured it
 * Quick Edit and Bulk Edit support for setting or clearing expiry dates across 
   multiple posts
 * Dashboard widget showing upcoming expirations in the next 7 days
 * Clean uninstall: deleting the plugin removes its settings, expiry rules, audit
   log and queued jobs on every site
 * Runs on Action Scheduler for reliable, precise execution

## Snimke zaslona

[⌊Settings screen in the top-level Content Expiry menu, which also holds Scheduled
Actions.⌉⌊Settings screen in the top-level Content Expiry menu, which also holds
Scheduled Actions.⌉[

Settings screen in the top-level Content Expiry menu, which also holds Scheduled
Actions.

[⌊The four expiry actions: Move to Draft, Redirect, Swap Content and Hide from Visitors.⌉⌊
The four expiry actions: Move to Draft, Redirect, Swap Content and Hide from Visitors
.⌉[

The four expiry actions: Move to Draft, Redirect, Swap Content and Hide from Visitors.

[⌊Scheduled Actions queue with Run now and Cancel controls.⌉⌊Scheduled Actions queue
with Run now and Cancel controls.⌉[

Scheduled Actions queue with Run now and Cancel controls.

[⌊The Content Expiry meta box in the block editor.⌉⌊The Content Expiry meta box 
in the block editor.⌉[

The Content Expiry meta box in the block editor.

## Instalacija

 1. Upload the plugin files to `/wp-content/plugins/raptor-scheduled-content-expiry`,
    or install through the WordPress Plugins screen.
 2. Activate the plugin through the ‘Plugins’ screen in WordPress.
 3. Go to **Content Expiry > Settings** in the admin sidebar to configure defaults 
    and choose which post types to enable.
 4. Edit any post, page, custom post type, or WooCommerce product, and find the **Content
    Expiry** meta box to set expiry rules.

## Pitanja i odgovori

### Where do I find the plugin?

After activation, look for **Content Expiry** as a top-level item in the WordPress
admin sidebar (clock icon). It contains two screens:

 * **Settings** — defaults, post-type opt-in, capability gate, dashboard widget 
   toggle, log retention, and the Audit Log tab.
 * **Scheduled Actions** — a focused queue view showing only this plugin’s expiry
   jobs, with per-row Run Now / Cancel controls.

### Who can manage expiry rules?

The **Minimum Capability** setting in **Content Expiry > Settings** decides who 
can see the meta box, Quick Edit and Bulk Edit fields and the Expiry column, and
who can save, extend or run rules:

 * **Contributor and above** (`edit_posts`, the default)
 * **Author and above** (`publish_posts`)
 * **Administrator only** (`manage_options`)

Users also need permission to edit the specific post. Developers can override the
capability with the `smcexp_manage_capability` filter.

### What does “Hide from Visitors” do?

When the rule runs, the post stays published but visitors who cannot manage expiry
rules get a 404 for it. It is also left out of front-end lists and search, the public
REST API, oEmbed and sitemaps. Users who can manage expiry rules can still view 
it.

### Does this work with custom post types?

Yes. Any public custom post type can be enabled in **Content Expiry > Settings**.
Once enabled, the meta box, list-table column, Quick Edit, Bulk Edit, and front-
end actions all work on that post type.

Developers can add private CPTs to the settings checkbox list via the `smcexp_supported_post_types_choices`
filter, and override the runtime list via `smcexp_supported_post_types`.

### Does this work with WooCommerce products?

Yes. Enable **Products** in **Content Expiry > Settings** and the Content Expiry
meta box will appear in the WooCommerce product editor alongside the standard product
fields. Quick Edit and Bulk Edit on the products list table work too.

### How do I see what’s scheduled to expire?

Open **Content Expiry > Scheduled Actions**. The page lists every queued expiry 
job with the post title, action type (Move to Draft / Redirect / Swap / Hide), the
time it fires (relative + absolute, in your WP timezone), and a colour-coded status
pill. Pending jobs have **Run now** and **Cancel** buttons. Filter by Upcoming /
Completed / Failed / Cancelled / All.

### What happens if I deactivate the plugin?

Deactivating stops all expiry actions: redirects, hidden posts and swapped content
go back to normal, and queued expiry jobs are cancelled. Your rules are kept. When
you reactivate, every pending rule is queued again, and rules whose date has already
passed run on the next queue run.

### Does this work with caching plugins?

Yes, but full-page caching plugins may serve stale content briefly after an expiry
action runs. The plugin fires a `smcexp_cache_purge` action that caching plugins
can hook into.

### Can I undo an expiry action?

Draft: re-publish the post. Redirect: clear the expiry rule. Swap Content: original
content is never overwritten — clear the rule to restore it. Hide: clear the rule
and the post becomes visible again immediately.

### Does this require WooCommerce?

No. Action Scheduler is bundled directly with the plugin.

### Is there a REST API or WP-CLI?

Yes. REST routes (namespace `smcexp/v1`):

 * `GET /wp-json/smcexp/v1/upcoming` lists pending rules you can edit, soonest first.
   Parameters: `post_type`, `limit` (1-100, default 25), `offset`. Requires the 
   Minimum Capability.
 * `GET /wp-json/smcexp/v1/log` returns the audit log, newest first. Parameters:`
   post_id`, `status`, `limit` (1-100, default 25), `offset`. Requires `manage_options`.
 * `POST /wp-json/smcexp/v1/expire/<id>` runs a pending rule now. Requires the Minimum
   Capability and permission to edit the post.
 * `POST /wp-json/smcexp/v1/extend/<id>` with `days` (1-3650) moves a pending rule’s
   date later. Same permissions as `expire`.

WP-CLI commands:

 * `wp smcexp list [--status=<pending|expired|cancelled|failed|all>] [--post_type
   =<type>] [--before=<date>] [--after=<date>] [--format=<table|json|csv|yaml|count
   |ids>]`
 * `wp smcexp expire <post_id> [--force] [--dry-run]` runs a pending rule now. `--
   force` re-runs a rule that already ran, failed or was cancelled. Trashed posts
   are never touched.
 * `wp smcexp extend <post_id> --days=<days>` moves a pending rule’s date later 
   by 1-3650 days.
 * `wp smcexp log [--post_id=<id>] [--status=<status>] [--limit=<n>] [--format=<
   format>]`

Run `wp help smcexp <command>` for details.

## Recenzije

Nema recenzija za ovaj dodatak.

## Suradnici i Programeri

“Raptor Scheduled Content Expiry” je softver otvorenog koda. Sljedeće osobe su doprinijele
ovom dodatku.

Suradnici

 *   [ Amr Issa ](https://profiles.wordpress.org/amr267/)

[Prevedite “Raptor Scheduled Content Expiry” na svoj jezik.](https://translate.wordpress.org/projects/wp-plugins/raptor-scheduled-content-expiry)

### Zainteresirani ste za razvoj?

[Pregledajte kôd](https://plugins.trac.wordpress.org/browser/raptor-scheduled-content-expiry/),
pogledajte [SVN spremište](https://plugins.svn.wordpress.org/raptor-scheduled-content-expiry/)
ili se pretplatite na [dnevnik razvoja](https://plugins.trac.wordpress.org/log/raptor-scheduled-content-expiry/)
od [RSS](https://plugins.trac.wordpress.org/log/raptor-scheduled-content-expiry/?limit=100&mode=stop_on_copy&format=rss).

## Dnevnik promjena

#### 1.10.0

Tested with WordPress 7.1. Bundles Action Scheduler 4.2.0, so WordPress 6.9 or later
is now required.

**Security and permissions**

 * Fixed: the Minimum Capability setting was saved but never enforced, so Authors
   and Contributors could create, extend and run expiry rules (including off-site
   redirects) even with “Administrator only” selected. It now applies to the meta
   box, list column, Quick Edit, Bulk Edit, the REST API and the hidden-post bypass.
 * Fixed: hidden (“Hide from Visitors”) posts were readable by anonymous visitors
   through the core REST API, REST search, WooCommerce Store API product lists and
   oEmbed.
 * Fixed: the dashboard widget was shown to every role, including Subscribers, and
   listed titles of draft and private posts.
 * Fixed: the Scheduled Actions screen accepted any Action Scheduler action ID, 
   so other plugins’ jobs could be run or cancelled from it.

**Scheduling reliability**

 * Fixed: pending rules created on 1.0.0 were never queued. Pending rules without
   a queued job are now queued again automatically after an update or reactivation,
   so there is no need to re-save posts.
 * Fixed: deactivation did not cancel any queued jobs, and reactivation never re-
   queued them, so expiries were silently lost when WooCommerce or another Action
   Scheduler host was active. Deactivation now cancels the plugin’s jobs, and reactivation
   re-queues every pending rule.
 * Fixed: re-publishing or re-saving an expired post re-armed the old rule, which
   undid the documented “re-publish the post” undo.
 * Fixed: failures were recorded as completed, PHP errors skipped the retry, and
   a permanent failure left the rule pending forever. Failed rules are now retried
   once and then marked Failed.
 * Fixed: concurrent saves could leave two pending jobs for one post, and a stale
   job could expire a post early.
 * Fixed: Quick Edit scheduled a stray expiry job for the revision it created.
 * Fixed: multisite network activation set up only the main site, sites created 
   later had no defaults, and network deactivation cleaned up only the main site.
 * Fixed: uninstall left the plugin’s Action Scheduler jobs, logs and group, and
   its transients, on every site.
 * Fixed: deactivation left Action Scheduler’s queue-runner cron event behind, which
   logged an invalid_schedule error.
 * Fixed: the audit-log prune event was rescheduled on every request, which triggered
   WooCommerce’s “translation loading too early” notice.

**Editor, Quick Edit and Bulk Edit**

 * Fixed: Bulk Edit never saved expiry rules.
 * Fixed: meta box validation errors and the past-date notice were never shown, 
   so invalid rules were dropped while the editor reported success.
 * Fixed: a malformed expiry date caused a critical error in the meta box and Quick
   Edit save paths.
 * Fixed: Quick Edit skipped validation and could schedule Redirect or Swap rules
   with no URL or content.
 * Fixed: changing only the date in Quick Edit was ignored.
 * Fixed: legitimate redirect destinations, including the Default Redirect URL, 
   were rejected. A redirect to the post’s own URL, which looped forever, is now
   refused.
 * Fixed: the Default Expiry Action and Default Redirect URL settings were saved
   but never used.
 * Fixed: the audit log lost “configured by” for rules set through Quick Edit, Bulk
   Edit or the REST API.
 * Fixed: duplicate element IDs and a broken label layout in the Quick Edit and 
   Bulk Edit fields.

**Front end**

 * Fixed: hidden posts still appeared in Query Loop blocks, sticky posts, previous/
   next links, WooCommerce related products, sitemaps (core and Yoast) and feeds.
 * Fixed: Administrators and Editors also got a 404 for hidden posts.
 * Fixed: expired hidden WooCommerce products could still be bought.
 * Fixed: Swap Content applied only on single views; it now also applies to excerpts,
   archives, feeds and the REST API, with paragraphs, shortcodes and blocks rendered.
 * Improved: the hidden-post filter no longer adds postmeta joins to every front-
   end query.

**Admin screens**

 * Fixed: Run now and Cancel on the Scheduled Actions screen caused “headers already
   sent” warnings and a blank page.
 * Fixed: cancelling a job from Scheduled Actions left the rule marked pending and
   wrote no audit entry.
 * Fixed: the Settings page showed no “Settings saved.” confirmation or validation
   errors.
 * Fixed: saving settings while WooCommerce or another post-type provider was inactive
   silently disabled expiry for that post type.
 * Fixed: on phones, the Scheduled Actions table hid the columns with Run now and
   Cancel.
 * Fixed: admin styles were not loaded on Scheduled Actions in translated admin 
   languages.
 * Fixed: settings controls had no accessible names.
 * Fixed: the audit log and list column showed raw UTC timestamps and untranslated
   slugs.
 * Fixed: dashboard widget data was not refreshed when rules changed, and its “View
   full audit log” link pointed to an old URL.
 * Fixed: PHP 8.1+ deprecation notices and empty links when a post has no edit link.
 * Fixed: Action Scheduler’s own Tools > Scheduled Actions page is no longer removed,
   so WooCommerce and other plugins keep their queue view and the linked raw queue
   page renders correctly.
 * Fixed: an uncached per-row database query on the Scheduled Actions screen.
 * Changed: meta box accent colours follow the WordPress 7 admin colour scheme.
 * Fixed: a translatable string without a translators comment.

**REST API and WP-CLI**

 * Fixed: `/extend` and `wp smcexp extend` accepted negative, zero, non-numeric 
   and huge day values. Days must now be 1-3650, and only pending rules can be extended.
 * Fixed: `/expire` and `wp smcexp expire` reported success for posts without a 
   pending rule and left the queued job behind, and the CLI restored trashed posts.
   Both now run only pending rules (`--force` re-runs a finished rule) and cancel
   the queued job first.
 * Fixed: `/upcoming` left out scheduled and private posts, reported a total that
   included posts you cannot see, had no limit cap and was not ordered by expiry.
   It now also returns `expiry_date_local`.
 * Fixed: permission errors returned 401 to logged-in users and for unknown posts.
   They now return 403 and 404.
 * Fixed: `wp smcexp list --format=ids` printed “Array”. Help text now lists one
   option per entry, unknown IDs report “not found”, and `list` gained `--before`
   and `--after`.
 * Removed: the unused `smcexp_bulk_edit_save` admin-ajax endpoint.

**Compatibility**

 * Updated: bundled Action Scheduler 3.9.3 to 4.2.0, which includes hardening against
   unsafe deserialization of stored schedules. Requires at least WordPress 6.9.
 * Changed: the “Action Scheduler could not be loaded” notice no longer tells site
   owners to run Composer.
 * Fixed: the audit table definition caused a no-op schema change on MariaDB.
 * Docs: corrected the readme, documented the REST API and WP-CLI commands, and 
   fixed the WP-CLI command name in the changelog (`wp smcexp`, not `wp scem`).

#### 1.9.1

 * Fixed: clicking “Run now” on a pending row in the Scheduled Actions screen executed
   the expiry but left the Action Scheduler row stuck as “Pending”. The handler 
   now routes through Action Scheduler’s queue runner, which fires the expiry hook
   and marks the row complete in the AS store, so the row correctly moves to the
   Completed tab on reload.

#### 1.9.0

**Scheduling reliability**

 * Fixed: bundled Action Scheduler was not initialising on fresh installs because
   it was loaded inside a `plugins_loaded` priority-0 callback, which prevented 
   Action Scheduler’s own bootstrap hooks (added during the same priority) from 
   firing. Result: `as_schedule_single_action()` was undefined when posts were saved,
   so expiries were silently never queued. Action Scheduler is now loaded at plugin-
   file load time.
 * Fixed: the “Action Scheduler could not be loaded” admin notice was being shown
   spuriously because the availability check ran at `plugins_loaded` priority 0 —
   before Action Scheduler defines its helper functions at priority 1. The check
   now runs at priority 20.
 * Fixed: timezone handling treated the WordPress timezone as UTC whenever the site
   was configured with a UTC offset (`gmt_offset`) instead of a named zone (`timezone_string`).
   Local times like “12:44 PM” were being saved as 12:44 _UTC_, causing actions 
   to fire hours late. Both the meta-box save path and the Quick/Bulk Edit save 
   path now use `wp_timezone()`, which handles named zones and UTC offsets correctly.

**Custom post types & WooCommerce products**

 * Added: full support for any public custom post type once it’s enabled in **Content
   Expiry > Settings**. Bulk-edit “Expiry” column hooks now register dynamically
   per post type (`manage_{post_type}_posts_columns` / `manage_{post_type}_posts_custom_column`)
   instead of the legacy blanket hooks, so the column only appears on post types
   you actually opted into.
 * Added: WooCommerce product support. The meta box appears in the WooCommerce classic
   product editor; Quick Edit and Bulk Edit work on the products list table.
 * Added: `smcexp_supported_post_types_choices` filter, letting developers add private
   CPTs to the settings checkbox list.
 * Changed: the **Media (attachment)** post type is no longer offered in the settings
   list (rarely useful for content expiry; can be re-added via the new filter).

**Admin UX**

 * Changed: **Content Expiry** is now a top-level menu item in the admin sidebar(
   clock icon) with two children — **Settings** and **Scheduled Actions** — instead
   of living under Tools.
 * Added: a custom **Scheduled Actions** screen replaces the raw Action Scheduler
   queue UI for end users. It shows only this plugin’s jobs with friendly action
   labels, post links, relative + absolute times, status pills, tab filters (Upcoming/
   Completed / Failed / Cancelled / All) with accurate counts, and per-row **Run
   Now** / **Cancel** buttons for pending jobs. A footer link still opens the raw
   Action Scheduler queue for power users.
 * Improved: the Content Expiry meta box has been redesigned to match the Gutenberg
   sidebar’s visual language — uppercase 11px field labels, polished inputs with
   focus rings, a custom select arrow, a colour-coded status pill (Pending / Expired/
   Cancelled), grouped subgroup panels for the Redirect and Swap Content fields,
   and a separated, de-emphasised “Clear expiry rule” row.
 * Improved: clicking anywhere inside the date/time field opens the date picker (
   previously only the calendar icon was clickable). Uses `HTMLInputElement.showPicker()`
   with a graceful fallback.

#### 1.0.0

 * Initial release
 * Post, page, and custom post type expiry with date/time picker
 * Four expiry actions: Draft, Redirect (301/302), Swap Content, Hide
 * Audit log with custom database table
 * Quick Edit and Bulk Edit support
 * Dashboard widget for upcoming expirations
 * REST API endpoints for developers
 * WP-CLI commands
 * Action Scheduler bundled (no WooCommerce dependency)
 * Full i18n support with .pot file

## Meta

 *  Version **1.10.0**
 *  Zadnje ažuriranje **prije 1 mjesec**
 *  Aktivnih instalacija **10+**
 *  WordPress inačica ** 6.9 ili viša **
 *  Testirano do **7.1.4**
 *  PHP inačica ** 7.4 ili viša **
 *  Language
 * [English (US)](https://wordpress.org/plugins/raptor-scheduled-content-expiry/)
 * Oznaka
 * [auto unpublish](https://hr.wordpress.org/plugins/tags/auto-unpublish/)[content expiry](https://hr.wordpress.org/plugins/tags/content-expiry/)
   [content scheduling](https://hr.wordpress.org/plugins/tags/content-scheduling/)
   [redirect](https://hr.wordpress.org/plugins/tags/redirect/)[schedule posts](https://hr.wordpress.org/plugins/tags/schedule-posts/)
 *  [Napredni pogled](https://hr.wordpress.org/plugins/raptor-scheduled-content-expiry/advanced/)

## Ocjena

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/raptor-scheduled-content-expiry/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/raptor-scheduled-content-expiry/reviews/)

## Suradnici

 *   [ Amr Issa ](https://profiles.wordpress.org/amr267/)

## Podrška

Želite nešto reći? Potrebna vam je pomoć?

 [Pregledaj forum za podršku](https://wordpress.org/support/plugin/raptor-scheduled-content-expiry/)