Tag Info

New answers tagged

0

I solved issue with suggestion of @TheDeadMedic. Below is the code. As he told added while have post. I added it after header. <?php /** * Template Name: Page * */ global $post; if ( ! post_password_required( $post ) ) { get_header(); while ( have_posts() ) { the_post(); } ?> <div id="Content"> <div class="content_wrapper ...


3

You can use the has_password parameter of WP_Query. Here's an example how you can hide it, for non administrators, on the edit.php screen for the post post type: /** * Hide password protected posts, for non-admins, in the case of 'edit-post' screen id * * @link http://wordpress.stackexchange.com/a/200426/26350 */ add_action( 'pre_get_posts', function( ...


0

I noticed that after upgrading WordPress to Version 4.3 that the above no longer worked for my custom plugin. It would always report that the key was invalid. Change: $hashed = $wp_hasher->HashPassword( $key ); to $hashed = time() . ':' . $wp_hasher->HashPassword( $key ); This fixed the issue for me, hope it helps someone else


0

I was able to fix it with this method. Is this good/bad? It's working, but I'd be interested in feedback in case this could have unexpected consequences. add_filter('gettext', 'translate_text'); add_filter('ngettext', 'translate_text'); function translate_text($translated) { $translated = str_ireplace('Very Weak', 'Bad', $translated); $translated = ...


1

The "Weak" text is passed through _x function, which calls translate_with_gettext_context, so I would try the following: add_filter( 'gettext_with_context', 'wpse199813_change_password_indicatior', 10, 4 ); function wpse199813_change_password_indicatior($translations, $text, $context, $domain){ if( $text == "Weak" && $context == "password ...


0

This post on Web Tips hooks into a few choice actions and filters to modify password strength allowances, but commenters seemed to have some trouble with it, so take this bit with a grain of salt. // functions.php add_action( 'user_profile_update_errors', 'validateProfileUpdate', 10, 3 ); add_filter( 'registration_errors', 'validateRegistration', 10, 3 ); ...


0

You can do it right in your theme localization file. Open *.pot file and create the translations for labels you need, e. g. OK for Weak. See password-strength-meter around line #366 in /wp-includes/script-loader.php for the reference (but don't change there anything). Update: I've found the solution using jQuery for the similar problem, but you have to ...


0

The wp_new_user_notification function is pluggable, so you can override it by defining your own. You should be able to copy the entire function from wp-includes/pluggable.php into your plugin (or functions.php) and remove the line that sends out the email.


0

Actually it depends how you create the new user. If you do it from administration - Users - Add New you are right. In 4.3 unfortunatelly you cannot disable sending the notification email. But if you really want to create a new user without the email, there is a way. You can create a small plugin where you'd create a new account by yourself via ...


0

For others who, like me, found this answer. It's possible to store the login information for the second DB as plugin options via WP settings API. sot the actual login information is not in the plugin but in the WP database.


1

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 ...


-1

Rediret to is a wordpress feature you don't need to create a plugin for it, just add &redirect_to= the url and it will work. Example: echo '<a href="'home_url().'/wp-login.php?action=lostpassword&amp;redirect_to='.get_bloginfo('url').'?sli=lost" rel="nofollow" title="Forgot Password">'Forgot Password'</a>';


1

If you have access to the PHPMyAdmin login and access: The wp_users table from the list of tables. Then locate your username under the user_login column and click edit. The user_pass is a long list of numbers and letters which is the MD5 hash encrypted version of your password. Select and delete the hash and type in your new password (it is case ...


0

Try using standar usr interface from BuddyPress. For instance: http://yourdomain/members/youruser/settings/



Top 50 recent answers are included