Use the following code to limit 10 upload for specific role [php] add_filter( ‘wp_handle_upload_prefilter’, ‘limit_uploads_for_user_roles’ ); function limit_uploads_for_user_roles( $file ) { $user = wp_get_current_user(); // add the role you want to limit in the array $limit_roles = array(‘contributor’); $filtered = apply_filters( ‘limit_uploads_for_roles’, $limit_roles, $user ); if ( array_intersect( $limit_roles, $user->roles ) ) { $upload_count = […]
How to change “Registration complete. Please check your e-mail.” message in wp-login.php
You can use this filter to change the default “Registration complete. Please check your e-mail.” message on wordpress. [php] add_filter( ‘wp_login_errors’, ‘override_reg_complete_msg’, 10, 2 ); function override_reg_complete_msg( $errors, $redirect_to ) { if( isset( $errors->errors[‘registered’] ) ) { $needle = __(‘Registration complete. Please check your e-mail.’); foreach( $errors->errors[‘registered’] as $index => $msg ) { if( $msg […]