Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

Repository files navigation

wordpress-newsletter — Taskscape Newsletter Popup

WordPress plugin that shows a newsletter popup on the "Baza Wiedzy" category single posts. Five seconds after the page loads it displays a modal with an e-mail form; the submitted address is validated (including a disposable e-mail domain blacklist), sent to the site administrator over AJAX (wp_mail), and the popup is then suppressed for a year via a cookie.

Layout

taskscape-newsletter-popup.php   the entire plugin — popup HTML, script/style
                                 enqueue, AJAX handler
popup.js                         behaviour — timed display, validation,
                                 submission, dismissal cookie
popup.css                        popup styling (dark overlay, modal, form)
images/
  modal-newsletter.png           illustration shown on the left side of the modal

Behaviour (popup.js)

  1. On DOMContentLoaded the popup is skipped when the tbnpDismissed=true cookie is present.
  2. After 5 seconds the popup is shown and body scrolling is locked.
  3. tbnpSubmit() validates the address format and rejects known disposable/temporary e-mail domains.
  4. The address is POSTed to admin-ajax.php (action=tbnp_submit); the server sends the notification to the site administrator and the cookie is set for 365 days.
  5. Success message is shown for 3 seconds, then the popup closes and the scroll is unlocked.

Requirements

  • WordPress with PHP (no build step, no runtime dependencies beyond WordPress core wp_mail/admin-ajax).

Installation

  1. Copy the folder into wp-content/plugins/ (or zip it and upload through Plugins → Add New → Upload Plugin).
  2. Activate Taskscape Newsletter Popup in the Plugins screen.

The popup appears automatically on single posts in the Baza Wiedzy category — no configuration or shortcode needed. To change the recipient, edit the address in wp_mail() in taskscape-newsletter-popup.php.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages