add_filter( ‘auth_cookie_expiration’, function () { return 30 * DAY_IN_SECONDS; // 30 days in seconds. } );Continue reading
add_filter( ‘auth_cookie_expiration’, function () { return 30 * DAY_IN_SECONDS; // 30 days in seconds. } );Continue reading
/** * ============================================================================ * SECURE & UNIQUE SCRIPT FOR FLUENT FORM COMPANY & EMPLOYEE AUTOFILL * ============================================================================ * Author: Sumaiya, Anytype Doc: anytype://object?objectId=bafyreicy3gry4icfd5icgzp5a2ezqg7u2ct2p3syxfimd5hj2qnlotfbdu&spaceId=bafyreih4bocrmskuomcrks3sjwpnzxpbxvxwgto23vof3umg2fywdqzjmy.31bq39w6q8ru7&cid=bafybeifc55atash7zlqcjd3fv425bkwl7z5zstcxdilct5hstlng73xwci&key=6kKA3QiwnksqLbpcJ4T6UhmQ5BHzgJUfbpn1QLnkv5Lv * * This version is designed to work with a separate JavaScript snippet and is * secure…Continue reading
/** * =================================================================== * Hide WordPress Admin Bar for Non-Admins * =================================================================== */ add_filter( ‘show_admin_bar’, function( $show ) { if ( ! current_user_can( ‘manage_options’ ) ) { // For any user who is NOT an Admin, hide the bar. return…Continue reading
/** * Redirect non-logged-in users away from account pages. */ add_action( ‘template_redirect’, function() { // Add the slugs of all pages you want to protect in this array. $protected_pages = array( ‘my-account’, ‘community-noticeboard’, ‘breakdown-and-documents’, ‘development-visits’, ‘make-an-enquiry’, ‘account-settings’, // Add other…Continue reading
/** ==================================================================== * Snippet 2: Session and Script Management (UPDATED & SECURE) * * This version removes the insecure credential passing and adds a * secure nonce for logged-in user actions. * ==================================================================== */ if ( ! function_exists( ‘gb_start_session_if_needed’ )…Continue reading
/** ==================================================================== * Snippet 1: SOAP Logic and Data Handling (WITH CACHING) * ==================================================================== */ require_once( ABSPATH . ‘youraccount/OnlineSoapClient.php’ ); // — Constants for Rate Limiting — define(‘GB_LOGIN_ATTEMPTS_LIMIT’, 5); define(‘GB_LOGIN_LOCKOUT_PERIOD’, 5 * MINUTE_IN_SECONDS); // — Helper function to get the…Continue reading
/** * ==================================================================== * Snippet: Handle Email Verification Endpoint * ==================================================================== * This snippet creates a virtual page at /verify-email/ to handle * email verification without needing to create a page in the WP admin. */ // 1. Register a…Continue reading
/** * ==================================================================== * Snippet: Secure Bill Breakdown Page Access (with Encryption & Editor Bypass) * ==================================================================== * This runs before the /bill-breakdown page loads to decrypt and * verify the user has permission. It now includes a bypass for…Continue reading