How to use tinyMCE for user “biographical info” without messing with any core file?

Not sure if this is the perfect way to do it, but it worked for me by removing the description element using jQuery and then adding editor for the description element. /******************************************* * TinyMCE EDITOR “Biographical Info” USER PROFILE *******************************************/ function biographical_info_tinymce() { if ( basename($_SERVER[‘PHP_SELF’]) == ‘profile.php’ || basename($_SERVER[‘PHP_SELF’]) == ‘user-edit.php’ && function_exists(‘wp_tiny_mce’) ) … Read more

How to get profile user id when uploading image via media uploader on profile page

You need to pass the $profileuser->ID as the second argument when you call your function and define it accordingly: add_filter(‘wp_handle_upload_prefilter’, ‘my_pre_upload’, 2, 2); // (3rd param is priority, 4th is number of args) // and pass the $userid as argument to your function function my_pre_upload($file, $userid = false){ // if no user specified, get $current_user … Read more

Getting users who registered 360 days from current date

I peeked into the WP_User_Query class and it supports a WP_Date_Query query on the user registration date. So we could use: $query = new WP_User_Query( $args ); or simply: $users = get_users( $args ); where: $args = [ ‘fields’ => ‘ID’, ‘number’ => 8, ‘date_query’ => [ [ ‘before’ => ‘359 days ago midnight’ ], … Read more

Change labels on ‘Nickname’ and ‘Biographical Info’ in user-edit.php

Every string goes through translate(), which uses the gettext filter. This mean you can try something like this: add_filter( ‘gettext’, ‘wpse6096_gettext’, 10, 2 ); function wpse6096_gettext( $translation, $original ) { if ( ‘Nickname’ == $original ) { return ‘Funny name’; } if ( ‘Biographical Info’ == $original ) { return ‘Resume’; } return $translation; } … Read more

Get user input from a form

Use wp-admin/admin-post.php as form action handler, and bind your custom function as callback to that. A simple example for email updates. We will use a shortcode named [userform] here, but you can use a template too. add_shortcode( ‘userform’, ‘wpse_75723_userform’ ); add_action( ‘admin_post_update_user_email’, ‘wpse_75723_update’ ); /** * Create the form. */ function wpse_75723_userform() { $here = … Read more

Migrating users from .com to .org?

I don’t know if you can see the email addresss of your users in wordpress.com blog as i never used it. If you can, as you have not too many users you may try to add them manually from wordpress dashboard and send them an email with the password if you have access to the … Read more

Recover the user that have been deleted

Go into the Users section in the WP back end and type in the username that exists. You should find a record if it is still there. Deleting users completely deletes them – there is no “trash” normally, so the user should no longer exist in the database unless you have a plugin which keeps … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)