ArchiveWP exposes a small set of actions and filters for extending or customizing behavior. Hooks are organized below by area, along with their parameter signatures and file locations.
Actions
| Hook | Location | Parameters | Description |
|---|---|---|---|
edawp_post_archived | includes/Backend/Archive/ArchiveService.php:121 | int $post_id, string $original_post_type | Fires after a post is moved into the archive post type. |
edawp_post_restored | includes/Backend/Archive/RestoreService.php:82 | int $post_id, string $original_post_type | Fires after a post is restored to its original post type. |
edawp_license_tab | includes/Backend/Settings/SettingsPage.php:128 | none | Allows additional markup inside the License tab of the settings screen. |
edawp_first_time_configuration_tab | includes/Backend/Settings/SettingsPage.php:192 | none | Inject content into the First-time Configuration tab. |
post_EDAWP_SL_Plugin_Updater_setup | includes/Admin/Updates/EDAWP_SL_Plugin_Updater.php:67 | array $edd_plugin_data | Runs after the EDD updater object has been instantiated (legacy hook preserved for compatibility). |
Filters
Admin & Settings
| Hook | Location | Parameters | Purpose |
|---|---|---|---|
archivewp_admin_notice_classes | includes/Backend/Backend.php:93 | string[] $notice_classes | Override the list of admin-notice classes initialised by the backend. |
Frontend Helpers
| Hook | Location | Parameters | Purpose |
|---|---|---|---|
edawp_anchor_id | includes/Frontend/Helpers.php:57 | string $default_id | Customise the ID used by the skip-link anchor injected above main content. |
edawp_archived_content_message | includes/Frontend/Helpers.php:92 | string $message | Filter the disclaimer text pulled from settings/defaults. |
archivewp_archived_content_message_classes | includes/Frontend/Helpers.php:187 | `array | string $classes, string $original_classes` |
archivewp_archived_content_date_markup | includes/Frontend/Helpers.php:156 | string $markup, int $post_id, string $formatted_date, int $timestamp | Modify the date line appended to the disclaimer output. |
edawp_archive_notice | includes/Frontend/Frontend.php:110 | string $notice_html, int $post_id, `string | false $archived_date` |
Filter Form
| Hook | Location | Parameters | Purpose |
|---|---|---|---|
edawp_archive_filters_max_visible | includes/Common/ArchiveFilterForm.php:174 | int $visible_limit, array $args | Override how many Archive Category checkboxes are shown before collapsing. |
edawp_archive_filters_sorted_categories | includes/Common/ArchiveFilterForm.php:208 | WP_Term[] $categories, array $args | Reorder the Archive Category list before rendering. |
Archive Loop Rendering
| Hook | Location | Parameters | Purpose |
|---|---|---|---|
archivewp_category_pills_html | includes/Common/ArchivePostRenderer.php:120 | string $html, WP_Term[] $terms, int $post_id | Customise the markup for Archive Category badges. |
archivewp_read_more_html | includes/Common/ArchivePostRenderer.php:172 | string $html, WP_Post $post, string $read_more_text, string $screen_reader_suffix, array $args | Modify the accessible “Read More” link. |
archivewp_post_dates_html | includes/Common/ArchivePostRenderer.php:412 | string $html, array $dates_meta, WP_Post $post, array $args | Change how the published/archived dates are rendered. |
archivewp_excerpt_more | includes/Common/ArchivePostRenderer.php:499 | string $more, WP_Post $post, array $args | Filter the ellipsis appended to generated excerpts. |
archivewp_results_heading_html | includes/Common/ArchivePostRenderer.php:612 | string $heading_html | Override the screen-reader heading printed before the results list. |
Archive Behavior
| Hook | Location | Parameters | Purpose |
|---|---|---|---|
edawp_archivable_post_types | includes/Backend/Archive/ArchiveService.php:152 | string[] $post_types | Filter which post types are eligible for archiving. |
edawp_preserve_taxonomy_relationships | includes/Backend/Archive/ArchiveTaxonomyMigrator.php:154 | bool $should_preserve, int $post_id, string $original_post_type | Override whether taxonomy terms are migrated into Archive Categories. |
Templates & Blocks
| Hook | Location | Parameters | Purpose |
|---|---|---|---|
edawp_template_cache_duration | includes/Common/BlockTemplates.php:166 | int $duration, string $slug | Adjust how long custom block templates stay cached. |
archivewp_default_disclaimer_text | blocks/archive-disclaimer/archive-disclaimer-block.php:114 | string $default_text | Provide alternate fallback text for the Archive Disclaimer block/editor. |
Notes
- Hook names use the
edawp_prefix for ArchiveWP-specific functionality andarchivewp_for front-end presentation helpers. - Unless otherwise stated, filters should return a value of the same type as the first parameter.
- File paths in the tables are relative to the plugin root.
