-
Notifications
You must be signed in to change notification settings - Fork 0
/
gv-advox-stats-reports.php
130 lines (115 loc) · 4.49 KB
/
gv-advox-stats-reports.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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<?php
/**
* country categories variant of gv_stats_report_category_children
*/
class gv_stats_report_country_category_post_counts extends gv_stats_report_category_children {
public $slug = 'gv_stats_report_country_category_post_counts';
public $menu_title = 'Country Category Posts';
public $page_title = 'Country Category Post Counts';
public $page_slug = 'gv_stats_report_country_category_post_counts';
/**
* Customized ->query to set the desired term as an argument while requesting parent::query($args)
*
* @param array $args
*
* @return array
*/
public function query(array $args = array()) {
$args = array_merge($args, array(
'parent' => gv_slug2cat('world'),
'grandchildren_only' => true,
));
return parent::query($args);
}
}
/**
* language categories variant of gv_stats_report_category_children
*/
class gv_stats_report_language_category_post_counts extends gv_stats_report_category_children {
public $slug = 'gv_stats_report_language_category_post_counts';
public $menu_title = 'Language Category Posts';
public $page_title = 'Language Category Post Counts';
public $page_slug = 'gv_stats_report_language_category_post_counts';
/**
* Customized ->query to set the desired term as an argument while requesting parent::query($args)
*
* @param array $args
*
* @return array
*/
public function query(array $args = array()) {
$args = array_merge($args, array(
'parent' => gv_slug2cat('languages')
));
return parent::query($args);
}
}
/**
* region categories variant of gv_stats_report_category_children
*/
class gv_stats_report_region_category_post_counts extends gv_stats_report_category_children {
public $slug = 'gv_stats_report_region_category_post_counts';
public $notes = "Note: These numbers reflect all posts in the region category or any of it's child countries, rather than just posts with the indicated category. This matches the theme behavior, where region archives show posts in child categories even if the region category isn't attached to the post. <br /> Note: Any given post might be in several of these categories, so adding up the various sections will likely give you a higher number than the actual posts for the period.<br> Note: The chosen intersector will organize posts into those that are also in the category (or it's children) and those that aren't.";
public $menu_title = 'Region Category Posts';
public $page_title = 'Region Category Post Counts';
public $page_slug = 'gv_stats_report_region_category_post_counts';
/**
* Customized ->query to set the desired term as an argument while requesting parent::query($args)
*
* @param array $args
*
* @return array
*/
public function query(array $args = array()) {
$args = array_merge($args, array(
'parent' => gv_slug2cat('world'),
'include_grandchildren' => true,
));
return parent::query($args);
}
}
/**
* special categories variant of gv_stats_report_category_children
*/
class gv_stats_report_special extends gv_stats_report_category_children {
public $slug = 'gv_stats_report_special';
public $description = "Note: Any given post might be in several of these categories, so adding up the various sections will likely give you a higher number than the actual posts for the period.<br> Note: The chosen intersector will organize posts into those that are also in the category (or it's children) and those that aren't.";
public $menu_title = 'Special Topic Stats';
public $page_title = 'Special Topic Category Stats';
public $page_slug = 'gv_stats_special';
/**
* Customized ->query to set the desired term as an argument while requesting parent::query($args)
*
* @param array $args
*
* @return array
*/
public function query(array $args = array()) {
$args = array_merge($args, array(
'parent' => gv_slug2cat('special')
));
return parent::query($args);
}
}
/**
* topic categories variant of gv_stats_report_category_children
*/
class gv_stats_report_topic_category_post_counts extends gv_stats_report_category_children {
public $slug = 'gv_stats_report_topic_category_post_counts';
public $menu_title = 'Topic Category Posts';
public $page_title = 'Topic Category Post Counts';
public $page_slug = 'gv_stats_report_topic_category_post_counts';
/**
* Customized ->query to set the desired term as an argument while requesting parent::query($args)
*
* @param array $args
*
* @return array
*/
public function query(array $args = array()) {
$args = array_merge($args, array(
'parent' => gv_slug2cat('topics')
));
return parent::query($args);
}
}