Making WordPress.org


Ignore:
Timestamp:
05/12/2016 08:02:37 PM (8 years ago)
Author:
iandunn
Message:

WordCamp Post Type: Set WordCamp posts to Closed after the event is over.

File:
1 edited

Legend:

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

    r2898 r3126  
    112112            $user = get_user_by( 'id', $entry['user_id'] );
    113113
     114            if ( $user ) {
     115                $entry['user_display_name'] = $user->display_name;
     116            } else {
     117                // Assume that the action was performed during a cron job
     118                $entry['user_display_name'] = 'WordCamp Bot';
     119            }
     120
    114121            $entry['type']              = $entry_type;
    115             $entry['user_display_name'] = $user->display_name;
     122            // todo realign
    116123
    117124            $entries[] = $entry;
Note: See TracChangeset for help on using the changeset viewer.