Skip to content

Instantly share code, notes, and snippets.

@zackkatz
Forked from luistinygod/gist:0d49b2b0f530f6c6fce1
Last active August 29, 2015 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zackkatz/d6155b8e19bb30958844 to your computer and use it in GitHub Desktop.
Save zackkatz/d6155b8e19bb30958844 to your computer and use it in GitHub Desktop.
<?php
/*
* Supported on GravityView 1.6
*
* Add this to your theme's functions.php file
*
* Replace the string 'MY NEW LABEL' for your own
*/
add_filter( 'gravityview_widget_search_filters', 'my_gv_change_search_filters', 10, 2 );
function my_gv_change_search_filters( $search_fields = array(), $instance ) {
foreach( $search_fields as $k => $field ) {
if( !empty( $field['key'] ) && 'search_all' === $field['key'] ) {
$search_fields[ $k ]['label'] = 'MY NEW LABEL';
break;
}
}
return $search_fields;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment