How to delete Password Protected posts cookies when a user logged out from the site

The post password cookie is set with: setcookie( ‘wp-postpass_’ . COOKIEHASH, $hasher->HashPassword( wp_unslash( $_POST[‘post_password’] ) ), $expire, COOKIEPATH, COOKIE_DOMAIN, $secure ); in the wp-login.php file. We can then use the clear_auth_cookie hook, in the wp_clear_auth_cookie() function, to clear it on logout: /** * Clear the Post Password Cookie on logout. * * @link http://wordpress.stackexchange.com/a/198890/26350 */ … Read more

WordPress reset password button not working

The markup of your button is <input disabled=”” class=”woocommerce-Button button” value=”Reset Password” type=”submit”> it shouldn’t be disabled, removing the disabled attr doesn’t seem to fix the problem, but I think that this button is “Decoration”, and it is not associated with any ajax request, the theme default functionality for reset password seems to open the … Read more

WordPress C# User Login

In short you want to mach your password with real hash code right. $user = get_user_by( ‘login’, $username ); if ( $user && wp_check_password( ‘123456’, $user->data->user_pass, $user->ID) ) echo “password Matched”; else echo “Not matched”;

Is my WP site being hacked?

My process for cleaning a hacked site includes changing all credentials (user/pass) on hosting, FTP, WP (don’t use an admin-level user called ‘admin’) updating everything- from the repository – WP, themes, plugins. Remove old/unused plugins and themes use FTP of file manager to check every folder for files that look out of place (look at … Read more