From 94ca44bd331fa2551d8ffe9830a7051547e623ed Mon Sep 17 00:00:00 2001
From: ren <18050944+renintw@users.noreply.github.com>
Date: Mon, 10 Jul 2023 19:19:55 +0800
Subject: [PATCH 01/14] WordCamp Counts: Add Volunteer to table with
total/unique value
---
.../classes/report/class-wordcamp-counts.php | 28 +++++++++++++++++++
.../views/html/wordcamp-counts.php | 18 +++++++++---
2 files changed, 42 insertions(+), 4 deletions(-)
diff --git a/public_html/wp-content/plugins/wordcamp-reports/classes/report/class-wordcamp-counts.php b/public_html/wp-content/plugins/wordcamp-reports/classes/report/class-wordcamp-counts.php
index 397e03bad..f1e65df45 100644
--- a/public_html/wp-content/plugins/wordcamp-reports/classes/report/class-wordcamp-counts.php
+++ b/public_html/wp-content/plugins/wordcamp-reports/classes/report/class-wordcamp-counts.php
@@ -284,12 +284,14 @@ public function compile_report_data( array $data ) {
'session' => 0,
'speaker' => 0,
'sponsor' => 0,
+ 'volunteer' => 0,
),
'uniques' => array(
'attendee' => array(),
'organizer' => array(),
'speaker' => array(),
'sponsor' => array(),
+ 'volunteer' => array(),
),
);
@@ -300,6 +302,7 @@ public function compile_report_data( array $data ) {
'session' => 0,
'speaker' => 0,
'sponsor' => 0,
+ 'volunteer' => 0,
),
);
@@ -314,6 +317,7 @@ public function compile_report_data( array $data ) {
'attendee' => $gender_template,
'organizer' => $gender_template,
'speaker' => $gender_template,
+ 'volunteer' => $gender_template,
);
}
@@ -575,6 +579,30 @@ protected function get_data_for_site( $site_id, $wordcamp_id ) {
clean_post_cache( $sponsor );
}
+ $volunteers = new WP_Query( array(
+ 'posts_per_page' => -1,
+ 'post_type' => 'wcb_volunteer',
+ 'post_status' => 'publish',
+ ) );
+
+ foreach ( $volunteers->posts as $volunteer ) {
+ $data = array(
+ 'wordcamp_id' => $wordcamp_id,
+ 'site_id' => $site_id,
+ 'post_id' => $volunteer->ID,
+ 'type' => 'volunteer',
+ 'identifier' => $volunteer->_wcpt_user_name,
+ );
+
+ if ( $this->include_gender ) {
+ $data['first_name'] = explode( ' ', $volunteer->post_title )[0];
+ }
+
+ $site_data[] = $data;
+
+ clean_post_cache( $volunteer );
+ }
+
restore_current_blog();
// Convert blanks to unique values.
diff --git a/public_html/wp-content/plugins/wordcamp-reports/views/html/wordcamp-counts.php b/public_html/wp-content/plugins/wordcamp-reports/views/html/wordcamp-counts.php
index b65e33842..a7c637db9 100644
--- a/public_html/wp-content/plugins/wordcamp-reports/views/html/wordcamp-counts.php
+++ b/public_html/wp-content/plugins/wordcamp-reports/views/html/wordcamp-counts.php
@@ -35,13 +35,14 @@
-
Totals and Uniques
+ Totals, Uniques and First times
Type |
Total |
Unique |
+ First time |
Registered Attendees |
@@ -68,6 +69,12 @@
|
|
+
+
+ Volunteers |
+ |
+ |
+
@@ -112,10 +119,13 @@
WordCamp |
Date |
Status |
- Registered Attendees
|
- Organizers
|
+ Registered Attendees
|
+ Organizers
|
Sessions |
- Speakers
|
+ Speakers
|
Sponsors |
From 7dfb8fd7edf84e9baf25b2d000d6ebfe75656b1d Mon Sep 17 00:00:00 2001
From: ren <18050944+renintw@users.noreply.github.com>
Date: Mon, 10 Jul 2023 19:26:00 +0800
Subject: [PATCH 02/14] WordCamp Count: Add volunteer field to Estimated Gender
Breakdown and WordCamp Details
---
.../views/html/wordcamp-counts.php | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/public_html/wp-content/plugins/wordcamp-reports/views/html/wordcamp-counts.php b/public_html/wp-content/plugins/wordcamp-reports/views/html/wordcamp-counts.php
index a7c637db9..a386134be 100644
--- a/public_html/wp-content/plugins/wordcamp-reports/views/html/wordcamp-counts.php
+++ b/public_html/wp-content/plugins/wordcamp-reports/views/html/wordcamp-counts.php
@@ -109,6 +109,14 @@
|
|
+
+
+ Volunteers |
+ |
+ |
+ |
+ |
+
@@ -127,6 +135,8 @@
Speakers
|
Sponsors |
+ Volunteers
|
@@ -169,6 +179,15 @@
|
+
+
+
+
+ /
+ /
+ /
+
+ |
From b0791488be01c8425539ea975dd1245e96973561 Mon Sep 17 00:00:00 2001
From: ren <18050944+renintw@users.noreply.github.com>
Date: Mon, 10 Jul 2023 22:16:30 +0800
Subject: [PATCH 03/14] WordCamp Count: Retrieve sum of volunteer first_time
value across all events
---
.../classes/report/class-wordcamp-counts.php | 14 ++++++++++++++
.../views/html/wordcamp-counts.php | 6 ++++++
2 files changed, 20 insertions(+)
diff --git a/public_html/wp-content/plugins/wordcamp-reports/classes/report/class-wordcamp-counts.php b/public_html/wp-content/plugins/wordcamp-reports/classes/report/class-wordcamp-counts.php
index f1e65df45..7f5682b63 100644
--- a/public_html/wp-content/plugins/wordcamp-reports/classes/report/class-wordcamp-counts.php
+++ b/public_html/wp-content/plugins/wordcamp-reports/classes/report/class-wordcamp-counts.php
@@ -130,6 +130,7 @@ class WordCamp_Counts extends Base {
'post_id' => 0,
'type' => '',
'gender' => '',
+ 'first_time' => '',
);
/**
@@ -293,6 +294,14 @@ public function compile_report_data( array $data ) {
'sponsor' => array(),
'volunteer' => array(),
),
+ 'first_times' => array(
+ 'attendee' => 0,
+ 'organizer' => 0,
+ 'session' => 0,
+ 'speaker' => 0,
+ 'sponsor' => 0,
+ 'volunteer' => 0,
+ ),
);
$wordcamp_template = array(
@@ -335,9 +344,13 @@ public function compile_report_data( array $data ) {
$type = $item['type'];
$identifier = $item['identifier'];
+ $first_time = $item['first_time'];
$compiled_data['wordcamps'][ $wordcamp_id ]['totals'][ $type ] ++;
$compiled_data['totals'][ $type ] ++;
+ if ( 'yes' === $first_time ) {
+ $compiled_data['first_times'][ $type ] ++;
+ }
if ( isset( $compiled_data['uniques'][ $type ] ) ) {
$compiled_data['uniques'][ $type ][] = $identifier;
}
@@ -592,6 +605,7 @@ protected function get_data_for_site( $site_id, $wordcamp_id ) {
'post_id' => $volunteer->ID,
'type' => 'volunteer',
'identifier' => $volunteer->_wcpt_user_name,
+ 'first_time' => $volunteer->_wcb_volunteer_first_time,
);
if ( $this->include_gender ) {
diff --git a/public_html/wp-content/plugins/wordcamp-reports/views/html/wordcamp-counts.php b/public_html/wp-content/plugins/wordcamp-reports/views/html/wordcamp-counts.php
index a386134be..efab6cffc 100644
--- a/public_html/wp-content/plugins/wordcamp-reports/views/html/wordcamp-counts.php
+++ b/public_html/wp-content/plugins/wordcamp-reports/views/html/wordcamp-counts.php
@@ -48,32 +48,38 @@
Registered Attendees |
|
|
+ |
Organizers |
|
|
+ |
Sessions |
|
n/a |
+ |
Speakers |
|
|
+ |
Sponsors |
|
|
+ |
Volunteers |
|
|
+ |
From 2f81945495a8b490f6a82f1d2233b7b98bee3c25 Mon Sep 17 00:00:00 2001
From: ren <18050944+renintw@users.noreply.github.com>
Date: Mon, 10 Jul 2023 23:19:59 +0800
Subject: [PATCH 04/14] WordCamp Count: Retrieve volunteer first_time value for
each event
---
.../classes/report/class-wordcamp-counts.php | 9 +++++++++
.../wordcamp-reports/views/html/wordcamp-counts.php | 8 +++++---
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/public_html/wp-content/plugins/wordcamp-reports/classes/report/class-wordcamp-counts.php b/public_html/wp-content/plugins/wordcamp-reports/classes/report/class-wordcamp-counts.php
index 7f5682b63..b59370d50 100644
--- a/public_html/wp-content/plugins/wordcamp-reports/classes/report/class-wordcamp-counts.php
+++ b/public_html/wp-content/plugins/wordcamp-reports/classes/report/class-wordcamp-counts.php
@@ -313,6 +313,14 @@ public function compile_report_data( array $data ) {
'sponsor' => 0,
'volunteer' => 0,
),
+ 'first_times' => array(
+ 'attendee' => 0,
+ 'organizer' => 0,
+ 'session' => 0,
+ 'speaker' => 0,
+ 'sponsor' => 0,
+ 'volunteer' => 0,
+ ),
);
if ( $this->include_gender ) {
@@ -349,6 +357,7 @@ public function compile_report_data( array $data ) {
$compiled_data['wordcamps'][ $wordcamp_id ]['totals'][ $type ] ++;
$compiled_data['totals'][ $type ] ++;
if ( 'yes' === $first_time ) {
+ $compiled_data['wordcamps'][ $wordcamp_id ]['first_times'][ $type ] ++;
$compiled_data['first_times'][ $type ] ++;
}
if ( isset( $compiled_data['uniques'][ $type ] ) ) {
diff --git a/public_html/wp-content/plugins/wordcamp-reports/views/html/wordcamp-counts.php b/public_html/wp-content/plugins/wordcamp-reports/views/html/wordcamp-counts.php
index efab6cffc..e42e6b3f8 100644
--- a/public_html/wp-content/plugins/wordcamp-reports/views/html/wordcamp-counts.php
+++ b/public_html/wp-content/plugins/wordcamp-reports/views/html/wordcamp-counts.php
@@ -141,8 +141,9 @@
Speakers
|
Sponsors |
- Volunteers
|
+ Volunteers (FT*)Volunteers
|
@@ -187,7 +188,7 @@
-
+
/
/
@@ -197,6 +198,7 @@
+ *FT = First Time
From 4b97f0cb172674c5d8073f83600f5c2ef25af77f Mon Sep 17 00:00:00 2001
From: ren <18050944+renintw@users.noreply.github.com>
Date: Wed, 12 Jul 2023 09:13:29 +0800
Subject: [PATCH 05/14] WordCamp Count: Show first time (Y/N/?) rather than
just (Y)
---
.../classes/report/class-wordcamp-counts.php | 36 ++++++-----
.../views/html/wordcamp-counts.php | 64 +++++++++++++++----
2 files changed, 71 insertions(+), 29 deletions(-)
diff --git a/public_html/wp-content/plugins/wordcamp-reports/classes/report/class-wordcamp-counts.php b/public_html/wp-content/plugins/wordcamp-reports/classes/report/class-wordcamp-counts.php
index b59370d50..5a9fd3253 100644
--- a/public_html/wp-content/plugins/wordcamp-reports/classes/report/class-wordcamp-counts.php
+++ b/public_html/wp-content/plugins/wordcamp-reports/classes/report/class-wordcamp-counts.php
@@ -277,6 +277,12 @@ public function get_data() {
public function compile_report_data( array $data ) {
$wordcamps = $this->prepare_data_for_display( $this->get_wordcamps() );
+ $first_time_template = array(
+ 'yes' => 0,
+ 'no' => 0,
+ 'unsure' => 0,
+ );
+
$compiled_data = array(
'wordcamps' => array(),
'totals' => array(
@@ -295,12 +301,12 @@ public function compile_report_data( array $data ) {
'volunteer' => array(),
),
'first_times' => array(
- 'attendee' => 0,
- 'organizer' => 0,
- 'session' => 0,
- 'speaker' => 0,
- 'sponsor' => 0,
- 'volunteer' => 0,
+ 'attendee' => $first_time_template,
+ 'organizer' => $first_time_template,
+ 'session' => $first_time_template,
+ 'speaker' => $first_time_template,
+ 'sponsor' => $first_time_template,
+ 'volunteer' => $first_time_template,
),
);
@@ -314,12 +320,12 @@ public function compile_report_data( array $data ) {
'volunteer' => 0,
),
'first_times' => array(
- 'attendee' => 0,
- 'organizer' => 0,
- 'session' => 0,
- 'speaker' => 0,
- 'sponsor' => 0,
- 'volunteer' => 0,
+ 'attendee' => $first_time_template,
+ 'organizer' => $first_time_template,
+ 'session' => $first_time_template,
+ 'speaker' => $first_time_template,
+ 'sponsor' => $first_time_template,
+ 'volunteer' => $first_time_template,
),
);
@@ -356,9 +362,9 @@ public function compile_report_data( array $data ) {
$compiled_data['wordcamps'][ $wordcamp_id ]['totals'][ $type ] ++;
$compiled_data['totals'][ $type ] ++;
- if ( 'yes' === $first_time ) {
- $compiled_data['wordcamps'][ $wordcamp_id ]['first_times'][ $type ] ++;
- $compiled_data['first_times'][ $type ] ++;
+ if ( isset( $wordcamp_template['first_times'][ $type ] ) ) {
+ $compiled_data['wordcamps'][ $wordcamp_id ]['first_times'][ $type ][ $first_time ] ++;
+ $compiled_data['first_times'][ $type ][ $first_time ] ++;
}
if ( isset( $compiled_data['uniques'][ $type ] ) ) {
$compiled_data['uniques'][ $type ][] = $identifier;
diff --git a/public_html/wp-content/plugins/wordcamp-reports/views/html/wordcamp-counts.php b/public_html/wp-content/plugins/wordcamp-reports/views/html/wordcamp-counts.php
index e42e6b3f8..845711a05 100644
--- a/public_html/wp-content/plugins/wordcamp-reports/views/html/wordcamp-counts.php
+++ b/public_html/wp-content/plugins/wordcamp-reports/views/html/wordcamp-counts.php
@@ -14,7 +14,8 @@
/** @var DateTime $end_date */
/** @var string $statuses */
-$gender_legend = 'Total / F / M / ?';
+$gender_legend = 'Gender: F / M / ?';
+$first_time_legend = 'Y / N / ?';
?>
@@ -42,44 +43,68 @@
| Type |
Total |
Unique |
- First time |
+ First time
|
Registered Attendees |
|
|
- |
+
+
+ /
+ /
+ |
Organizers |
|
|
- |
+
+
+ /
+ /
+ |
Sessions |
|
n/a |
- |
+
+
+ /
+ /
+ |
Speakers |
|
|
- |
+
+
+ /
+ /
+ |
Sponsors |
|
|
- |
+
+
+ /
+ /
+ |
Volunteers |
|
|
- |
+
+
+ /
+ /
+ |
@@ -141,9 +166,16 @@
Speakers
|
Sponsors |
- Volunteers (FT*)Volunteers
|
+
+ Volunteers
+
+ First time:
+
+
+
+
+
+ |
@@ -188,9 +220,14 @@
-
+ Total:
+
+ FT:
+ /
+ /
- /
+
+ G:
/
/
@@ -198,7 +235,6 @@
- *FT = First Time
From 24b45636ca6e13043793b93ee7874756c96dd1bb Mon Sep 17 00:00:00 2001
From: ren <18050944+renintw@users.noreply.github.com>
Date: Wed, 12 Jul 2023 09:50:12 +0800
Subject: [PATCH 06/14] WordCamp Count: Get _wcb_organizer_first_time value for
organizer
---
.../wordcamp-reports/classes/report/class-wordcamp-counts.php | 1 +
1 file changed, 1 insertion(+)
diff --git a/public_html/wp-content/plugins/wordcamp-reports/classes/report/class-wordcamp-counts.php b/public_html/wp-content/plugins/wordcamp-reports/classes/report/class-wordcamp-counts.php
index 5a9fd3253..a6809dde9 100644
--- a/public_html/wp-content/plugins/wordcamp-reports/classes/report/class-wordcamp-counts.php
+++ b/public_html/wp-content/plugins/wordcamp-reports/classes/report/class-wordcamp-counts.php
@@ -518,6 +518,7 @@ protected function get_data_for_site( $site_id, $wordcamp_id ) {
'post_id' => $organizer->ID,
'type' => 'organizer',
'identifier' => $organizer->_wcpt_user_id,
+ 'first_time' => $organizer->_wcb_organizer_first_time,
);
if ( $this->include_gender ) {
From 0779d600f97a0487b21ccd1855826020af25c1b8 Mon Sep 17 00:00:00 2001
From: ren <18050944+renintw@users.noreply.github.com>
Date: Wed, 12 Jul 2023 16:30:37 +0800
Subject: [PATCH 07/14] WordCamp Count: Get _wcb_speaker_first_time value for
speaker
---
.../wordcamp-reports/classes/report/class-wordcamp-counts.php | 1 +
1 file changed, 1 insertion(+)
diff --git a/public_html/wp-content/plugins/wordcamp-reports/classes/report/class-wordcamp-counts.php b/public_html/wp-content/plugins/wordcamp-reports/classes/report/class-wordcamp-counts.php
index a6809dde9..b70d9edab 100644
--- a/public_html/wp-content/plugins/wordcamp-reports/classes/report/class-wordcamp-counts.php
+++ b/public_html/wp-content/plugins/wordcamp-reports/classes/report/class-wordcamp-counts.php
@@ -573,6 +573,7 @@ protected function get_data_for_site( $site_id, $wordcamp_id ) {
'post_id' => $speaker->ID,
'type' => 'speaker',
'identifier' => $speaker->_wcb_speaker_email,
+ 'first_time' => $speaker->_wcb_speaker_first_time,
);
if ( $this->include_gender ) {
From c4da3d13f061fd6b5dd7c2ebbda45ee870109cd4 Mon Sep 17 00:00:00 2001
From: ren <18050944+renintw@users.noreply.github.com>
Date: Wed, 12 Jul 2023 16:41:01 +0800
Subject: [PATCH 08/14] WordCamp Counts: Add first-time organize/speaker data
to table
---
.../views/html/wordcamp-counts.php | 40 +++++++++++++++----
1 file changed, 32 insertions(+), 8 deletions(-)
diff --git a/public_html/wp-content/plugins/wordcamp-reports/views/html/wordcamp-counts.php b/public_html/wp-content/plugins/wordcamp-reports/views/html/wordcamp-counts.php
index 845711a05..e582d5b36 100644
--- a/public_html/wp-content/plugins/wordcamp-reports/views/html/wordcamp-counts.php
+++ b/public_html/wp-content/plugins/wordcamp-reports/views/html/wordcamp-counts.php
@@ -160,11 +160,25 @@
| Status |
Registered Attendees
|
- Organizers
|
+ Organizers
+
+ First time:
+
+
+
+
+
+ |
Sessions |
- Speakers
|
+ Speakers
+
+ First time:
+
+
+
+
+
+ |
Sponsors |
Volunteers
@@ -194,9 +208,14 @@
|
-
+ Total:
+
+ FT:
+ /
+ /
- /
+
+ G:
/
/
@@ -207,9 +226,14 @@
|
-
+ Total:
+
+ FT:
+ /
+ /
- /
+
+ G:
/
/
From a61ea7fbbe90945c8e10d78887fad7fda421dc9e Mon Sep 17 00:00:00 2001
From: ren <18050944+renintw@users.noreply.github.com>
Date: Wed, 12 Jul 2023 16:43:50 +0800
Subject: [PATCH 09/14] WordCamp Count: Get _wcpt_sponsor_first_time value for
sponsor
---
.../wordcamp-reports/classes/report/class-wordcamp-counts.php | 1 +
1 file changed, 1 insertion(+)
diff --git a/public_html/wp-content/plugins/wordcamp-reports/classes/report/class-wordcamp-counts.php b/public_html/wp-content/plugins/wordcamp-reports/classes/report/class-wordcamp-counts.php
index b70d9edab..1f178ef10 100644
--- a/public_html/wp-content/plugins/wordcamp-reports/classes/report/class-wordcamp-counts.php
+++ b/public_html/wp-content/plugins/wordcamp-reports/classes/report/class-wordcamp-counts.php
@@ -598,6 +598,7 @@ protected function get_data_for_site( $site_id, $wordcamp_id ) {
'post_id' => $sponsor->ID,
'type' => 'sponsor',
'identifier' => $this->get_sponsor_identifier( $sponsor->_wcpt_sponsor_website ),
+ 'first_time' => $sponsor->_wcpt_sponsor_first_time,
);
if ( $this->include_gender ) {
From 32006c6d6cd558bb3def824646312f8037e26682 Mon Sep 17 00:00:00 2001
From: ren <18050944+renintw@users.noreply.github.com>
Date: Wed, 12 Jul 2023 16:48:07 +0800
Subject: [PATCH 10/14] WordCamp Counts: Add first-time sponsor data to table
---
.../views/html/wordcamp-counts.php | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/public_html/wp-content/plugins/wordcamp-reports/views/html/wordcamp-counts.php b/public_html/wp-content/plugins/wordcamp-reports/views/html/wordcamp-counts.php
index e582d5b36..6ffef5a31 100644
--- a/public_html/wp-content/plugins/wordcamp-reports/views/html/wordcamp-counts.php
+++ b/public_html/wp-content/plugins/wordcamp-reports/views/html/wordcamp-counts.php
@@ -179,7 +179,11 @@
|
- Sponsors |
+ Sponsors
+
+ First time:
+
+ |
Volunteers
@@ -239,8 +243,12 @@
|
-
-
+ |
+ Total:
+
+ FT:
+ /
+ /
|
From b2a453089107d54f63259c55abdb747130ad3daf Mon Sep 17 00:00:00 2001
From: ren <18050944+renintw@users.noreply.github.com>
Date: Thu, 20 Jul 2023 16:35:41 +0800
Subject: [PATCH 11/14] Show n/a when it comes to sessions
---
.../plugins/wordcamp-reports/views/html/wordcamp-counts.php | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/public_html/wp-content/plugins/wordcamp-reports/views/html/wordcamp-counts.php b/public_html/wp-content/plugins/wordcamp-reports/views/html/wordcamp-counts.php
index 6ffef5a31..d493ee105 100644
--- a/public_html/wp-content/plugins/wordcamp-reports/views/html/wordcamp-counts.php
+++ b/public_html/wp-content/plugins/wordcamp-reports/views/html/wordcamp-counts.php
@@ -69,11 +69,7 @@
| Sessions |
|
n/a |
-
-
- /
- /
- |
+ n/a |
Speakers |
From cb230cd4771a0eefe40d6b2496ec03bc06851e2b Mon Sep 17 00:00:00 2001
From: ren <18050944+renintw@users.noreply.github.com>
Date: Wed, 26 Jul 2023 15:50:49 +0800
Subject: [PATCH 12/14] Keep prefix of _first_time for all affected CPT
consistent
---
.../wordcamp-reports/classes/report/class-wordcamp-counts.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/public_html/wp-content/plugins/wordcamp-reports/classes/report/class-wordcamp-counts.php b/public_html/wp-content/plugins/wordcamp-reports/classes/report/class-wordcamp-counts.php
index 1f178ef10..4823092c9 100644
--- a/public_html/wp-content/plugins/wordcamp-reports/classes/report/class-wordcamp-counts.php
+++ b/public_html/wp-content/plugins/wordcamp-reports/classes/report/class-wordcamp-counts.php
@@ -598,7 +598,7 @@ protected function get_data_for_site( $site_id, $wordcamp_id ) {
'post_id' => $sponsor->ID,
'type' => 'sponsor',
'identifier' => $this->get_sponsor_identifier( $sponsor->_wcpt_sponsor_website ),
- 'first_time' => $sponsor->_wcpt_sponsor_first_time,
+ 'first_time' => $sponsor->_wcb_sponsor_first_time,
);
if ( $this->include_gender ) {
From c4dd64b34b0537bc5a6961644a1793f8a75222f8 Mon Sep 17 00:00:00 2001
From: ren <18050944+renintw@users.noreply.github.com>
Date: Wed, 26 Jul 2023 17:42:00 +0800
Subject: [PATCH 13/14] WordCamp Count: Get tix_first_time_attending_wp_event
value for attendee
---
.../wordcamp-reports/classes/report/class-wordcamp-counts.php | 1 +
1 file changed, 1 insertion(+)
diff --git a/public_html/wp-content/plugins/wordcamp-reports/classes/report/class-wordcamp-counts.php b/public_html/wp-content/plugins/wordcamp-reports/classes/report/class-wordcamp-counts.php
index 4823092c9..3595d9bc8 100644
--- a/public_html/wp-content/plugins/wordcamp-reports/classes/report/class-wordcamp-counts.php
+++ b/public_html/wp-content/plugins/wordcamp-reports/classes/report/class-wordcamp-counts.php
@@ -494,6 +494,7 @@ protected function get_data_for_site( $site_id, $wordcamp_id ) {
'post_id' => $attendee->ID,
'type' => 'attendee',
'identifier' => $attendee->tix_email,
+ 'first_time' => $attendee->tix_first_time_attending_wp_event,
);
if ( $this->include_gender ) {
From 896e703e57a8b1ecfaa3babc802595cefaa2373e Mon Sep 17 00:00:00 2001
From: ren <18050944+renintw@users.noreply.github.com>
Date: Wed, 26 Jul 2023 17:44:03 +0800
Subject: [PATCH 14/14] WordCamp Counts: Add first-time attendee data to table
---
.../views/html/wordcamp-counts.php | 20 +++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/public_html/wp-content/plugins/wordcamp-reports/views/html/wordcamp-counts.php b/public_html/wp-content/plugins/wordcamp-reports/views/html/wordcamp-counts.php
index d493ee105..7b5c02ac1 100644
--- a/public_html/wp-content/plugins/wordcamp-reports/views/html/wordcamp-counts.php
+++ b/public_html/wp-content/plugins/wordcamp-reports/views/html/wordcamp-counts.php
@@ -154,8 +154,15 @@
WordCamp |
Date |
Status |
- Registered Attendees
|
+ Registered Attendees
+
+ First time:
+
+
+
+
+
+ |
Organizers
First time:
@@ -199,9 +206,14 @@
| |
-
+ Total:
+
+ FT:
+ /
+ /
- /
+
+ G:
/
/
|