setFirstTime( value ) }
+ options={ [
+ { label: 'Yes', value: 'yes' },
+ { label: 'No', value: 'no' },
+ { label: 'Unsure', value: 'unsure' },
+ ] }
+ />
);
}
diff --git a/public_html/wp-content/plugins/wc-post-types/views/sponsors/metabox-sponsor-info.php b/public_html/wp-content/plugins/wc-post-types/views/sponsors/metabox-sponsor-info.php
index dcaf678b6..d891f2c91 100644
--- a/public_html/wp-content/plugins/wc-post-types/views/sponsors/metabox-sponsor-info.php
+++ b/public_html/wp-content/plugins/wc-post-types/views/sponsors/metabox-sponsor-info.php
@@ -13,6 +13,7 @@
/** @var string $state */
/** @var string $zip_code */
/** @var string $country */
+/** @var string $first_time */
/** @var array $available_countries */
?>
+
+
diff --git a/public_html/wp-content/plugins/wc-post-types/wc-post-types.php b/public_html/wp-content/plugins/wc-post-types/wc-post-types.php
index 7592cac0a..e868264db 100644
--- a/public_html/wp-content/plugins/wc-post-types/wc-post-types.php
+++ b/public_html/wp-content/plugins/wc-post-types/wc-post-types.php
@@ -1235,6 +1235,7 @@ public function metabox_sponsor_info( $sponsor ) {
$state = get_post_meta( $sponsor->ID, '_wcpt_sponsor_state', true );
$zip_code = get_post_meta( $sponsor->ID, '_wcpt_sponsor_zip_code', true );
$country = get_post_meta( $sponsor->ID, '_wcpt_sponsor_country', true );
+ $first_time = get_post_meta( $sponsor->ID, '_wcb_sponsor_first_time', true );
if ( $state === $this->get_sponsor_info_state_default_value() ) {
$state = '';
@@ -1358,7 +1359,7 @@ public function save_post_sponsor( $post_id, $post ) {
}
if ( wp_verify_nonce( filter_input( INPUT_POST, 'wcpt-meta-sponsor-info' ), 'edit-sponsor-info' ) ) {
- $text_values = array(
+ $text_values_wcpt = array(
'company_name',
'first_name',
'last_name',
@@ -1374,10 +1375,18 @@ public function save_post_sponsor( $post_id, $post ) {
'country',
);
- foreach ( $text_values as $id ) {
+ $text_values_wcb = array(
+ 'first_time',
+ );
+
+ foreach ( $text_values_wcpt as $id ) {
$values[ $id ] = sanitize_text_field( filter_input( INPUT_POST, '_wcpt_sponsor_' . $id ) );
}
+ foreach ( $text_values_wcb as $id ) {
+ $values[ $id ] = sanitize_text_field( filter_input( INPUT_POST, '_wcb_sponsor_' . $id ) );
+ }
+
if ( empty( $values['state'] ) ) {
$values['state'] = $this->get_sponsor_info_state_default_value();
}
@@ -1389,7 +1398,9 @@ public function save_post_sponsor( $post_id, $post ) {
$values['agreement'] = filter_input( INPUT_POST, '_wcpt_sponsor_agreement', FILTER_SANITIZE_NUMBER_INT );
foreach ( $values as $id => $value ) {
- $meta_key = '_wcpt_sponsor_' . $id;
+ $meta_key = in_array($id, $text_values_wcb, true)
+ ? '_wcb_sponsor_' . $id
+ : '_wcpt_sponsor_' . $id;
if ( empty( $value ) ) {
delete_post_meta( $post_id, $meta_key );
diff --git a/public_html/wp-content/plugins/wcpt/stubs/post/call-for-speakers.php b/public_html/wp-content/plugins/wcpt/stubs/post/call-for-speakers.php
index b7e386dcf..2b4962d4b 100644
--- a/public_html/wp-content/plugins/wcpt/stubs/post/call-for-speakers.php
+++ b/public_html/wp-content/plugins/wcpt/stubs/post/call-for-speakers.php
@@ -9,9 +9,9 @@
-
+
-
+
@@ -21,5 +21,7 @@
+
+
diff --git a/public_html/wp-content/plugins/wcpt/stubs/post/call-for-sponsors.php b/public_html/wp-content/plugins/wcpt/stubs/post/call-for-sponsors.php
index 0f45d38e7..10fca42d2 100644
--- a/public_html/wp-content/plugins/wcpt/stubs/post/call-for-sponsors.php
+++ b/public_html/wp-content/plugins/wcpt/stubs/post/call-for-sponsors.php
@@ -1,3 +1,12 @@
+
+Organizers Note:
+ Submissions to this form will automatically create draft
+ Sponsor posts.
+ You can use those to manage your sponsors, by publishing the ones that you accept, and deleting the ones that you don't.
+ Changing the name
, email
, username
, or first time sponsoring
questions can break the automation, though.
+
+
+
Blurb with information for potential sponsors.
@@ -9,7 +18,7 @@
-
+
@@ -17,5 +26,7 @@
+
+
diff --git a/public_html/wp-content/plugins/wcpt/stubs/post/call-for-volunteers.php b/public_html/wp-content/plugins/wcpt/stubs/post/call-for-volunteers.php
index 94755b102..bb939603b 100644
--- a/public_html/wp-content/plugins/wcpt/stubs/post/call-for-volunteers.php
+++ b/public_html/wp-content/plugins/wcpt/stubs/post/call-for-volunteers.php
@@ -21,7 +21,7 @@
-
+
diff --git a/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-new-site.php b/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-new-site.php
index f231ee3dd..bc764264d 100644
--- a/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-new-site.php
+++ b/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-new-site.php
@@ -735,6 +735,9 @@ protected function get_stub_posts( $wordcamp, $meta ) {
'content' => $this->get_stub_content( 'post', 'call-for-sponsors' ),
'status' => 'draft',
'type' => 'post',
+ 'meta' => array(
+ 'wcfd-key' => 'call-for-sponsors',
+ ),
),
array(
@@ -851,6 +854,9 @@ public static function get_stub_me_sponsors_meta( $assigned_sponsor ) {
$sponsor_meta[ "_wcpt_sponsor_$key" ] = get_post_meta( $assigned_sponsor->ID, "mes_$key", true );
}
+ // Always set the first-time sponsor value to 'no' for Multi Event (ME) Sponsors.
+ $sponsor_meta['_wcb_sponsor_first_time'] = 'no';
+
restore_current_blog();
return $sponsor_meta;
diff --git a/public_html/wp-content/plugins/wordcamp-forms-to-drafts/wordcamp-forms-to-drafts.php b/public_html/wp-content/plugins/wordcamp-forms-to-drafts/wordcamp-forms-to-drafts.php
index 54e24bf53..50260f96a 100644
--- a/public_html/wp-content/plugins/wordcamp-forms-to-drafts/wordcamp-forms-to-drafts.php
+++ b/public_html/wp-content/plugins/wordcamp-forms-to-drafts/wordcamp-forms-to-drafts.php
@@ -42,7 +42,7 @@ public function print_front_end_styles() {
?>
form_requires_login( $this->get_current_form_id() ) ) {
return;
}
- $deps_path = __DIR__ . '/build/inert.asset.php';
+ $deps_path = __DIR__ . '/build/inert.asset.php';
$script_info = require $deps_path;
wp_enqueue_script(
@@ -472,8 +472,11 @@ protected function create_draft_speaker( $speaker ) {
);
if ( $speaker_id ) {
+ $first_time = strtolower( $speaker['Is this your first time being a speaker at a WordPress event?'] ) ?? '';
+ $first_time = in_array( $first_time, array( 'yes', 'no', 'unsure' ), true ) ? $first_time : '';
update_post_meta( $speaker_id, '_wcb_speaker_email', $speaker['Email Address'] ?? '' );
update_post_meta( $speaker_id, '_wcpt_user_id', $this->get_user_id_from_username( $speaker['WordPress.org Username'] ?? '' ) );
+ update_post_meta( $speaker_id, '_wcb_speaker_first_time', $first_time );
}
return $speaker_id;