Update filters.php

This commit is contained in:
Michael W. Delaney
2018-08-08 08:51:00 -04:00
committed by GitHub
parent e898cf1f4d
commit d13e8fd9be

View File

@@ -84,11 +84,12 @@ add_filter('get_search_form', function () {
/**
* Collect data for searchform.
*/
add_filter('sage/template/app/data', function ($data) {
$data['sf_action'] = esc_url(home_url('/'));
$data['sf_screen_reader_text'] = _x('Search for:', 'label', 'sage');
$data['sf_placeholder'] = esc_attr_x('Search …', 'placeholder', 'sage');
$data['sf_current_query'] = get_search_query();
$data['sf_submit_text'] = esc_attr_x('Search', 'submit button', 'sage');
return $data;
add_filter('sage/template/app/data', function ($data) {
return $data + [
'sf_action' => esc_url(home_url('/')),
'sf_screen_reader_text' => _x('Search for:', 'label', 'sage'),
'sf_placeholder' => esc_attr_x('Search …', 'placeholder', 'sage'),
'sf_current_query' => get_search_query(),
'sf_submit_text' => esc_attr_x('Search', 'submit button', 'sage'),
];
});