mirror of
https://gh.wpcy.net/https://github.com/mainwp/Code-Snippets-Functions.git
synced 2026-04-28 11:22:21 +08:00
14 lines
371 B
Text
14 lines
371 B
Text
add_filter( 'relevanssi_remove_punctuation', function( $str) {
|
|
return implode(
|
|
' ',
|
|
array_filter(
|
|
explode( ' ', $str ),
|
|
function( $word ) {
|
|
if ( relevanssi_strlen( $word ) < 3 ) {
|
|
return is_numeric( $word );
|
|
}
|
|
return true;
|
|
}
|
|
)
|
|
);
|
|
} );
|