/** * ============================================================================ * FINAL VERSION (Table Name in Column Key) * ============================================================================ * This function returns a flattened list where both the table key and the * column keys include the cleaned table name for easy reference. * e.g.,…Continue reading
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
add_action( ‘admin_menu’, function () { // Parent menu slug is “wpcode”. remove_submenu_page( ‘wpcode’, ‘wpcode-duplicator’ ); remove_submenu_page( ‘wpcode’, ‘wpcode-search-replace’ ); }, 999 ); add_filter(‘pre_option_wpcode_admin_notices’, function ($value) { $notices = is_array($value) ? $value : array(); foreach (array(‘wpconsent_pixel’, ‘suggest_plugins’) as $slug) { if…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