-
Notifications
You must be signed in to change notification settings - Fork 4
/
qa-seo-meta-tags-layer.php
95 lines (73 loc) · 2.48 KB
/
qa-seo-meta-tags-layer.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<?php
/*
Question2Answer (c) Gideon Greenspan
http://www.question2answer.org/
File: qa-plugin/meta-tags-seo/qa-seo-meta-tags-layer.php
Version: See define()s at top of qa-include/qa-base.php
Description: Theme layer class for SEO Meta Tags layer plugin
*/
class qa_html_theme_layer extends qa_html_theme_base {
function head_metas()
{
if (qa_opt('seomt_activity') && ($this->template=='activity'))
{
$this->output('<META NAME="robots" CONTENT="noindex, follow">');
}
if (qa_opt('seomt_questions') && ($this->template=='questions'))
{
$this->output('<META NAME="robots" CONTENT="noindex, follow">');
}
if (qa_opt('seomt_hot') && ($this->template=='hot'))
{
$this->output('<META NAME="robots" CONTENT="noindex, follow">');
}
if (qa_opt('seomt_ask') && ($this->template=='ask'))
{
$this->output('<META NAME="robots" CONTENT="noindex, follow">');
}
if (qa_opt('seomt_unanswered') && ($this->template=='unanswered'))
{
$this->output('<META NAME="robots" CONTENT="noindex, follow">');
}
if (qa_opt('seomt_categories') && ($this->template=='categories'))
{
$this->output('<META NAME="robots" CONTENT="noindex, follow">');
}
if (qa_opt('seomt_tag') && ($this->template=='tag'))
{
$this->output('<META NAME="robots" CONTENT="noindex, follow">');
}
if (qa_opt('seomt_tags') && ($this->template=='tags'))
{
$this->output('<META NAME="robots" CONTENT="noindex, follow">');
}
if (qa_opt('seomt_feedback') && ($this->template=='feedback'))
{
$this->output('<META NAME="robots" CONTENT="noindex, follow">');
}
if (qa_opt('seomt_login') && ($this->template=='login'))
{
$this->output('<META NAME="robots" CONTENT="noindex, follow">');
}
if (qa_opt('seomt_register') && ($this->template=='register'))
{
$this->output('<META NAME="robots" CONTENT="noindex, follow">');
}
if (qa_opt('seomt_search') && ($this->template=='search'))
{
$this->output('<META NAME="robots" CONTENT="noindex, follow">');
}
if (qa_opt('seomt_user') && ($this->template=='user'))
{
$this->output('<META NAME="robots" CONTENT="noindex, follow">');
}
if (qa_opt('seomt_users') && ($this->template=='users'))
{
$this->output('<META NAME="robots" CONTENT="noindex, follow">');
}
qa_html_theme_base::head_metas();
}
}
/*
Omit PHP closing tag to help avoid accidental output
*/