Use filters to modify data before it is displayed or saved. Add filters in a custom plugin or a child theme.
Core Plugin Filters #
| Hook | Purpose | Expected / Return |
|---|---|---|
atbdp_right_sidebar_name | Change the default right sidebar ID used by Directorist. | string → string |
plugin_locale | Override plugin textdomain locale (global WP filter). | string → string |
directorist_admin_template | Override the admin template base path. | string → string |
atbdp_create_required_pages | Control auto-creation of required pages on setup. | bool → bool |
directorist_show_migration_button | Show/hide migration button in admin. | bool → bool |
import_upload_size_limit | Set maximum upload size for imports (bytes). | int → int |
Example
add_filter( 'directorist_show_migration_button', '__return_false' );
Template and Display Filters #
| Hook | Purpose | Expected / Return |
|---|---|---|
atbdp_contact_listing_owner_widget_form_id | Replace contact form ID used in the “Contact Owner” widget. | `int |
directorist_widget_featured_listings_query_arguments | Adjust query args for Featured Listings widget. | array → array |
atbdp_avatar_size | Change avatar size (px). | int → int |
directorist_taxonomy_category_wrapper | Add/replace CSS classes for category wrapper. | `string |
directorist_taxonomy_location_wrapper | Add/replace CSS classes for location wrapper. | `string |
directorist/review_form/comment_fields | Modify review form fields. | array → array |
directorist/review_form/comment_form_args | Override comment_form() args for reviews. | array → array |
atbdp_payment_receipt_button_link | Change receipt button URL. | string → string |
atbdp_payment_receipt_button_text | Change receipt button label. | string → string |
atbdp_checkout_not_now_link | Change “Not now” link on checkout. | string → string |
atbdp_widget_template_args | Pass variables to widget templates. | array → array |
directorist_archive_single_listing_url | Override single listing URL on archives. | string → string |
widget_title / atbdp_widget_title | Filter widget titles (core + plugin). | string → string |
Example
add_filter( 'atbdp_avatar_size', fn( $size ) => 64 );
Query and Data Filters #
| Hook | Purpose | Expected / Return |
|---|---|---|
| `atbdp_allow_{similar | featured | search |
atbdp_popular_listing_number | Count of popular listings to fetch. | int → int |
atbdp_popular_listing_args | Query args for popular listings. | array → array |
atbdp_related_listing_args | Base related listings query args. | array → array |
atbdp_related_listings_meta_queries | Meta query parts for related listings. | array → array |
Form and Field Filters #
| Hook | Purpose | Expected / Return |
|---|---|---|
directorist_listing_form_fields_class_map | Map field types to classes. | array → array |
directorist_section_template / directorist_field_template / directorist_field_admin_template | Override template paths for sections/fields. | string → string |
directorist_form_field_data | Mutate field config before render. | array → array |
atbdp_add_listing_page_template | Switch Add Listing page template. | string → string |
directorist_search_field_template | Template for search field. | string → string |
directorist_single_section_template | Template for single listing sections. | string → string |
directorist_single_section_has_contents | Control section visibility by content. | bool → bool |
directorist_single_listing_widget_value | Change values displayed in single widgets. | mixed → mixed |
directorist_single_item_template | Template for single content items. | string → string |
directorist_custom_single_listing_pre_page_content | Inject HTML before single page content. | string → string |
directorist_single_listing_social_sharing_items | Social share list. | array → array |
directorist_single_listing_slider_image_size | Image size for single slider. | string → string |
atbdp_listing_price | Displayed listing price text/value. | string → string |
directorist_the_content | Filter single listing main content. | string → string |
atbdp_listing_map_info_window | Map info window HTML. | string → string |
atbdp_address_in_map_info_window | Address markup inside info window. | string → string |
atbdp_single_listing_map_section_text | Title/label for map section. | string → string |
directorist_related_listing_args | Related listings args (single context). | array → array |
directorist_archive_single_listing_url | Archive item link URL. | string → string |
Example
add_filter( 'atbdp_listing_price', function( $price ) {
return $price ? $price . ' /night' : __( 'Contact for price', 'my-textdomain' );
});
Dashboard and Navigation Filters #
| Hook | Purpose | Expected / Return |
|---|---|---|
directorist_dashboard_query_arguments | Change dashboard listings query. | array → array |
directorist_dashboard_tabs | Add/remove dashboard tabs. | array → array |
directorist_dashboard_listing_action_items | Prepend action items per row. | array → array |
directorist_dashboard_listing_action_items_end | Append action items per row. | array → array |
Listings and Archive Filters #
| Hook | Purpose | Expected / Return |
|---|---|---|
atbdp_all_listings_params | Archive defaults (view, order, etc.). | array → array |
atbdp_all_listings_meta_queries | Meta queries for archive. | array → array |
directorist_all_listings_query_arguments | Final WP_Query args for archive. | array → array |
directorist_custom_fields_meta_query_args | Meta query built from custom fields. | array → array |
atbdp_search_listings_meta_queries | Meta queries for search. | array → array |
atbdp_listing_search_query_argument | Search query args. | array → array |
directorist_all_listings_directory_type_args | Restrict by directory type. | array → array |
atbdp_map_options | JS map options object. | array → array |
directorist_listings_map_view_marker_icon | Marker icon URL/args. | `string |
directorist_listings_found_text | “Listings found” label. | string → string |
directorist_loop_wrapper_class / directorist_listings_wrapper_class | Add CSS classes. | string → string |
grid_view_title_link_add_attr / grid_view_thumbnail_link_add_attr | Add HTML attributes to links. | array → array |
directorist_loop_label | Change loop labels/badges. | array → array |
directorist_featured_badge_field_data | Featured badge data payload. | array → array |
atbdp_listings_grid_container_fluid | Use container-fluid layout. | bool → bool |
directorist_listings_header_title | Archive header title. | string → string |
directorist_pagination | Pagination HTML. | string → string |
directorist_pagination_prev_text / directorist_pagination_next_text | Prev/Next labels. | string → string |
Payment and Checkout Filters #
| Hook | Purpose | Expected / Return |
|---|---|---|
atbdp_enable_monetization_checkout | Enable checkout flow. | bool → bool |
atbdp_checkout_form_data / atbdp_checkout_form_final_data | Mutate checkout data. | array → array |
atbdp_featured_active_checkout | Auto-check featured option. | bool → bool |
atbdp_payment_receipt_data / directorist_payment_receipt_data | Receipt payload. | array → array |
atbdp_order_items | Order line items. | array → array |
atbdp_before_order_recipt | HTML before receipt (typo kept for back-compat). | string → string |
atbdp_order_details | Order details payload. | array → array |
directorist_order_amount_before_tax_calculation | Subtotal before tax. | float → float |
atbdp_order_amount | Final order amount. | float → float |
atbdp_payment_receipt_page_link | Receipt page URL. | string → string |
atbdp_is_checkout / atbdp_can_checkout | Control checkout context/permission. | bool → bool |
atbdp_get_success_page_uri / atbdp_is_success_page | Success page handling. | `string |
atbdp_success_page_redirect | Custom redirect after success. | `string |
atbdp_get_checkout_uri | Checkout URL. | string → string |
atbdp_send_back_to_checkout | Redirect back to checkout. | bool → bool |
atbdp_get_failed_transaction_uri / atbdp_is_failure_page | Failure page handling. | `string |
atbdp_get_banned_emails / atbdp_is_email_banned | Banlist control. | `array |
atbdp_valiate_card_format_pre_type / atbdp_cc_is_valid_format | Card validation logic. | bool → bool |
directorist_checkout_guard | Block or allow checkout programmatically. | bool → bool |
atbdp_cc_card_types / atbdp_cc_found_card_type | Supported and detected card types. | `array |
Currency and Payment Filters #
| Hook | Purpose | Expected / Return |
|---|---|---|
atbdp_payment_statuses | Register custom payment statuses. | array → array |
atbdp_order_bulk_actions | Add bulk actions to Orders table. | array → array |
atbdp_format_amount | Format money output. | string → string |
atbdp_payment_currency_settings | Currency settings payload. | array → array |
atbdp_currency_decimal_count | Decimal places. | int → int |
atbdp_{currency}_currency_filter_before / atbdp_{currency}_currency_filter_after | Surround amount with currency symbol. | string → string |
atbdp_currency_symbol | Override symbol (e.g., USD → $). | string → string |
Order and Receipt Filters #
| Hook | Purpose | Expected / Return |
|---|---|---|
atbdp_order_items_data | Normalize order items for emails/UI. | array → array |
directorist_email_receipt_order_amount | Amount shown in email receipt. | `float |
atbdp_add_new_order_column | Register custom column in Orders list. | array → array |
atbdp_order_for | Label for “Order for” field. | string → string |
atbdp_{gateway}gateway_label | Gateway label text. | string → string |
atbdp_order_table_shortable_colums | Sortable columns (typo kept). | array → array |
Email and Notification Filters #
| Hook | Purpose | Expected / Return |
|---|---|---|
directorist_email_notification_to_owner_on_order_created | Toggle owner email on order created. | bool → bool |
directorist_notify_owner_listing_submitted | Toggle owner email on submit. | bool → bool |
directorist_notify_admin_listing_published | Toggle admin email on publish. | bool → bool |
directorist_notify_owner_listing_published | Toggle owner email on publish. | bool → bool |
directorist_notify_owner_listing_to_expire | Toggle pre-expiry email. | bool → bool |
directorist_notify_owner_listing_expired | Toggle expired email. | bool → bool |
directorist_notify_owner_to_renew | Toggle renewal email. | bool → bool |
directorist_notify_admin_listing_submitted | Toggle admin email on submit. | bool → bool |
directorist_email_verification_title | Change email verification subject. | string → string |
Directory and Taxonomy Filters #
| Hook | Purpose | Expected / Return |
|---|---|---|
directorist_category_page_redirection_enabled | Enable redirect from category to directory. | bool → bool |
cptm_fields_before_update | Mutate fields before save (builder). | array → array |
directorist_builder_localize_data | Data passed to builder scripts. | array → array |
atbdp_test_migration | Control test migration UI. | bool → bool |
directorist_builder/fields / directorist_builder/layouts / directorist/builder/config | Extend builder registry/config. | array → array |
12) Import and Migration Filters #
| Hook | Purpose | Expected / Return |
|---|---|---|
atbdp_listing_import_limit_per_cycle | Batch size for importer. | int → int |
directorist_importing_listings_post_date | Set post date during import. | `string |
directorist_listing_imported | Alter payload after each import. | array → array |
directorist_legacy_attachment_importer | Toggle legacy attachment importer. | bool → bool |
directorist_listings_importer_header_nav_menu | Add header nav items in importer. | array → array |
directorist_importable_fields | Register importable fields map. | array → array |
directorist_listings_importer_default_time_limit | Time limit per cycle (seconds). | int → int |
Template and URI Filters #
| Hook | Purpose | Expected / Return |
|---|---|---|
directorist_template_directory / directorist_template_file_path | Control template resolution. | string → string |
atbdp_ext_template_path_{shortcode_key} | Custom template for a shortcode. | string → string |
directorist_template | Final template HTML. | string → string |
directorist_container / directorist_container_fluid / directorist_row / directorist_column | CSS class names for layout grid. | string → string |
Widget and Display Filters #
(Also listed earlier under “Template and Display” for visibility)
| Hook | Purpose | Expected / Return |
|---|---|---|
atbdp_widget_template_args | Data passed to widgets. | array → array |
| `atbdp_allow_{similar | featured | search |
Review and Comment Filters #
| Hook | Purpose | Expected / Return |
|---|---|---|
directorist/review/rating_html | Replace rating HTML. | string → string |
directorist_comment_edit_link | Edit link for comments. | string → string |
directorist/review/comments_open | Allow/disallow review comments. | bool → bool |
directorist/review/preprocess_comment_data | Sanitize/reshape comment data. | array → array |
directorist_comment_form_default_fields | Default comment fields. | array → array |
directorist_comment_form_defaults | comment_form() defaults. | array → array |
directorist_comment_form_logged_in | Logged-in message HTML. | string → string |
directorist_comment_form_fields | Entire fields array. | array → array |
directorist_comment_form_field_comment | Main comment field HTML. | string → string |
comment_form_field_{name} | One field by key. | string → string |
directorist_comment_form_submit_button / directorist_comment_form_submit_field | Submit button markup/field. | string → string |
directorist_review_date_format | Date format for reviews. | string → string |
System and Configuration Filters #
| Hook | Purpose | Expected / Return |
|---|---|---|
directorist_has_block_template | Use a block template for single. | bool → bool |
directorist_listings_export_submission_form_fields_row / directorist_listings_export_row | CSV export shaping. | array → array |
directorist_single_listing_header_migration_data | Header migration mapping. | array → array |
atbdp_*_page_url family (login, register, dashboard, add listing, fee plan, privacy, terms, edit, category/location/tag archives, receipt, checkout, renewal, PayPal IPN, author profile, search, listings, transaction failure) | Override critical URLs. | string → string |
atbdp_current_page_url | Current page URL. | string → string |
| `atbdp_single_{category | location | tag}` |
directorist_page_id | Resolve page IDs by key. | int → int |
directorist_password_reset_url | Password reset link. | string → string |
directorist_date_format / directorist_time_format | Date/time formats. | string → string |
| `atbdp_search_listing_{category | location}_argument` | Search taxonomy args. |
directorist_warnings | Admin warnings array. | array → array |
directorist_get_directory_type_nav_url | Directory type nav URLs. | string → string |
directorist_add_query_args_with_no_pagination | Append query args when removing pagination. | array → array |
directorist_registration_error_messages | Register error messages. | array → array |
directorist_supported_file_types_groups | Allowed file type groups. | array → array |
directorist_user_favorites | Favorites list for a user. | array → array |
directorist_get_allowed_attributes / directorist_get_allowed_html | KSES allowlists. | array → array |
Elementor and Builder Filters #
| Hook | Purpose | Expected / Return |
|---|---|---|
directorist_all_listings_elementor_widget_atts | Default atts for All Listings widget. | array → array |
atbdp_elementor_widgets | Register Elementor widgets. | array → array |
atbdp_elementor_widgets_activated | Toggle widgets active. | array → array |
Appsero and Licensing Filters #
| Hook | Purpose | Expected / Return |
|---|---|---|
appsero_endpoint | Change Appsero endpoint. | string → string |
appsero_is_local | Treat site as local for Appsero. | bool → bool |
appsero_custom_deactivation_reasons | Add deactivation reasons. | array → array |
Background Process Filters #
| Hook | Purpose | Expected / Return |
|---|---|---|
{identifier}_queue_lock_time / {identifier}_default_time_limit / {identifier}_time_exceeded | Control batch processor timings. | `int |
{identifier}_memory_exceeded | Memory guard. | bool → bool |
{identifier}_cron_interval | Custom cron interval. | `int |
{identifier}_query_args / {identifier}_query_url / {identifier}_post_args | Remote request shaping. | `array |
https_local_ssl_verify | SSL verify for local HTTP API calls. | bool → bool |
Schema and Configuration Filters #
| Hook | Purpose | Expected / Return |
|---|---|---|
directorist_schema_types | Register structured data types. | array → array |
directorist_system_status_environment_rows | Add rows to system status. | array → array |
Notes #
- Some hooks include historic typos (e.g.,
recipt,shortable_colums) kept for backward compatibility. Use them exactly as listed by the plugin you are targeting. - When a hook appears in more than one section (for clarity), it is the same filter.