How can I authenticate user credentials against a WordPress instance?

The JWT Authentication for WP REST API plugin offers a user authentication mechanism. You will need to: install and configure the plugin make user authentication requests against the new token endpoint optionally use the token to make further queries on behalf of users continue using OAuth 1.0 for WP/WC REST queries References: https://jwt.io/introduction/ Using JWT … Read more

How do I transfer user passwords from one WordPress site to another?

Yes and no wp_salt is the function you’re thinking of: https://core.trac.wordpress.org/browser/tags/4.8/src/wp-includes/pluggable.php#L1988 Your theory should be correct, copying the passwords over via SQL, and making sure all the salts are the same, then clearing cookies and trying to login, should do the trick. However, if we look at the code in the function, there are filters … Read more

Get users that likes the post

It appears that you are storing the data in the post’s meta, not user’s meta. Therefore, you need to retrieve it by directly getting the meta for that post, not by doing a user query. Let’s say your post’s ID is $post_id: First, retrieve the meta by get_post_meta(): $users = get_post_meta ( $post_id, ‘post_liked_users’, false … Read more

Allow Contributors to Upload Files

I used this code to make subscribers upload files and it works successfully.. I think you must add true in the last line. if ( current_user_can(‘subscriber’) && !current_user_can(‘upload_files’) ) { add_action(‘init’, ‘allow_subscriber_uploads’); function allow_subscriber_uploads() { $new_role = get_role(‘subscriber’); $new_role->add_cap(‘upload_files’, true); } }

Force to use STRONG users password and implement rule to prevent REUSE [closed]

You might want to start here https://codex.wordpress.org/Customizing_the_Login_Form which discusses customizing the login form, and has info on the code file used therein. You will need to ‘hook’ into the login form using available hooks (also detailed at the above link). Also, my comment above: “Password history rules imply that you will need to save previous … Read more