Filters Associated With Widget

Filter: wp_travel_search_filter_widget_form_fields #

WP Travel search filter widget fields.

Source

File: /inc/form-fields.php
Used by: /inc/form-fields.php

Parameters
$fields

Example:

function prefix_wp_travel_search_filter_widget_form_fields( $fields ) {
    $fields[‘custom_key’] = ‘value’;
    return $fields;
}
add_filter( 'wp_travel_search_filter_widget_form_fields', 'prefix_wp_travel_search_filter_widget_form_fields' );

Filter: wp_travel_search_filter_label_strings #

WP Travel search filter labels.

Source

File: /inc/helpers.php
Used by: /inc/helpers.php

Parameters
$fields

Example:

function prefix_wp_travel_search_filter_label_strings( $fields ) {
    $fields[‘search’] = ‘__( ‘Finding Anything?’, ‘wp-travel’ );
    return $fields;
}
add_filter( 'wp_travel_search_filter_label_strings', 'prefix_wp_travel_search_filter_label_strings' );

Filter: wp_travel_search_placeholder #

WP Travel search filter placeholder for search field.

Source

File: /inc/helpers.php
Used by: /inc/helpers.php

Parameters
$placeholder

Example:

function prefix_wp_travel_search_placeholder( $placeholder ) {
    $placeholder = __( ‘CUSTOM PLACEHOLDER’, ‘wp-travel’ );
    return $placeholder;
}
add_filter( 'wp_travel_search_placeholder', 'prefix_wp_travel_search_placeholder' );

Filter: wp_travel_search_form #

WP Travel search form filter.

Source

File: /inc/helpers.php
Used by: /inc/helpers.php

Parameters
$content

Example:

function prefix_wp_travel_search_form( $content ) {
    $content = ‘MODIFY HERE’;
    return $content;
}
add_filter( 'wp_travel_search_form', 'prefix_wp_travel_search_form' );

Filter: wp_travel_dashboard_widget_bookings #

WP Travel dashboard widget booking number of posts filter.

Source

File: /inc/admin/class-dashboard-widgets.php
Used by: /inc/admin/class-dashboard-widgets.php

Parameters
Default is 5.

Example:

function prefix_wp_travel_dashboard_widget_bookings( $tabs ) {
    return 8;
}
add_filter( 'wp_travel_dashboard_widget_bookings', 'prefix_wp_travel_dashboard_widget_bookings' );

Filter: wp_travel_search_widget_title #

WP Travel search widget title.

Source

File: /inc/widgets/class-wp-travel-search-filters-widget.php
Used by: /inc/widgets/class-wp-travel-search-filters-widget.php,
                 /inc/widgets/class-wp-travel-widget-search.php

Parameters
$title

Example: 

function prefix_wp_travel_search_widget_title( $title ) {
    $title = ‘Search Here’;
    return $title;
}
add_filter( 'wp_travel_search_widget_title', 'prefix_wp_travel_search_widget_title' );