Making WordPress.org

Changeset 4527


Ignore:
Timestamp:
12/13/2016 11:02:58 PM (10 years ago)
Author:
coreymckrill
Message:

Mentor Dashboard: fix display when camp has no start date

File:
1 edited

Legend:

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

    r4526 r4527  
    166166
    167167        foreach ( $posts as $post ) {
     168                $start_date = wcpt_get_wordcamp_start_date( $post->ID );
    168169                $email = get_post_meta( $post->ID, 'Mentor E-mail Address', true );
    169                 $camp_name = $post->post_title . ' (' . wcpt_get_wordcamp_start_date( $post->ID ) . ')';
     170
     171                $camp_name = $post->post_title;
     172
     173                if ( $start_date ) {
     174                        $camp_name .= " ($start_date)";
     175                }
    170176
    171177                if ( $email ) {
Note: See TracChangeset for help on using the changeset viewer.