Making WordPress.org


Ignore:
Timestamp:
08/17/2018 09:32:41 AM (8 years ago)
Author:
vedjain
Message:

WordCamp: Multiple changes to Meetup Application.

  1. Make styling more consistent of Meetup Application with WordCamp Application.
  2. Added more statuses and tags. Specifically, added checkboxes for statuses like Needs Swag, Needs Orientation etc, which will add a tag for easy filtering.
  3. Added tag column in Meetup listing view.
  4. Add different questions for Meetup location and for organizer's mailing address.
  5. Street address, state and zip code fields are optional.
  6. Added log box for tracking tag changes.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-functions.php

    r7607 r7619  
    6666    $entries = wcpt_get_log_entries( $post->ID );
    6767
    68     require_once( __DIR__ . '/views/common/metabox-log.php' );
     68    require( __DIR__ . '/views/common/metabox-log.php' );
    6969}
    7070
     
    8787
    8888    foreach ( array( 'note' => $private_notes, 'status_change' => $status_changes ) as $entry_type => $raw_entries ) {
    89         foreach ( $raw_entries as $entry ) {
    90             $user = get_user_by( 'id', $entry['user_id'] );
     89        $entries = array_merge( process_raw_entries( $raw_entries, $entry_type ), $entries );
     90    }
    9191
    92             if ( $user ) {
    93                 $entry['user_display_name'] = $user->display_name;
    94             } else {
    95                 // Assume that the action was performed during a cron job
    96                 $entry['user_display_name'] = 'WordCamp Bot';
    97             }
     92    return $entries;
     93}
    9894
    99             $entry['type'] = $entry_type;
     95/**
     96 * Add displayable data to raw entries
     97 *
     98 * @param array $raw_entries
     99 * @param string $entry_type Type of entry
     100 *
     101 * @return array
     102 */
     103function process_raw_entries ( $raw_entries, $entry_type ) {
     104    $entries = array();
     105    foreach ( $raw_entries as $entry ) {
     106        $user = get_user_by( 'id', $entry['user_id'] );
    100107
    101             $entries[] = $entry;
     108        if ( $user ) {
     109            $entry['user_display_name'] = $user->display_name;
     110        } else {
     111            // Assume that the action was performed during a cron job
     112            $entry['user_display_name'] = 'WordCamp Bot';
    102113        }
     114
     115        $entry['type'] = $entry_type;
     116
     117        $entries[] = $entry;
    103118    }
    104119
Note: See TracChangeset for help on using the changeset viewer.