FiltersΒΆ
Plugin defines many WordPress filters to make it easily extendable:
Filter tag | Occurance | Arguments |
---|---|---|
horizon_listing_type_supported |
In listing types configuration, submission | supported [bool], post type [string] |
horizon_listing_detail_sections |
In listing detail | sections [array], post type [string] |
horizon_listing_detail_section_root_dir |
In listing detail | path to templates dir [string], section [string] |
horizon_attribute_value |
In listing detail | value [string], field [array] |
horizon_mail_subject |
In notifications, claim and report listing emails | subject [string], mail action [string], template arguments [array] |
horizon_mail_body |
In notifications, claim listing emails | body [string], mail action [string], template arguments [array] |
horizon_billing_fields |
In payments, user profile | billing fields [array] |
horizon_invoices_types |
In invoice post type definition | invoice types [array] |
horizon_invoices_next_invoice_number |
When generating the very next invoice number | next number [string] |
horizon_invoices_tax_rate |
When calculating item base price | tax rate [double], supplier vat number [string], customer vat number [string] |
horizon_mail_actions_choices |
In definition of mail templates | actions [array] |
horizon_filter_fields |
In filter definition | fields [array] |
horizon_order_query |
In query filtering to set order | query [object], params [array] |
horizon_filter_query |
In query filtering to filter posts by ids | ids [array], params[array] |
horizon_currencies_current_currency_index |
When receiving current currency | currency index [int] |
horizon_currencies_current_currency_rate |
When receiving current currency rate | currency rate [double] |
horizon_package_durations |
In package system | package durations [array] |
horizon_payment_proceed_gateway |
In payment gateway definition | proceed [bool], gateway [string] |
horizon_payment_gateways |
In purchase form | gateways [array] |
horizon_claims_allowed_listing_post_types |
In listing detail | allowed post types [array] |
horizon_shop_allowed_listing_post_types |
In listing detail | allowed post types [array] |
horizon_filter_field_plugin_dir |
In filter form to set field plugin directory for template loader | directory [string], template [string] |
horizon_filter_sort_by_choices |
In filter form | sorting choices [array] |
horizon_submission_can_user_create |
In submission | permission granted [bool], user id [int] |
horizon_metabox_location_polygon_enabled |
In post type definition (and submission) | enabled [bool], post type [string] |
horizon_metabox_location_street_view_enabled |
In post type definition (and submission) | enabled [bool], post type [string] |
horizon_metabox_location_inside_view_enabled |
In post type definition (and submission) | enabled [bool], post type [string] |
Each filter can be applied in your code using standard WordPress way, using apply_filters() function:
apply_filters( $filter_tag, $arg1, $arg2 ... );
To hook on filter, use add_filter() WP function:
add_filter( $filter_tag, $callback, $priority = 10, $accepted_args = 1 );