| 1 |
<?php |
| 2 |
/** |
| 3 |
* @package Freemius |
| 4 |
* @copyright Copyright (c) 2015, Freemius, Inc. |
| 5 |
* @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3 |
| 6 |
* @since 2.5.1 |
| 7 |
*/ |
| 8 |
|
| 9 |
if ( ! defined( 'ABSPATH' ) ) { |
| 10 |
exit; |
| 11 |
} |
| 12 |
|
| 13 |
if ( ! function_exists( 'fs_migrate_251' ) ) { |
| 14 |
function fs_migrate_251( Freemius $fs, $install_by_blog_id ) { |
| 15 |
$permission_manager = FS_Permission_Manager::instance( $fs ); |
| 16 |
|
| 17 |
/** |
| 18 |
* @var FS_Site $install |
| 19 |
*/ |
| 20 |
foreach ( $install_by_blog_id as $blog_id => $install ) { |
| 21 |
if ( true === $install->is_disconnected ) { |
| 22 |
$permission_manager->update_site_tracking( |
| 23 |
false, |
| 24 |
( 0 == $blog_id ) ? null : $blog_id, |
| 25 |
// Update only if permissions are not yet set. |
| 26 |
true |
| 27 |
); |
| 28 |
} |
| 29 |
} |
| 30 |
} |
| 31 |
} |