Why are user address fields required [closed]
Thank you for this post. I had same issue caused by Event Manager Pro. The resolution for me was to go to the Forms Editor in Event Manager Pro and change a few “common” fields to not required.
Thank you for this post. I had same issue caused by Event Manager Pro. The resolution for me was to go to the Forms Editor in Event Manager Pro and change a few “common” fields to not required.
Disable the post password protection for (some) users You can try the post_password_required filter (4.7+) to override it for logged in users: add_filter( ‘post_password_required’, function( $returned, $post ) { // Override it for logged in users: if( $returned && is_user_logged_in() ) $returned = false; return $returned; }, 10, 2 ); or disable it for users … Read more
There’s no way in WordPress to assign the capability for editing (or any action) a specific post to a role. However, you can filter capabilities checks and change them on the fly using the map_meta_cap. When handling post permissions, WordPress ultimately deals in just 4 capabilties: edit_post read_post delete_post publish_post Then whenever an action is … Read more
You can use the wp_pre_insert_user_data filter. function wpse_filter_user_data( $data, $update, $id) { if( isset( $data[ ‘user_login’ ] ) ) { $data[ ‘display_name’ ] = $data[ ‘user_login’ ]; return $data; } $user = get_user_by( ’email’, $data[ ‘user_email’ ] ); $data[ ‘display_name’ ] = $user->user_login; return $data; } add_filter( ‘wp_pre_insert_user_data’, ‘wpse_filter_user_data’, 10, 3 ); You’ll probably want … Read more
By default WP-CLI executes every command as unauthenticated (logged-out) user. To execute a command as any existing WordPress user you can use the global –user parameter, which accepts an user ID, login, or email address. $ wp nurse check –all –user=1 You’ll get all other global parameters listed when running $ wp –help or $ … Read more
You can use “W3 Total Cache” which isn’t a static file cache system. It however uses stuff such as opcode caching, memcached, and object caching to decrease page load time. APC, or another opcache, would be a good addition to your server, as well as using a lightweight httpd instead of bloated Apache. Forcing GZIP … 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
WP_User objects have some magic methods which do allow you to access any custom field: foreach ( $agents as $agent ) { var_dump( $agent->bio ); var_dump( $agent->get( ‘bio’ ) ); } The two are equivalent. More info: http://scribu.net/wordpress/the-magic-of-wp_user.html
We are using this wordpress plug in – New User Approve Provides functionality to approve/deny new user registrations.
Why don’t use built-in functionality of PHP? Put the following line right before the foreach: usort($members, create_function(‘$a, $b’, ‘return strnatcasecmp($a->last_name, $b->last_name);’)); References: usort create_function strnatcasecmp