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 +6 -1 2.7.72.11.0 View file →
@@ -168,8 +168,13 @@
168 168 $baseUrl = 'https://community.buddyboss.com/wp-json/wp/v2/users/?per_page=50&page=';
169 169
170 170 $page = 590;
171 171
172 + $dumpDir = wp_upload_dir()['basedir'] . '/fcom-dump';
173 + if (!is_dir($dumpDir)) {
174 + wp_mkdir_p($dumpDir);
175 + }
176 +
172 177 while (true) {
173 178 $response = wp_remote_get($baseUrl . $page, [
174 179 'timeout' => 60,
175 180 ]);
@@ -186,9 +191,9 @@
186 191 break; // No more users to fetch, exit the loop
187 192 }
188 193
189 194 // save the json to a file
190 - file_put_contents(ABSPATH . '/dump/' . $page . '.json', $json);
195 + file_put_contents($dumpDir . '/' . $page . '.json', $json);
191 196
192 197 \WP_CLI::line('Downloaded page ' . $page);
193 198
194 199