Directorist provides a rich set of action hooks that allow developers to extend or modify its functionality without editing the core files.
Each hook fires at a specific point in the plugin lifecycle, enabling you to inject custom code for listings, payments, notifications, directories, and more.
Core Plugin Actions #
These hooks help you run code during key lifecycle events such as installation, update, or load completion.
| Hook | Description |
|---|---|
directorist_loaded | Fires when the Directorist plugin is fully loaded. |
directorist_installed | Fires when Directorist is installed. |
directorist_updated | Fires when Directorist is updated. |
Template and Display Actions #
These hooks let you modify or inject elements in front-end templates such as listings, dashboards, search forms, and checkout pages.
| Hook | Context |
|---|---|
directorist_before_settings_panel_header | Before rendering the settings panel header. |
directorist_before_directory_type_edited | Before editing a directory type. |
directorist_before_all_directory_types | Before displaying all directory types. |
directorist_before_contact_form_submit_button | Before the contact form submit button. |
directorist_single_listing_after_title | After the single listing title. |
directorist_before_add_listing_from_frontend | Before rendering the Add Listing form. |
directorist_before_submit_listing_frontend | Before submitting a listing from frontend. |
directorist_after_submit_listing_frontend | After submitting a listing from frontend. |
directorist_after_file_upload_form_field | After rendering file upload fields. |
atbdp_before_terms_and_conditions_font | Before the terms and conditions section. |
directorist_search_listing_before_title | Before displaying search listing title. |
directorist_search_listing_after_search_bar | After the search bar in search listings. |
atbdp_before_all_categories_loop / atbdp_after_all_categories_loop | Before / after categories loop. |
atbdp_before_all_locations_loop / atbdp_after_all_locations_loop | Before / after locations loop. |
directorist_before_reset_password_form / directorist_after_reset_password_form | Before / after reset password form. |
atbdp_before_login_form_end | Before the login form ends. |
atbdp_before_user_registration_submit | Before registration submit button. |
directorist_author_listings_before_loop | Before author listings loop. |
directorist_before_author_profile_section | Before author profile section. |
directorist_before_author_about_section | Before author about section. |
directorist_author_listing_after_about_section | After author about section. |
directorist_before_list_listings_loop | Before list view loop. |
directorist_before_listings_pagination / directorist_after_listings_pagination | Before / after pagination. |
directorist_before_grid_listings_loop / directorist_after_grid_listings_loop | Before / after grid listings loop. |
directorist_before_map_listings_loop / directorist_after_map_listings_loop | Before / after map listings loop. |
directorist_before_listing_types | Before listing types render. |
atbdp_payment_receipt_after_total_price | After total price in payment receipt. |
directorist_dashboard_navigation / directorist_after_dashboard_navigation | Before / after dashboard navigation. |
directorist_dashboard_contents / directorist_after_dashboard_contents | Dashboard content area. |
directorist_dashboard_listing_th_* / directorist_dashboard_listing_td_* | Customize table header and cell content in dashboard listings. |
directorist_dashboard_before_pagination / directorist_dashboard_after_pagination | Pagination hooks in dashboard. |
atbdp_before_checkout_form_start / atbdp_after_checkout_form_end | Surround checkout form. |
atbdp_before_cc_form / atbdp_after_cc_form | Surround credit card form. |
Email and Notification Actions #
Used to trigger custom email or notification behavior when listings or orders are created, updated, or completed.
| Hook | Fires When |
|---|---|
directorist_email_on_notify_owner_order_created | Owner receives order created email. |
directorist_email_on_notify_owner_order_completed | Owner receives order completed email. |
directorist_email_on_notify_owner_listing_submitted | Owner receives listing submission email. |
directorist_email_on_notify_admin_listing_published | Admin notified when listing is published. |
directorist_email_on_notify_owner_listing_published | Owner notified when listing is published. |
directorist_email_on_notify_owner_listing_edited | Owner notified when listing is edited. |
directorist_email_on_notify_owner_listing_to_expire | Owner notified before listing expires. |
directorist_email_on_notify_owner_listing_expired | Owner notified after expiration. |
directorist_email_on_notify_owner_to_renew | Owner notified for renewal. |
directorist_email_on_notify_owner_listing_deleted | Owner notified after deletion. |
directorist_email_on_notify_admin_become_author | Admin notified on author request. |
directorist_email_on_notify_admin_order_created / directorist_email_on_notify_admin_order_completed | Admin notified about orders. |
directorist_email_on_notify_admin_listing_submitted / directorist_email_on_notify_admin_listing_edited | Admin notified about listings. |
Listing Management Actions #
These actions run during the listing creation, update, or deletion process.
| Hook | Description |
|---|---|
directorist_ajax_before_request_handling / directorist_ajax_after_request_handling | Around AJAX request handling. |
atbdp_before_processing_submitted_listing_frontend | Before processing frontend listing submission. |
atbdp_before_processing_to_update_listing | Before updating listing. |
atbdp_listing_updated / atbdp_listing_inserted | After listing update or insert. |
atbdp_listing_published | After listing published. |
atbdp_after_created_listing | After listing created. |
atbdp_before_renewal / atbdp_after_renewal | Around listing renewal process. |
directorist_listing_deleted | After listing deleted. |
atbdp_all_listings_badge_template | Customize badge template on listings. |
Payment and Order Actions #
Hooks for handling custom gateways, order status changes, and payment flows.
| Hook | Description |
|---|---|
atbdp_order_created | After an order is created. |
atbdp_offline_payment_created | After offline payment is created. |
atbdp_process_{gateway}_payment | Process payment for a specific gateway. Replace {gateway} with your gateway slug. |
atbdp_online_order_processed | After online order processed. |
atbdp_order_completed | After order marked completed. |
atbdp_custom_order_column_content | Output custom content in the order list table. |
atbdp_order_status_changed | When order status changes. |
atbdp_email_receipt_after_total_price | After total price in email receipt. |
Directory and Taxonomy Actions #
| Hook | Description |
|---|---|
directorist_before_create_directory_type / directorist_after_create_directory_type | Around creation of a directory type. |
directorist_before_update_directory_type / directorist_after_update_directory_type | Around update of a directory type. |
directorist_before_directory_type_updated | Before directory type updated. |
Review and Comment Actions #
Use these to customize or track user reviews and comments.
| Hook | Description |
|---|---|
directorist_review_validate_data | Validate review data before saving. |
directorist_review_updated | After review updated. |
directorist_review_clear_cache | Clear review cache. |
directorist_review_rating_updated | After review rating updated. |
directorist_review_content_before / directorist_review_content_after | Wrap review content. |
directorist_after_comment_textarea | After comment textarea. |
directorist_comment_form_before_fields / directorist_comment_form_after_fields | Around comment form fields. |
directorist_comment_form / directorist_comment_form_after | During comment form render. |
Import and Migration Actions #
| Hook | Description |
|---|---|
directorist_listing_imported | After a listing is imported. |
directorist_before_directory_type_updated | Before directory type updated during import. |
Background Process Actions #
Used for updater, licensing, and tracking integrations.
| Hook | Description |
|---|---|
include_style_settings | Include style settings. |
post_edd_sl_plugin_updater_setup | After EDD Software Licensing updater setup. |
in_plugin_update_message-{file} | Displays plugin update message. |
before_appsero_license_section / after_appsero_license_section | Around Appsero license section. |
{slug}_tracker_optin / {slug}_tracker_optout | User tracking opt-in/out. |
{slug}_uninstall_reason_submitted | After uninstall feedback submitted. |
Database Actions #
| Hook | Description |
|---|---|
atbdp_pre_insert_{type} | Before inserting data of a specific type. |
atbdp_post_insert_{type} | After inserting data of a specific type. |