New answers tagged

0

You can add a condition on capabilities in order to exclude the admin from the unset action for example add_filter( 'post_row_actions', 'remove_row_actions', 10, 2 ); function remove_row_actions_staff( $actions, $post ){ //This line stops function execution if user has some admin capabilities if( current_user_can( 'administrator' ) ): return $...


0

FWIW, if anyone else is having this problem, like room34 said this is a browser issue. It also happens in Firefox. If you open up Chrome, you can login and add a new user just fine.


1

Looking at your if-else block, I see there's a $post_id variable, so if it's the ID of the post that you want to assign to the user you're creating, then you could just call wp_update_post() in your else block, i.e. right after you create the user. So just replace the wp_insert_user($userdata); in your code with this: $user_id = wp_insert_user($userdata); ...


0

OK - 11 years later, but I feel I need to add something here after stumbling across this. Unlike the 2 above, I'd like to add an air of caution. A whole host of zombie registrations could be something to worry about. A lot of plugins mess with the user registration process for their own ends - often I find unnecessarily. One key part of user registration / ...


0

I haven't tested this, but you could try this: Put this php in your functions.php. function rt_connections_id () { if ( is_user_logged_in() ) { $usersid = get_current_user_id(); $newout = do_shortcode(' [connections id='.$usersid.'] '); } else { $newout = ''; } return $newout; } add_shortcode('current-user-connections'...


Top 50 recent answers are included