How to add a placeholder to the protected post password input

This can be achieved via a hook, called the_password_form: function my_theme_password_placeholder($output) { $placeholder=”Hello!”; $search=”type=”password””; return str_replace($search, $search . ” placeholder=\”$placeholder\””, $output); } add_filter(‘the_password_form’, ‘my_theme_password_placeholder’); A str_replace searches for the string type=”password” inside the output. This gives an attribute to the <input> indicating it’s of type password. The replacement string contains the searched one plus the … Read more

current user’s password check

You can use current_user_can() to check if the user has permission to edit a specific user. If that’s what you’re trying to do. You will need to get the relevant user ID though as the 2nd argument: if ( current_user_can( ‘edit_user’, $user_id ) ) { // Do stuff. } So you can send the relevant … Read more

Can’t alter $lostpassword_url

You want to change the url of the “Lost your password?”-link on the logging screen, right? So to change the url you can use the “lostpassword_url” filter. function change_url ( $url ) { $url=”www.google.de”; return $url; } function change_something() { add_filter( ‘lostpassword_url’, ‘change_url’ ); } add_action ( ‘login_head’, ‘change_something’ );

Change page password every day (predictable password ;) )

It need not be very complicated. You can simply create a pattern like 2018-09-07-ABC (suffix of ABC) for the date 2018-09-07. Set up the password creation/validation logic like password = md5(‘2018-09-07-ABC’). An administrator if they know the pattern, they can anytime goto any online md5 utility such as http://www.md5.cz and enter the pattern for current … Read more

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