Filters
lh_archive_post_status_get_applicable_post_types_filter($post_types): the post type names the archived status applies to. Remove a type here to leave its listings, list table and edit screen untouched. This is the filter to use.lh_archive_post_status_posttypes_filter($post_types): the older name for the same list, applied just before the filter above. Kept for compatibility.lh_archive_post_status_return_doing_their_own_thing_post_types($post_types): post types that manage their own publish box, by defaultadvanced_adsandwc_membership_plan. They’re excluded from the applicable types and from the WP Statuses publish box.lh_archive_post_status_message_filter($message,$content): the Archive Message HTML, afterwpautop(), before it’s added to an archived post’s content.lh_archive_post_status_content_filter($updated_content,$content): the archived post’s content with the message prepended. Return something else to change the placement.lh_archive_post_status_get_archive_post_link($link,$post): the one-click archive URL, an admin-ajax request with a nonce that redirects back to the current page.lh_archive_post_status_input_validation($output,$input): the settings array on save.
Template function
archive_post_link( $text = null, $before = '', $after = '', $post = 0, $class = 'post-archive-link' ) echoes an Archive link for a post, like edit_post_link(). It outputs nothing unless the current user can edit the post and its post type is applicable. The anchor tag passes through the archive_post_link filter ( $link, $post_id, $text ). It’s only defined if no other plugin has defined it.
Data and cron
- Post status:
archive. - Post meta
_lh_archive_post_status-post_expires: the Archive Date, asY-m-d H:i:s. - Option
lh_archive_post_status_options: the Reading settings, keyspublic,lh_archive_post_status-title_labelandlh_archive_post_status_message. - Cron:
lh_archived_post_status_run(hourly, archives expired posts) andlh_archived_post_status_initial(once after activation, sets default settings). Both are scheduled on every site when network-activated, and cleared on deactivation.
Integrations
- Bundles the WP Statuses library, loaded only if no other copy is present.
- Relevanssi: archived posts are treated as valid for indexing and results.
- WP Super Cache and LiteSpeed Cache: when a published item of the
postpost type is archived, its cache (and the home page, for LiteSpeed) is purged. - LocalHero plugins: archived posts are included for lh-wayback-machine and the broken link checker when publicly readable, the Archive Date is not copied by lh-copy-to-draft, and an Archive link is added to the More modal.

