PluginProbe
FluentBoards – Project Management, Task Management, Goal Tracking, Kanban Board, and, Team Collaboration / 2.1.0
FluentBoards – Project Management, Task Management, Goal Tracking, Kanban Board, and, Team Collaboration v2.1.0
2.1.0 2.0.15 2.0.12 2.0.10 2.0.4 2.0.1 2.0.0 1.95.3 1.95.2 1.95 1.91.6 trunk 1.11 1.12 1.13 1.20 1.21 1.22 1.23 1.30 1.31 1.32 1.35 1.40 1.41 All 42 releases
← All changes | database/DBMigrator.php +12 -0 1.352.1.0 View file →
@@ -25,8 +25,9 @@
25 25 // Retrieve all site IDs from this network (WordPress >= 4.6 provides easy to use functions for that).
26 26 if ( function_exists( 'get_sites' ) && function_exists( 'get_current_network_id' ) ) {
27 27 $site_ids = get_sites( array( 'fields' => 'ids', 'network_id' => get_current_network_id() ) );
28 28 } else {
29 + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- Retrieving site IDs for multisite migration
29 30 $site_ids = $wpdb->get_col( "SELECT blog_id FROM $wpdb->blogs WHERE site_id = $wpdb->siteid;" );
30 31 }
31 32 // Install the plugin for all these sites.
32 33 foreach ( $site_ids as $site_id ) {
@@ -52,6 +53,17 @@
52 53 RelationMigrator::migrate($isForced);
53 54 CommentsMigrator::migrate($isForced);
54 55 AttachmentMigrator::migrate($isForced);
55 56 TeamMigrator::migrate($isForced);
57 + }
58 +
59 + public static function handle_new_site($new_site)
60 + {
61 + if (!is_plugin_active_for_network('fluent-boards/fluent-boards.php')) {
62 + return;
63 + }
64 +
65 + switch_to_blog($new_site->blog_id);
66 + self::migrate(false);
67 + restore_current_blog();
56 68 }
57 69 }