Created
September 26, 2023 12:25
-
-
Save everaldomatias/003a4995ba0a1de8168f41609dfe5b13 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function migrate_user_role_custom_network() { | |
$users = get_users( ['role' => 'custom_network'] ); | |
foreach ( $users as $user ) { | |
$user->set_role( 'editor' ); | |
$user->set_role( 'custom_network' ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment