You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apip.php
+2-32Lines changed: 2 additions & 32 deletions
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@
7
7
* Description: Plugins used by pewae
8
8
* Author: lifishake
9
9
* Author URI: http://pewae.com
10
-
* Version: 1.30.1
10
+
* Version: 1.30.2
11
11
* License: GNU General Public License 3.0+ http://www.gnu.org/licenses/gpl.html
12
12
*/
13
13
@@ -44,23 +44,6 @@ function apip_plugin_activation()
44
44
GROUP BY year, month ORDER BY year, month DESC ; ";
45
45
$wpdb->query($sql);
46
46
47
-
$sql = "CREATE OR REPLACE VIEW `{$wpdb->prefix}v_taxonomy_summary`
48
-
AS SELECT rel.`term_taxonomy_id`, COUNT(rel.`term_taxonomy_id`) AS `term_count`, tax.`taxonomy`, {$wpdb->prefix}terms.`name` AS `term_name`,
49
-
CASE WHEN tax.`taxonomy` = 'post_tag' THEN 10
50
-
WHEN tax.`parent` = 0 THEN 0
51
-
WHEN tax.`parent` IN (SELECT `term_taxonomy_id` FROM `{$wpdb->prefix}term_taxonomy` WHERE `parent` = 0 ) THEN 1
52
-
WHEN tax.`parent` IN (SELECT `term_taxonomy_id` FROM `{$wpdb->prefix}term_taxonomy` WHERE `parent` IN (SELECT `term_taxonomy_id` FROM `{$wpdb->prefix}term_taxonomy` WHERE `parent` = 0 )) THEN 2
53
-
ELSE 3 END AS `term_level`,
54
-
CASE WHEN COUNT(rel.`term_taxonomy_id`) = 1 THEN 1024
55
-
WHEN tax.`taxonomy` = 'post_tag' THEN FLOOR(4096/COUNT(rel.`term_taxonomy_id`))
56
-
WHEN tax.`parent` = 0 THEN 10
57
-
WHEN tax.`parent` = 2599 THEN 1024
58
-
WHEN tax.`parent` IN (SELECT `term_taxonomy_id` FROM `{$wpdb->prefix}term_taxonomy` WHERE `parent` = 0 ) THEN CEIL(1024/COUNT(rel.`term_taxonomy_id`))
59
-
WHEN tax.`parent` IN (SELECT `term_taxonomy_id` FROM `{$wpdb->prefix}term_taxonomy` WHERE `parent` IN (SELECT `term_taxonomy_id` FROM `{$wpdb->prefix}term_taxonomy` WHERE `parent` = 0 )) THEN 1000
60
-
ELSE 1580 END AS `term_weight`
61
-
FROM `{$wpdb->prefix}term_relationships` rel, `{$wpdb->prefix}term_taxonomy` tax, `{$wpdb->prefix}terms` WHERE rel.term_taxonomy_id = tax.term_taxonomy_id AND tax.taxonomy in ('category','post_tag') AND `{$wpdb->prefix}terms`.`term_id` = rel.term_taxonomy_id GROUP BY rel.term_taxonomy_id ORDER BY term_count DESC";
62
-
$wpdb->query($sql);
63
-
64
47
$sql = "CREATE OR REPLACE VIEW `{$wpdb->prefix}v_boring_summary`
65
48
AS SELECT `comment_author_email`, SUM(`meta_value`) AS `boring_value`
66
49
FROM `{$wpdb->prefix}comments`
@@ -117,8 +100,6 @@ function apip_plugin_deactivation()
117
100
$wpdb->query($sql);
118
101
$sql = "DROP VIEW IF EXISTS `{$wpdb->prefix}v_posts_count_monthly` ; ";
119
102
$wpdb->query($sql);
120
-
$sql = "DROP VIEW IF EXISTS `{$wpdb->prefix}v_taxonomy_summary` ; ";
121
-
$wpdb->query($sql);
122
103
$sql = "DROP VIEW IF EXISTS `{$wpdb->prefix}v_boring_summary` ; ";
0 commit comments