I have a custom meta field for a page that contains a future date. I'm wanting to make sure this is always a future date and have decided the best way to do so is by creating an admin pointer if the date is in the past. The only problem is the default way to close the pointer sets
user_meta_data I want to use a cookie instead and nag the user daily until the date is changed.
Okay here is some code examples:
If you look at the admin-ajax.php you can see the
dismiss-wp-pointer defined and follow the white rabbit back to where it sets the meta data.
I'm thinking there has to be a way to use a cookie instead. Any thoughts would be appreciated.
Originally I was thinking I would need to do this using a cookie, but now that I think about it more I see that this is only ONE option. I've outlined some others below in hopes that someone will have an idea how to do them.
- Use 2 user meta values one that has the date they last closed it and one has the reset value
wp_cronand delete the key value each day
- Have the date be part of the key value (ie nifty_$epochtime) then loop through user meta data and split the nifty key on
_and check the date with current date.
- Orignal way use a cookie instead.
The only problem is I don't know how to do any of these or which one would work best.