-
Notifications
You must be signed in to change notification settings - Fork 0
/
functions.php
50 lines (42 loc) · 1.27 KB
/
functions.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
function theme_enqueue_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
}
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
function favicon_link() {
echo '<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />' . "\n";
}
add_action( 'wp_head', 'favicon_link' );
/**
* Antispam Bee filter for custom RegExp patterns
*/
add_action(
'init',
'antispam_bee_patterns'
);
function antispam_bee_patterns() {
add_filter(
'antispam_bee_patterns',
'antispam_bee_add_custom_patterns'
);
}
function antispam_bee_add_custom_patterns($patterns) {
// Patterns for phony email addresses.
$patterns[] = array(
'email' => '@mail.ru$'
);
// Pattern for phony author names.
// Fun Fact: The last one is 'Prada' in Japanese.
$patterns[] = array(
'author' => 'moncler|north face|vuitton|handbag|burberry|outlet|dress|maillot|oakley|ralph lauren|ray ban|iphone|プラダ|file encryption'
);
// Pattern for phony web pages.
$patterns[] = array(
'host' => '^(www\.)?fkbook\.co\.uk$|^(www\.)?nsru\.net$|^(www\.)?goo\.gl$|^(www\.)?bit\.ly$'
);
// Pattern for text containing strings like 'targetted visitors'.
$patterns[] = array(
'body' => 'target[t]?ed (visitors|traffic)|viagra|cialis'
);
return $patterns;
}