340 reputation
1146
bio website
location
age
visits member for 3 years, 6 months
seen Oct 1 at 9:52

WordPress Consultant


Feb
4
comment Is this correct usage of filters in WordPress
Yes it works, my doubt is whether there is a more elegant way to do this, I am still not 100% sure on actions vs filters in such cases.
Feb
3
asked Is this correct usage of filters in WordPress
Jan
31
accepted Deleting sites and users automatically in multisite
Jan
31
accepted Ability to download only after email supplied
Jan
28
comment Deleting sites and users automatically in multisite
Indeed it's not. How can I modify it to delete all sites and users except the ones indicated in the arrays?
Jan
28
comment Deleting sites and users automatically in multisite
Oh ok, users still aren't being deleted though.
Jan
26
revised Deleting sites and users automatically in multisite
added 6 characters in body
Jan
26
comment Deleting sites and users automatically in multisite
@user42826 Indeed, fixed that however now I get all the non needed sites deleted but their users remain.
Jan
25
awarded  Popular Question
Jan
23
revised Deleting sites and users automatically in multisite
added 2 characters in body
Jan
23
comment Deleting sites and users automatically in multisite
I changed that, however for some reason the code is removing the posts and pages of the main site in the multisite (id 1) and also the superadmin user (id 1). Any idea why?
Jan
22
comment Deleting sites and users automatically in multisite
Basically I need to clear out all users apart from the 3 specified in the array.
Jan
22
comment Deleting sites and users automatically in multisite
@Rarst added more info.
Jan
22
revised Deleting sites and users automatically in multisite
added 135 characters in body
Jan
21
comment Getting this code to work in Multisite
wordpress.stackexchange.com/questions/130705/…
Jan
21
asked Deleting sites and users automatically in multisite
Jan
21
comment Getting this code to work in Multisite
Still not working, updated the new version of the code I'm using above, can you check?
Jan
21
revised Getting this code to work in Multisite
added 1691 characters in body
Jan
21
comment Getting this code to work in Multisite
I'd like to remove the users of these blogs too, trying this code but it's not working, can you help? $users_to_keep = array( '1','4','43' ); $users = get_users( array( 'blog_id' => $val['blog_id'] ) ); // Remove all users except for the test site admins foreach ( $users as $user ) { if ( ! in_array( $user['ID'], $users_to_keep ) ) { wp_delete_user( $user['ID'] ); } }
Jan
20
accepted Retrieve a specific number of words from post_Content