Changeset 4363
- Timestamp:
- 11/15/2016 08:49:18 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/includes/indesign-badges.php
r4362 r4363 254 254 255 255 foreach ( $questions as $question ) { 256 $row[ "question-{$question->ID}" ] = isset( $answers[ $question->ID ] ) ? $answers[ $question->ID ] : '';256 $row[ "question-{$question->ID}" ] = get_answer( $question, $answers ); 257 257 } 258 258 … … 325 325 326 326 /** 327 * Get an attendee's answer to a question 328 * 329 * @param \WP_Post $question 330 * @param array $answers 331 * 332 * @return string 333 */ 334 function get_answer( $question, $answers ) { 335 if ( ! isset( $answers[ $question->ID ] ) ) { 336 return ''; 337 } 338 339 $answer = $answers[ $question->ID ]; 340 341 if ( is_array( $answer ) ) { 342 $answer = implode( ', ', $answer ); 343 } 344 345 return $answer; 346 } 347 348 /** 327 349 * Create a Zip file with all of the assets 328 350 *
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)