soderlind / norwegian-stopwords-searchwp4
Norwegian stopwords for SearchWP 4
Installs: 13
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:wordpress-plugin
README
Want to autoactivate the default search index? I have a plugin that does that
Norwegian Stopwords for SearchWP 4
Norwegian, bokmål and nynorsk, stopwords are missing in SearchWP 4. This plugin will add them if your locale is no_NB
or no_NN
add_filter( 'searchwp\stopwords', __NAMESPACE__ . '\stopwords' ); function stopwords( array $stopwords ) : array { $locale = strtolower( substr( get_locale(), 0, 2 ) ); switch ( $locale ) { case 'nb': case 'nn': $default_stopwords = explode( ',', _x( 'about,an,are,as,at,be,by,com,for,from,how,in,is,it,of,on,or,that,the,this,to,was,what,when,where,who,will,with,www', 'Comma-separated list of search stopwords in your language' ) ); return get_option( 'searchwp_stopwords', $default_stopwords ); default: return $stopwords; } }
Installation
You know the drill,
- Download
- Add to the plugins folder
- Activate.
Credits
The stopwords are from the WordPress translation, bokmål and nynorsk.
Copyright and License
Norwegian Stopwords for SearchWP 4 is copyright 2023 Per Søderlind
Norwegian Stopwords for SearchWP 4 is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.
Norwegian Stopwords for SearchWP 4 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with the Extension. If not, see http://www.gnu.org/licenses/.