PluginProbe
FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS & Online Courses / 2.11.0
FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS & Online Courses v2.11.0
2.11.0 2.10.0 2.10.01 2.9.1 2.9.0 2.8.1 2.8.0 2.7.7 2.7.5 2.7.0 2.6.01 2.6.0 2.5.0 2.4.01 trunk 1.0.90 1.0.91 1.0.92 1.0.93 1.0.94 1.0.95 1.0.96 1.0.97 1.0.98 1.0.99 All 78 releases
← All changes | app/Hooks/CLI/Commands.php +9 -2 2.4.012.11.0 View file →
@@ -104,9 +104,11 @@
104 104 'count' => \FluentCommunity\App\Models\Comment::count()
105 105 ],
106 106 [
107 107 'key' => 'Total Reactions',
108 - 'count' => \FluentCommunity\App\Models\Reaction::count()
108 + 'count' => \FluentCommunity\App\Models\Reaction::whereIn('object_type', ['feed', 'comment'])
109 + ->where('type', 'like')
110 + ->count()
109 111 ]
110 112 ];
111 113
112 114 \WP_CLI\Utils\format_items('table', $fluentStats, ['key', 'count']);
@@ -166,8 +168,13 @@
166 168 $baseUrl = 'https://community.buddyboss.com/wp-json/wp/v2/users/?per_page=50&page=';
167 169
168 170 $page = 590;
169 171
172 + $dumpDir = wp_upload_dir()['basedir'] . '/fcom-dump';
173 + if (!is_dir($dumpDir)) {
174 + wp_mkdir_p($dumpDir);
175 + }
176 +
170 177 while (true) {
171 178 $response = wp_remote_get($baseUrl . $page, [
172 179 'timeout' => 60,
173 180 ]);
@@ -184,9 +191,9 @@
184 191 break; // No more users to fetch, exit the loop
185 192 }
186 193
187 194 // save the json to a file
188 - file_put_contents(ABSPATH . '/dump/' . $page . '.json', $json);
195 + file_put_contents($dumpDir . '/' . $page . '.json', $json);
189 196
190 197 \WP_CLI::line('Downloaded page ' . $page);
191 198
192 199