400 Bad Request when sending XHR from React.js to admin-ajax.php
Solved by adding an action to handle unauthenticated users: add_action(‘wp_ajax_nopriv_xhrLink’, ‘handleXhrLink’);
Solved by adding an action to handle unauthenticated users: add_action(‘wp_ajax_nopriv_xhrLink’, ‘handleXhrLink’);
You’re using $user_id = get_option( ‘admin_email’ ); and then using that $user_id. However, get_option( ‘admin_email’ ); returns an email address, not the int that wpmu_create_blog() expects. So your sites are (presumably) being created with a user_id of 0. Here’s how I’d address this: $user_email = get_option(‘admin_email’); $user_object = get_user_by( ’email’, $user_email ); if ( false … Read more
There are two plugins that do exactly what you want, and I have used them both extensively. First, ThreeWP-Broadcast. This plugin lets you “broadcast” posts from your sub blogs to your main blog (or the other way around). It also allows you to link to broadcasted post to the original, as well as auto create … Read more
It depends on your user account structure. The superadmin of the MU can always edit anything and you cannot lock that one out for obvious reasons, but you can remove all other users from that 1 website you want to lock down. Go to Network Admin > Sites > Edit (link) and then in the … Read more
I have had similar issues with this in the past, WordPress really does need a is_user_admin() function. In the meantime I think the best way to do this is to test if the user has certain capabilities. function is_user_admin(){ if(!is_super_admin() && current_user_can(‘activate_plugins’){ // User is an admin } } Reference: Administrator roles current_user_can()
You can use Multisite Clone Duplicator plugin.
I think to explain it all here is a bit beyond the scope. Perhaps it is best to start here, and then you can ask detailed questions if you encounter problems:https://www.wpbeginner.com/wp-tutorials/how-to-install-and-setup-wordpress-multisite-network
I’d recommend using get_sites() instead of crafting $wpdb calls. Add this code to your theme’s functions.php file. function wpse365255_print_sites() { $args = array( ‘number’ => 10000, // if you’ve got more than 10,000 sites, //you can increase this ‘public’ => 1, ‘spam’ => 0, ‘deleted’ => 0, ‘archived’ => 0, ‘site__not_in’ => array( 1, 2 … Read more
Google search: http://hitchhackerguide.com/2011/02/24/is_network_admin/ is_network_admin(); 🙂
Basically they moved Super Admin menus and related pages out of the regular admin and into a new Network Admin screen. and the updates are: Add contextual help for Network screens Add delete support to network themes Add plugin update notifications, plugin install, plugin update to the network admin screen Admin Bar similar to that … Read more