Commit graph

287 commits

Author SHA1 Message Date
Ian Dunn 0be2f859f9 Tests: Modularize database fixtures for reuse. 2022-08-29 16:21:06 -07:00
Ian Dunn c9783a17f5 Contributors: Move user_registered check to pruning function.
That allows `add_user_data_to_xprofile()` to be reused in other contexts.

`user_login` was removed from the `SELECT` because it wasn't being used.
2022-08-29 16:21:06 -07:00
Ian Dunn 9c0d1371f3 Contributors: Apply ?? before array cast, to avoid PHP notice.
See 8c28881
2022-08-29 16:21:06 -07:00
Ian Dunn cd36902bb5 Contributors: Standardize on team_names field for consistency. 2022-08-29 16:21:06 -07:00
Ian Dunn ccad917c00 Contributors: Modularize activity detection for reuse. 2022-08-29 16:21:06 -07:00
Dion Hulse 44e9daccd9
Harden endpoint against junk inputs.
This avoids a PHP Notice when the `pledge_id` is invalid, or not a valid pledge.
2022-08-25 17:59:36 +10:00
Ian Dunn 574ab7fd4e
Pledges: Email companies every 6 months to update pledges.
Fixes #211
2022-08-16 14:25:44 -07:00
Ian Dunn 8c28881812
Contributors: Apply ?? before array cast, to avoid PHP notice.
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.
2022-08-15 10:54:11 -07:00
Ian Dunn 993bd53765
Email: Check first name exists before using.
The previous check worked when the field existed as an empty string, but threw a notice when it didn't exist.
2022-08-10 11:41:14 -07:00
Ian Dunn 4dc03ada83 Email: Set From header to bounce@ to reduce confusion
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
2022-08-10 10:25:29 -07:00
Ian Dunn a8ce296de5 Add cron job to send emails to inactive contributors. 2022-08-10 10:25:29 -07:00
Ian Dunn a271a3f1d6 Add email that is sent to inactive contributors. 2022-08-10 10:25:29 -07:00
Ian Dunn 80b0148f38 Add stub for natural_language_join(). 2022-08-10 10:25:29 -07:00
Ian Dunn 9e4d322b3d
Stats: Add self-sponsored hours and contributor counts.
Fixes #124

