Opened 10 years ago
Closed 10 years ago
#567 closed enhancement (fixed)
Automate Speaker and Session CPT creation
Reported by: | nvwd | Owned by: | iandunn |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | WordCamp Site & Plugins | Keywords: | |
Cc: |
Description
When the Call for Speaker form is submitted create a draft Speaker and Session.
Attachments (2)
Change History (7)
This ticket was mentioned in IRC in #wordpress-meta by NowellVanHoesen. View the logs.
10 years ago
#2
@
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, theif() / 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.
#3
@
10 years ago
@iandunn,
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
Note: See
TracTickets for help on using
tickets.
processes form submission to create draft Speaker and Session cpt