You can use auth_cookie
filter to set an expiration time of 0. This will make sure that the cookie is only valid for the current browser session.
For password expiration you can use a plugin like: https://wordpress.org/plugins/expire-passwords/
Pls also see: Destroy user sessions based on user ID
Related Posts:
- Fatal error: Call to undefined function plugin_dir_path()
- Dynamic URL to reference custom PHP files
- Why is PHP Cookie via plugin only set when logged in as Admin and not regular users? and other questions
- Disable External Pingacks on WordPress Posts and Only Allow ‘Self Pings’
- Custom plugin issue when trying to use the shortcode twice on a page [closed]
- Using wp_get_image_editor in a standalone script
- New Plugin Review
- Making Quote Plugin more efficient
- How to access function from outside of a class within this class in WP plugin?
- PHP can I add line numbers to file_get_contents()
- Adding Default Settings to Theme My Login plugin
- Swapping wp_dropdown_categories function with wp_category_checklist
- How to access global variable $menu inside a class function
- How can I remove a function that has been added to wordpress with add_filter?
- what is the best practice to add new field to an api route
- Retrieve $_POST data submitted from external URL in WordPress(NOT API)
- How to call plugin function per site in a multisite?
- WordPress Custom field Colors
- How to obtain the current website URL in my theme?
- What exactly do this function declared into functions.php file of a WP theme?
- How to use html inside a functions.php code?
- Plugin Generate Unexpected output during activation
- Using data sent via AJAX in multiple functions on a WP plugin
- Is it possible to define variables in a wordpress shortcode, and then call the shortcode using a specific variable?
- Custom meta box values are not getting saved for my custom post type
- how to save checkbox data for custom setting?
- Call to undefined function error in plugin
- Execute Jquery when a specific page in my plugin is loading
- send popup after wp_redirect()
- Using ACF Relationship field to set post type to draft or published status
- How to change basename url for wp-admin?
- How to Send Pingbacks for all Posts in WordPress?
- Reliable way to add nonce to HTTP Header in WordPress?
- Only the first image uploads
- Add Pre-Defined Value to Click Counter in WordPress
- Illegal string offset checkbox
- ssl redirect function is not working
- Custom plugin: how do I call a PHP file if settings option is set to true?
- How can i avoid duplicate same post in wp?
- Display a custom name when the user has no name settle in his account
- In a foreach loop, how can I add a meta value if it doesn’t exist?
- How to override theme’s public static function inside of a trait?
- Enqueue sripts and styles only if function is called
- post_exists stops working in a scheduled event
- Taxonomy Child Term, Counter is staying on 0
- PHP get_category() function redeclared
- Private messaging – Getting and displaying the avatar/url of a message recipient
- Permission error on plugin save
- Trouble using wordpress functions in a pop-up modal form
- Issues separating my Plugin pages into different files
- how can I make content from a plugin hidden when user is logged in? [duplicate]
- display php code in header using wp_head()
- How do I change the Go To Categories link in the term_updated_messages
- WP Custom tables query
- How to redirect users to custom lostpassword page?
- Can I write ‘RewriteCond’ using ‘functions.php’?
- Overriding a theme redux file in child theme
- Validate a users email address when using gmail to register
- Get widget settings function?
- How do I use the Simple HTML DOM Parser in plugin when other plugin already uses it?
- Adding tawk.to code just before body tag on functions.php file
- Instantiate class to be available to all plugin functions
- WP nonce invalid
- add_action shortcut?
- remove wp floating submenu in wp dashboard
- ACF: how do I get the fields and its values of a specific group?
- Get page that displays all children of taxonomy parent
- Function to capture a value and store it in a variable
- Adding a widget function into the php theme file
- My new button is in the wrong place
- Checking array against author id in loop
- Call to undefined method – Download Monitor
- How to change menu labels
- Remove Custom Divs from AMP pages
- Read array in php?
- Undefined method class::construct() when creating a plugin
- Is it possible to display a DIV to not logged in users and then change it for users who are logged in?
- Remove extract from function
- Undefined offset: 3 in custom function
- How can I display Custom Post type Custom Columns and its Content in a Dashboard Widget?
- Can/should we delete wordpress cron jobs with no action?
- How to use data URL in WordPress?
- File is executed twice if plugin is activating
- Flushing the slug base has no effect and does not change
- product_type_options get saved value [closed]
- Multiple cron jobs vs daily cron job doing multiple things? Which one yields better performance and scalability?
- JQuery modal not loading video on popup, only displaying it after multiple reopenings
- Get user by meta data key and velue
- Add another role to a user when they click a button?
- Notice: Undefined index: post_title error
- Unable to pass arguments to function used in add_action
- Allow user to select location and then set cookie for location in WordPress
- My function echos only “array”
- Notify admin (by email) if post added with specific tag
- Limit Taxonomy Parents
- See output of a sql query while plugin installation in wordpress
- How to add button to top of theme customizer?
- Send foreach $_post method to contact form 7 [closed]
- Options.php loop won’t show!
- change title of page dynamically