开发者 |
norcross
grantsplorp |
---|---|
更新时间 | 2020年3月25日 02:07 |
捐献地址: | 去捐款 |
PHP版本: | 5.2.4 及以上 |
WordPress版本: | 5.3.2 |
版权: | MIT |
版权网址: | 版权信息 |
blacklist_keys
setting in WordPress. The plugin will automatically fetch a list of terms on a regular schedule and update the contents of the “Comment Blacklist” field. Terms added manually via the “Local Blacklist” field will be retained during the scheduled updates. Terms added manually to the “Excluded Terms” field will be removed from the list.
The default list of terms is fetched from a GitHub repository maintained by Grant Hutchinson.
comment-blacklist-manager
folder to the /wp-content/plugins/
directory on the serverThe default blacklist is maintained by Grant Hutchinson on GitHub.
Yes, you can. Use the filter cblm_sources
to add different source URLs.
To replace the default source completely:
`
add_filter( 'cblm_sources', 'rkv_cblm_replace_blacklist_sources' );
function rkv_cblm_replace_blacklist_sources( $list ) {
return array(
'http://example.com/blacklist-1.txt'
'http://example.com/blacklist-2.txt'
);
}`
To add a new source to the existing sources:
`
add_filter( 'cblm_sources', 'rkv_cblm_add_blacklist_source' );
function rkv_cblm_add_blacklist_source( $list ) {
$list[] = 'http://example.com/blacklist-1.txt';
return $list;
}`
The plugin expects the list of terms to be in plain text format with each entry on its own line. If the source is provided in a different format (eg: a JSON feed or serialized array), then the result must be run through the cblm_parse_data_result
filter, which parses the source as a list of terms and the source URL.
The plugin will update the list of terms from the specified sources every 24 hours.
Yes, you can. Use the filter cblm_update_schedule
to modify the time between updates.
`add_filter( 'cblm_update_schedule', 'rkv_cblm_custom_schedule' );
function rkv_cblm_custom_schedule( $time ) {
return DAY_IN_SECONDS;
}`
The return
data should be specified using WordPress Transient Time Constants.
Yes. Individual terms can be added to the “Local Blacklist” field in the “Settings > Discussion” area of WordPress. Each term must be entered on its own line.
Yes. Individual terms can be excluded from the automatically fetched blacklist by adding them to the “Excluded Terms” field in the “Settings > Discussion” area of WordPress. Each term must be entered on its own line.