soderlind/norwegian-stopwords-searchwp4

SearchWP 4 的挪威语停用词

1.1.1 2023-06-01 17:26 UTC

This package is auto-updated.

Last update: 2024-09-10 18:18:48 UTC


README

想要自动激活默认搜索索引?我有一个插件可以做到这一点

SearchWP 4 的挪威语停用词

SearchWP 4 中缺少挪威语、bokmål 和 nynorsk 的停用词。如果您的地区设置为 no_NBno_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;
	}
}

安装

您知道该怎么做,

  • 下载
  • 添加到插件文件夹
  • 激活。

鸣谢

停用词来自 WordPress 翻译,bokmålnynorsk

版权和许可证

SearchWP 4 的挪威语停用词版权所有 2023 Per Søderlind

SearchWP 4 的挪威语停用词是自由软件:您可以在自由软件基金会发布的GNU通用公共许可证的条款下重新分发和/或修改它,许可证版本为2,或者(根据您的选择)任何更高版本。

SearchWP 4 的挪威语停用词分发的目的是希望它是有用的,但没有任何保证;甚至没有隐含的适销性保证或适用于特定目的的适用性保证。有关详细信息,请参阅GNU通用公共许可证。

您应该已经随扩展程序一起收到GNU通用公共许可证的副本。如果没有,请参阅https://gnu.ac.cn/licenses/