Opened 10 years ago

Closed 9 years ago

#567 closed enhancement (fixed)

Automate Speaker and Session CPT creation

Reported by: nvwd's profile nvwd Owned by: iandunn's profile iandunn
Milestone: Priority: normal
Component: WordCamp Site & Plugins Keywords:


When the Call for Speaker form is submitted create a draft Speaker and Session.

Attachments (2)

meta-567.patch (8.7 KB) - added by nvwd 10 years ago.
processes form submission to create draft Speaker and Session cpt
567.2.diff (10.8 KB) - added by iandunn 10 years ago.

Download all attachments as: .zip

Change History (7)

10 years ago

processes form submission to create draft Speaker and Session cpt

This ticket was mentioned in IRC in #wordpress-meta by NowellVanHoesen. View the logs.

10 years ago

#2 @iandunn
10 years ago

This is looking pretty good :)

I tested it out and made a few changes, so let me know what you think.

  • I removed the h3 headings. They made the form much more readable, but unfortunately Jetpack will strip them out whenever the organizer edits the form.
  • Jetpack also strips the id attributes when the organizer edits the form, so we have to use the ids grunion generates instead. e.g., g[post-id]-[slug]
  • I split check_call_for_speakers_for_login() into two functions. Even though at the technical implementation level, the if() / else() is elegant, it's really doing two different things at the abstract level. It's best for a function to only do one thing. Granted, the definition of "one thing" can change based on the context, but I think it keeps the code more modular and decoupled this way. Having two functions also lets us give each function a more specific and meaningful name, which helps make the code self-documenting.

10 years ago

#3 @nvwd
10 years ago


Sweet! Thank you for the feedback.

Didn't realize adding the meta was that simple.

I will have to keep populate_form_based_on_user() in mind for future reference.

If the label for "Topic(s) You'd Like to Present On" is going to change to "Topic Description" the save session function array will need to be changed also. (+1 for this change) - line 411 plugins/wordcamp-forms-to-drafts/wordcamp-forms-to-drafts.php

#4 @iandunn
9 years ago

In 1287:

WordCamp Forms to Drafts: Add handler for Call for Speakers form.

Props nvwd
See #567

#5 @iandunn
9 years ago

  • Owner set to iandunn
  • Resolution set to fixed
  • Status changed from new to closed

In 1288:

WordCamp Post Type: Insert automation triggers into Call for Speakers form.

Props nvwd
Fixes #567

Note: See TracTickets for help on using tickets.