Possible to make custom role in multisite that can add sites?
From a quick glans at 3.7 code it seems that the “Add Site” menu is accessible only to users with “create_sites” capability
From a quick glans at 3.7 code it seems that the “Add Site” menu is accessible only to users with “create_sites” capability
Try this – rather than redo all the hard work that WordPress does for the view links, just calculate all the posts for the admin you want to “hide” and subtract from the existing post counts: function wpse_229427_get_hidden_admin_id() { return 3; // You could make this a setting or return a value conditionally } function … Read more
There’s not a good way to do this as the code for this section is pretty rigid. You can simply remove the elements via JavaScript. By removing (and not just hiding) the elements, you disable the functionality. You can customize the following to your needs I’m sure. Use CSS to hide the post actions inner … Read more
Looks like I found a snippet that do exactly that. It’s from Daniel Bachhuber, the API developer. add_filter( ‘rest_authentication_errors’, function( $result ) { if ( ! empty( $result ) ) { return $result; } if ( ! is_user_logged_in() ) { return new WP_Error( ‘restx_logged_out’, ‘Sorry, you must be logged in to make a request.’, array( … Read more
First off, @Wyck is right, it would be helpful to see your register_post_type code. If it were me, I’d make sure I had something like this in the $args array: register_post_type( … array( ‘capability_type’ => ‘artists’, ‘map_meta_cap’ => true ) ); Next, you don’t want to reset capabilities on every admin page load, that’s unnecessary … Read more
Yes, you can run WordPress with your own domain if you purchase hosting for it. WordPress has system of Roles (which can be further enhanced via plugins), you can let users register and allow to perform actions accordign to their role. Essentially yes. You copy WordPress files to server and initiate brief installation procedure. First … Read more
You could check the $current_user variable to determine the role. I believe it should be realiable after init(maybe even on init) for a logged in user, a guest visitor obviously won’t have any data associated with him or her yet(so it’ll be empty/unset). You can also call up get_currentuserinfo() to populate the $current_user var, but … Read more
I think you are on the right track, wp_cache_delete was what finally helped me get an auto-signup with auto-login plugin working… I have this from there: wp_cache_delete($current_user->ID, ‘users’); wp_cache_delete($current_user->user_login, ‘userlogins’); Then see what roles you get after that with: $current_user = wp_get_current_user();
The register_post_type has a capabilities (or simple version: capability_type) that you can use to specify a separate capability to create and edit posts of this type. If you set this, you can create a new role that has the capability to edit these custom posts, but not regular posts.
brasolfilo’s suggestion that you remove the submit meta box is only part of what I’d consider a complete solution. I can hack a “submit” button into that page using FireBug or any of a few other tools, in a matter of minutes. I would… Remove the meta box. This is brasofilo’s solution, and I won’t … Read more