<?php
/**
** Modify text of "Enable map filtering" and "Reset" buttons.
** These button texts can be changed with a setting since v1.0.4 of the Map add-on.
** The texts can also be translated with the facetwp_i18n hook.
**/
add_filter( 'gettext', function( $translated_text, $untranslated_text, $domain ) {
if ( 'facetwp-map-facet' == $domain ) {
if ( $translated_text == 'Enable map filtering' ) {
$translated_text = 'Use map as filter';
}
if ( $translated_text == 'Reset' ) {
$translated_text = 'Disable map as filter';
}
}
return $translated_text;
}, 10, 3 );