Some variables/keys to clarify their names, or makes them less verbose. See #198, #200.
2022-08-03 15:53:34 -07:00
Ian Dunn 967718263f
Stats: Store in MC instead of post type
Fixes #200
Fixes #198
2022-08-03 09:29:49 -07:00
Ian Dunn 2b17844c96
Stats: Clarify confusing "sponsored" stats
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.
2022-08-02 16:58:51 -07:00
Ian Dunn cdd7e0b383
Add stub for bump_stats_extra(). 2022-08-02 11:08:47 -07:00
Ian Dunn ce43d6952a
Composer: Allow phpcodesniffer-composer-installer to run. 2022-08-02 11:07:12 -07:00
Ian Dunn bb0216adc6
Replace deprecated SANITIZE_STRING filter with UNSAFE_RAW.
`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
2022-07-19 11:03:35 -07:00
Ian Dunn 87979f588f
Update to PHPUnit 9 for PHP 8 compatibility 2022-07-19 09:33:34 -07:00
Ian Dunn 3f96573795
Bin: Add script for stopgap stats 2022-06-02 13:56:59 -07:00
Ian Dunn 94d979f8a4
Theme: Add gap between page-header-controls forms.
Fixes #175
2022-05-03 17:04:50 -07:00
Ian Dunn 71857b42eb
Theme: Merge page-header-controls styles for clarity. 2022-05-03 16:52:33 -07:00
Ian Dunn 37159e1821
Theme: Install postcss as peer dependency to fix watcher.
See https://github.com/postcss/autoprefixer/issues/1358#issuecomment-693175534
See https://github.com/postcss/autoprefixer/issues/1358#issuecomment-809430066
2022-05-03 16:23:41 -07:00
Ian Dunn cbc0afb39b
Tests: Add PHPUnit-Polyfills to fix broken tests in GH workflow.
e.g., https://github.com/WordPress/five-for-the-future/runs/5605920046?check_suite_focus=true
2022-05-03 15:51:42 -07:00
Ian Dunn 428cde283c
Contributors: Clear object cache when resetting profile data.
BuddyPress sets it infinitely, so for some users it would be awhile before it would be pushed out organically.
2022-05-03 12:36:16 -07:00
Ian Dunn c6d7bbb7c1
Contributors: Reset profile hours when pledge deactivated.
See https://github.com/WordPress/five-for-the-future/issues/169
2022-05-02 14:22:26 -07:00
Ian Dunn 834c62c0d0
Plugin: Minor cleanup 2022-04-28 09:34:14 -07:00
Ian Dunn 53ae291a53
Apply coding standards 2022-04-28 06:51:16 -07:00
Ian Dunn 82c8c9aec6
Email: Update Reply-To address to new mailbox. 2022-04-28 06:35:33 -07:00
Ian Dunn 7cf76a6b13
Tools: Update WPCS to fix error on PHP 7.4.
See https://github.com/WordPress/WordPress-Coding-Standards/releases/tag/2.2.1
2022-04-27 13:31:18 -07:00
Ian Dunn 61744dcbaa
Tools: Rename lint/format scripts to match newer repos. 2022-04-27 13:30:24 -07:00
Caleb Burks f269c2a1ab
Readme: Add detailed setup instructions to help contributors.
Fixes #86
2022-03-30 16:38:13 -07:00
Ian Dunn d86c93c67e
Theme: Add temporary badge for Photos to fill empty icon.
There isn't a badge for the Photos team yet -- see https://meta.trac.wordpress.org/ticket/5981 -- so for now I just used the `camera` dashicon that Luke Carbis suggested in https://meta.trac.wordpress.org/ticket/5988.

We can update it whenever the final badge icon/colors are decided.

Fixes #171
2022-03-28 15:12:45 -07:00
Ian Dunn 5d8b056798
Manage Pledge: Normalize addresses to lowercase for comparison.
Fixes #141
2022-03-28 14:17:29 -07:00
Ian Dunn c8a6ee5ddf
Theme: Specify home pullquote font on mobile for readability.
Fixes #165
2022-03-28 14:07:21 -07:00
Ian Dunn 77faa74b05
Theme: Remove redundant JS files.
These are already being loaded from the parent theme, and have identical copies there.
2022-03-24 17:19:23 -07:00
Dion Hulse 908e0973f3
Theme: Sync SVN commits to canonical Git repo.
r18240-dotorg:
Switch from using `global $pagetitle` to `add_theme_support( 'title-tags' );`.
See ​https://github.com/WordPress/wporg-mu-plugins/issues/44

r18291-dotorg:
Themes: Use a mu-plugin to output consistent skip-to links for all themes.
This is to remove the reliance upon `$wporg_global_header_options`.
See ​https://github.com/WordPress/wporg-mu-plugins/issues/42, ​https://github.com/WordPress/wporg-mu-plugins/pull/70.

r18292-dotorg:
Themes: Don't rely upon the WordPress.org header to switch out the `no-js` for `js` body class.
See ​https://github.com/WordPress/wporg-mu-plugins/issues/42
2022-03-18 12:42:05 -07:00
Corey McKrill 174a0381d6
Theme: Add support for Openverse team, fix Themes Team badge
This syncs `r17406-dotorg` to the canonical Git repo.
2022-03-18 12:42:05 -07:00
Corey McKrill a545168ef2
Contributors: Prevent adding to a pledge twice.
This syncs `r17275-dotorg` to the canonical Git repo.
2022-03-18 12:42:05 -07:00
Ian Dunn 5c0b79fa86
Bin: Add script to deactivate pledges. 2022-03-18 12:42:05 -07:00
Ian Dunn d22f13f2c1
Pledge: Log the reason why a pledge was deactivated. 2022-03-18 12:42:05 -07:00
Ian Dunn ac25f4c008
Theme: Enable testing new header on w.org sandboxes
See https://github.com/WordPress/wporg-mu-plugins/issues/19
2021-12-22 09:09:58 -08:00
Dion Hulse e49ee6bf94
Consistently link to proifiles.wordpress.org/%user/
See https://meta.trac.wordpress.org/ticket/5810
2021-12-15 17:19:25 +10:00
Ian Dunn 145047cafa
Pledges: Tweak spacing & typography
Related: 7174ae2
2021-05-11 13:41:56 -07:00
Ian Dunn 19eb0b2221
Theme: Bump cachebuster 2021-05-04 09:17:55 -07:00
Ian Dunn 4d80fcb733
Theme: Apply coding standards. 2021-05-04 08:52:33 -07:00
Ian Dunn 7174ae2fb6
Single Pledge: Add intro message to pledges for clarity. 2021-05-04 08:52:23 -07:00
dependabot[bot] 325a6d71e2
Bump dot-prop from 4.2.0 to 4.2.1 in /themes/wporg-5ftf (#155)
Bumps [dot-prop](https://github.com/sindresorhus/dot-prop) from 4.2.0 to 4.2.1.
- [Release notes](https://github.com/sindresorhus/dot-prop/releases)
- [Commits](https://github.com/sindresorhus/dot-prop/compare/v4.2.0...v4.2.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-10 13:12:34 -05:00
Kelly Dwan c3df4515e0
Tools: Update node packages 2020-12-10 12:39:27 -05:00