Make use of new usermeta `last_activity_tracker` to more accurately see when a user had an interaction.
This should allow more accurate reporting, since last login can sometime be very old.
* Fix pledge activation URL
The post id being sent by email contained the pledge ID instead of the ID for form page, this fixes that are restores the ability to confirm email address.
* Fix unrelated PHPCS
Previously the `$user->team_names` would be cast to an array before the null coalescing operator executed. If the `team_names` field wasn't set in the database, PHP would throw an error before trying to apply the null coalescing operator.
Sometimes we do want folks to reply to messages, and the `donotreply` address contradicts that. `bounce@` has a similar meaning, but is less known. `bounce@` has the advantage of matching the `Return-Path`, which may reduce the chance of a message being flagged as spam for forging the `From` header.
See https://github.com/WordPress/five-for-the-future/pull/206#discussion_r938418815
This removes the `_total_sponsored_hours` and `_total_sponsored_contributors` stats because they're not reliable or meaningfullly different from the "pledged" stats. That effectively reverts most of c1ce72d447.
The remaining variables were renamed for clarity.
See #198
This will be further clarified by #200, because it will change the labels that are displayed to viewers.
`FILTER_UNSAFE_RAW` doesn't strip HTML tags like `FILTER_SANITIZE_STRING` did, but some of these are being run through `sanitize_text_field` as well, and the others aren't being output or saved to the database.
See https://stackoverflow.com/a/69207369/450127
This avoids a PHP Notice during the cron task to update the contributor/hour counters.
By returning 0 here we have "valid" metadata attached to the pledge posts, which removes the need for further logic there.
Closes#151
If a contributor is removed from a pledge, they should be notified of the change. This will send an email to any confirmed contributors letting them know.
Using a seed for the RAND function, based on the date & time, will randomize the list every hour, while keeping the order consistent across any pagination. This also removes the increase to posts_per_page, since pagination is functional again.
Fixes#70
When a pledge is selected but the auth token is missing/incorrect, show the email form. Like on the pledge page, submitting the correct email will trigger a new auth token + link to be emailed to the pledge manager. This makes for a clearer path for re-requesting a valid link.
Fixes#114