I need a simple Wordpress plugin. The plugin is an terms of use/announcement/message plugin. Simply put, when the user logins in, the message is displayed. The message will have a checkbox that allows the user to "clear" the message. The fact that the user has checked this box will be stored in the database, and the next time the user logs in the plugin will verify that the checkbox has been checked... if it has, no messgage is shown.... if not, display the message again. Also track time since first time shown and provide an option to display a time countdown on the message (i.e "You have 3 days left to agree to the terms.")
I would like an admin page that will hook under "Settings" and allow Admin only access. The items that can be changed are "Message" (allowing HTML code), # days to show (enter 0 for none), Show countdown reminder? (if yes, show how # days), countdown reminder text (the text that will show if countdown is used), require checkbox? (if selected, this would require the box be checked to proceed), admin email (not using the one stored in WP, but a seperate email address here) and a "Checkbox label".
Ideally I want to use this to require agreement to Terms of Use upon initial sign in, but other uses could be for a simple welcome message. Therefore the checkbox label can be changed to "Agree to Terms", "Do not show in the future", or any other label. As a Terms of Use agreement, ideally I would like the Countdown feature to inform them they have X number of days to accept these terms, and if they do not agree within those number of days, send an email to the stored admin email address so account can be disabled.
My vision of how the plugin would layout would be:
- Get User ID
- Check DB to see if User ID has submitted a "checked" box
- If User has submitted the checked box, then do not show stored message
- If User has not submitted the checked box and is still within required time (if required time selected in admin), show message stored in DB and countdown timer and message if required. If acceptance is required, do not permit any other pages in WP admin, otherwise redirect to dashboard.
- If User has not submitted the checked box, but expired time has elapsed, display message with countdown timer and message and send email to admin email. No additional WP admin pages may be accessed (unless checkbox acceptance is fulfilled.)
Would prefer either a popup in lightbox, or a redirect to a page. Either way, if agreement (by checking box) is required, no other WP admin pages should be accessible (redirect back to the message.)
Once completed, this will be a private plugin used only on my websites and will not be registered for free at WP.