Wanderson Silva
Forum Replies Created
-
Forum: Plugins
In reply to: [Members - Membership & User Role Editor Plugin] Restrict contentThanks for the reply!
Forum: Plugins
In reply to: [AMP for WP - Accelerated Mobile Pages] Upgrade messed up stylesHello! In fact, the right version of PHP running in my site is 8.2.6
Is it compatible with the last version of the AMP for WP – Accelerated Mobile Pages plugin?
Forum: Plugins
In reply to: [AMP for WP - Accelerated Mobile Pages] Upgrade messed up stylesWe are using PHP version 8.1.17
I will provide two images so you can see what i need to achieve:
https://imgur.com/a/Medg4Bz- This reply was modified 1 year, 8 months ago by Wanderson Silva.
Forum: Plugins
In reply to: [AMP for WP - Accelerated Mobile Pages] Upgrade messed up stylesHello! I did that already and disable all the other plugins. Where is the file to change styles globally?
Oh! Right! The shortcode. Forgot about it. Thanks a lot!
I need to insert right above the first six banners ads. I will provide a screenshot.
@pt-guy did you have the chance to have a look?
Hello! Sorry about that. Here it is:
https://canalsolar.com.br/Forum: Developing with WordPress
In reply to: Force users to change password after some timeHere is an english version of the code:
/** * Disconnect the user and force password change every 5 minutes (for testing purposes only). */ // Define the number of seconds for password expiration (5 minutes = 5 * 60) define('PASSWORD_EXPIRY_SECONDS', 5 * 60); // Check if password has expired before allowing login function password_expiry_check_password($user, $password) { if (empty($user)) { return $user; } $user_id = $user->ID; $last_password_update = get_user_meta($user_id, 'password_last_updated', true); if ($last_password_update) { $expiry_time = strtotime('+' . PASSWORD_EXPIRY_SECONDS . ' seconds', strtotime($last_password_update)); if (time() > $expiry_time && $password !== '') { $user->set_role('expired_password'); wp_logout(); $login_url = wp_login_url(); $change_password_url = home_url('/change-password'); wp_safe_redirect($change_password_url); exit; } } return $user; } add_filter('authenticate', 'password_expiry_check_password', 30, 2); // Display a warning on the login page for users with expired passwords function password_expiry_login_message() { if (isset($_GET['password-expired']) && $_GET['password-expired'] === 'true') { echo '<div class="notice notice-warning"><p>Your password has expired. Please change your password.</p></div>'; } } add_action('login_message', 'password_expiry_login_message'); // Update the last password change date whenever the user changes their password function password_expiry_update_last_updated($user_id, $new_pass) { update_user_meta($user_id, 'password_last_updated', date('Y-m-d H:i:s')); } add_action('password_reset', 'password_expiry_update_last_updated', 10, 2); add_action('user_profile_update_errors', 'password_expiry_update_last_updated', 10, 3); // Check if the new password is different from the previous one function password_expiry_check_password_change($errors, $user, $new_pass) { if (!empty($user) && $new_pass !== '') { $user_id = $user->ID; $last_password = get_user_meta($user_id, 'password_last', true); if (!empty($last_password) && $new_pass === $last_password) { $errors->add('password_change_error', 'The new password must be different from the previous one.'); } } return $errors; } add_filter('user_profile_update_errors', 'password_expiry_check_password_change', 10, 3); add_filter('validate_password_reset', 'password_expiry_check_password_change', 10, 3);
Forum: Developing with WordPress
In reply to: Force users to change password after some timeHello @sterndata thanks for the hint, but i dont want to use third party plugins.
Forum: Plugins
In reply to: [Super Progressive Web Apps] Add to Home not showing in IOSHi, i will update the plugin to version 2.2.17 and get back to you
Forum: Plugins
In reply to: [Brazilian Market on WooCommerce] Campo select bugado no checkoutvou fazer o teste e te retorno, obrigado
Forum: Plugins
In reply to: [AMP for WP - Accelerated Mobile Pages] Thumbnails not showing in whatsapphello, i will do that and get back to you.
Forum: Plugins
In reply to: [AMP for WP - Accelerated Mobile Pages] Thumbnails not showing in whatsappSure! Here is the shared file:
JsonHi, just have updated the plugin to the new version, but still facing the issue of this thread:
https://www.ads-software.com/support/topic/how-to-bypass-cloudflare-issue/When you click to edit the fields, nothings happens in the newer versions of the plugin. You can have a look at the url provided in The page i need help to see for yourlself.