Making WordPress.org

Ticket #1921: 1921.2.diff

File 1921.2.diff, 19.7 KB (added by hlashbrooke, 7 years ago)

Updating from master and uncommenting conditional

  • new file wordcamp.org/public_html/wp-content/plugins/wc-post-types/views/common/session-meta-data-list.php

    diff --git wordcamp.org/public_html/wp-content/plugins/wc-post-types/views/common/session-meta-data-list.php wordcamp.org/public_html/wp-content/plugins/wc-post-types/views/common/session-meta-data-list.php
    new file mode 100644
    index 0000000..374144a
    - +  
     1<?php
     2/* @var string $speaker_text */
     3/* @var string $time_text */
     4/* @var string $tracks_text */
     5/* @var string $slides_text */
     6/* @var string $video_text */
     7/* @var string $categories_text */
     8?>
     9
     10<ul class="session-info">
     11
     12        <?php if ( $speaker_text ) : ?>
     13                <li class="session-speakers"><?php echo $speaker_text; ?></li>
     14        <?php endif; ?>
     15
     16        <?php if ( $time_text ) : ?>
     17                <li class="session-time"><?php echo $time_text; ?></li>
     18        <?php endif; ?>
     19
     20        <?php if ( $tracks_text ) : ?>
     21                <li class="session-tracks"><?php echo $tracks_text; ?></li>
     22        <?php endif; ?>
     23
     24        <?php if ( $slides_text ) : ?>
     25                <li class="session-slides"><?php echo $slides_text; ?></li>
     26        <?php endif; ?>
     27
     28        <?php if ( $video_text ) : ?>
     29                <li class="session-video"><?php echo $video_text; ?></li>
     30        <?php endif; ?>
     31
     32        <?php if ( $categories_text ) : ?>
     33                <li class="session-categories"><?php echo $categories_text; ?></li>
     34        <?php endif; ?>
     35
     36</ul>
     37 No newline at end of file
  • wordcamp.org/public_html/wp-content/plugins/wc-post-types/wc-post-types.php

    diff --git wordcamp.org/public_html/wp-content/plugins/wc-post-types/wc-post-types.php wordcamp.org/public_html/wp-content/plugins/wc-post-types/wc-post-types.php
    index 4fd6e51..0508e70 100644
     
    55 */
    66
    77require( 'inc/back-compat.php' );
    8 require_once( 'inc/favorite-schedule-shortcode.php' );
    98
    109class WordCamp_Post_Types_Plugin {
    1110        protected $wcpt_permalinks;
    class WordCamp_Post_Types_Plugin { 
    5352
    5453                add_filter( 'body_class', array( $this, 'session_category_slugs_to_body_tag' ) );
    5554
     55                add_filter( 'the_content', array( $this, 'add_session_info_to_session_posts' ) );
    5656                add_filter( 'the_content', array( $this, 'add_avatar_to_speaker_posts' ) );
    57                 add_filter( 'the_content', array( $this, 'add_speaker_info_to_session_posts' ) );
    58                 add_filter( 'the_content', array( $this, 'add_slides_info_to_session_posts' ) );
    59                 add_filter( 'the_content', array( $this, 'add_video_info_to_session_posts' ) );
    60                 add_filter( 'the_content', array( $this, 'add_session_categories_to_session_posts' ) );
    6157                add_filter( 'the_content', array( $this, 'add_session_info_to_speaker_posts' ) );
    6258
    6359                add_filter( 'dashboard_glance_items', array( $this, 'glance_items' ) );
    class WordCamp_Post_Types_Plugin { 
    514510         * @todo cleanup
    515511         */
    516512        function shortcode_schedule( $attr, $content ) {
    517                 $this->enqueue_schedule_shortcode_dependencies();
     513                $attr = shortcode_atts( array(
     514                        'date'         => null,
     515                        'tracks'       => 'all',
     516                        'speaker_link' => 'anchor', // anchor|wporg|permalink|none
     517                        'session_link' => 'permalink', // permalink|anchor|none
     518                ), $attr );
     519
     520                foreach ( array( 'tracks', 'speaker_link', 'session_link' ) as $key_for_case_sensitive_value ) {
     521                        $attr[ $key_for_case_sensitive_value ] = strtolower( $attr[ $key_for_case_sensitive_value ] );
     522                }
     523
     524                if ( ! in_array( $attr['speaker_link'], array( 'anchor', 'wporg', 'permalink', 'none' ) ) )
     525                        $attr['speaker_link'] = 'anchor';
     526
     527                if ( ! in_array( $attr['session_link'], array( 'permalink', 'anchor', 'none' ) ) )
     528                        $attr['session_link'] = 'permalink';
     529
     530                $columns = array();
     531                $tracks = array();
     532
     533                $query_args = array(
     534                        'post_type'      => 'wcb_session',
     535                        'posts_per_page' => -1,
     536                        'meta_query'     => array(
     537                                'relation'   => 'AND',
     538                                array(
     539                                        'key'     => '_wcpt_session_time',
     540                                        'compare' => 'EXISTS',
     541                                ),
     542                        ),
     543                );
     544
     545                if ( 'all' == $attr['tracks'] ) {
     546                        // Include all tracks.
     547                        $tracks = get_terms( 'wcb_track' );
     548                } else {
     549                        // Loop through given tracks and look for terms.
     550                        $terms = array_map( 'trim', explode( ',', $attr['tracks'] ) );
     551                        foreach ( $terms as $term_slug ) {
     552                                $term = get_term_by( 'slug', $term_slug, 'wcb_track' );
     553                                if ( $term )
     554                                        $tracks[ $term->term_id ] = $term;
     555                        }
     556
     557                        // If tracks were provided, restrict the lookup in WP_Query.
     558                        if ( ! empty( $tracks ) ) {
     559                                $query_args['tax_query'][] = array(
     560                                        'taxonomy' => 'wcb_track',
     561                                        'field'    => 'id',
     562                                        'terms'    => array_values( wp_list_pluck( $tracks, 'term_id' ) ),
     563                                );
     564                        }
     565                }
     566
     567                if ( $attr['date'] && strtotime( $attr['date'] ) ) {
     568                        $query_args['meta_query'][] = array(
     569                                'key'   => '_wcpt_session_time',
     570                                'value' => array(
     571                                        strtotime( $attr['date'] ),
     572                                        strtotime( $attr['date'] . ' +1 day' ),
     573                                ),
     574                                'compare' => 'BETWEEN',
     575                                'type'    => 'NUMERIC',
     576                        );
     577                }
     578
     579                // Use tracks to form the columns.
     580                if ( $tracks ) {
     581                        foreach ( $tracks as $track )
     582                                $columns[ $track->term_id ] = $track->term_id;
     583                } else {
     584                        $columns[ 0 ] = 0;
     585                }
     586
     587                unset( $tracks );
     588
     589                // Loop through all sessions and assign them into the formatted
     590                // $sessions array: $sessions[ $time ][ $track ] = $session_id
     591                // Use 0 as the track ID if no tracks exist
    518592
    519                 $attr                        = preprocess_schedule_attributes( $attr );
    520                 $tracks                      = get_schedule_tracks( $attr['tracks'] );
    521                 $tracks_explicitly_specified = 'all' !== $attr['tracks'];
    522                 $sessions                    = get_schedule_sessions( $attr['date'], $tracks_explicitly_specified, $tracks );
    523                 $columns                     = get_schedule_columns( $tracks, $sessions, $tracks_explicitly_specified );
     593                $sessions = array();
     594                $sessions_query = new WP_Query( $query_args );
     595                foreach ( $sessions_query->posts as $session ) {
     596                        $time = absint( get_post_meta( $session->ID, '_wcpt_session_time', true ) );
     597                        $tracks = get_the_terms( $session->ID, 'wcb_track' );
    524598
    525                 $html  = '<table class="wcpt-schedule" border="0">';
     599                        if ( ! isset( $sessions[ $time ] ) )
     600                                $sessions[ $time ] = array();
     601
     602                        if ( empty( $tracks ) ) {
     603                                $sessions[ $time ][ 0 ] = $session->ID;
     604                        } else {
     605                                foreach ( $tracks as $track )
     606                                        $sessions[ $time ][ $track->term_id ] = $session->ID;
     607                        }
     608                }
     609
     610                // Sort all sessions by their key (timestamp).
     611                ksort( $sessions );
     612
     613                // Remove empty columns unless tracks have been explicitly specified
     614                if ( 'all' == $attr['tracks'] ) {
     615                        $used_terms = array();
     616
     617                        foreach ( $sessions as $time => $entry )
     618                                if ( is_array( $entry ) )
     619                                        foreach ( $entry as $term_id => $session_id )
     620                                                $used_terms[ $term_id ] = $term_id;
     621
     622                        $columns = array_intersect( $columns, $used_terms );
     623                        unset( $used_terms );
     624                }
     625
     626                $html = '<table class="wcpt-schedule" border="0">';
    526627                $html .= '<thead>';
    527628                $html .= '<tr>';
    528629
    class WordCamp_Post_Types_Plugin { 
    613714                                $classes[] = 'wcpt-session-type-' . $session_type;
    614715                                $classes[] = 'wcb-session-' . $session->post_name;
    615716
    616                                 // Favourite session star-icon.
    617                                 $content = '<div class="wcb-session-favourite-icon">';
    618                                 $content .= '<a class="fav-session-button"><span class="dashicons dashicons-star-filled"></span></a></div>';
    619                                 $content .= '<div class="wcb-session-cell-content">';
    620 
    621717                                // Determine the session title
    622718                                if ( 'permalink' == $attr['session_link'] && 'session' == $session_type )
    623719                                        $session_title_html = sprintf( '<a class="wcpt-session-title" href="%s">%s</a>', esc_url( get_permalink( $session->ID ) ), $session_title );
    class WordCamp_Post_Types_Plugin { 
    626722                                else
    627723                                        $session_title_html = sprintf( '<span class="wcpt-session-title">%s</span>', $session_title );
    628724
    629                                 $content .= $session_title_html;
     725                                $content = $session_title_html;
    630726
    631727                                $speakers_names = array();
    632728                                foreach ( $speakers as $speaker ) {
    class WordCamp_Post_Types_Plugin { 
    649745                                if ( count( $speakers_names ) )
    650746                                        $content .= sprintf( ' <span class="wcpt-session-speakers">%s</span>', implode( ', ', $speakers_names ) );
    651747
    652                                 // End of cell-content.
    653                                 $content .= '</div>';
    654 
    655748                                $columns_clone = $columns;
    656749
    657750                                // If the next element in the table is the same as the current one, use colspan
    class WordCamp_Post_Types_Plugin { 
    669762                                        }
    670763                                }
    671764
    672                                 $columns_html .= sprintf( '<td colspan="%d" class="%s" data-track-title="%s" data-session-id="%s">%s</td>', $colspan, esc_attr( implode( ' ', $classes ) ), $session_track_titles, esc_attr( $session->ID ), $content );
     765                                $columns_html .= sprintf( '<td colspan="%d" class="%s" data-track-title="%s">%s</td>', $colspan, esc_attr( implode( ' ', $classes ) ), $session_track_titles, $content );
    673766                        }
    674767
    675768                        $global_session      = $colspan == count( $columns ) ? ' global-session' : '';
    class WordCamp_Post_Types_Plugin { 
    683776
    684777                $html .= '</tbody>';
    685778                $html .= '</table>';
    686                 $html .= $this->fav_session_email_form();
    687779                return $html;
    688780        }
    689781
    690782        /**
    691          * Enqueue style and scripts needed for [schedule] shortcode.
    692          */
    693         function enqueue_schedule_shortcode_dependencies() {
    694                 wp_enqueue_style( 'dashicons' );
    695 
    696                 wp_enqueue_script(
    697                         'favourite-sessions',
    698                         plugin_dir_url( __FILE__ ) . 'js/favourite-sessions.js',
    699                         array( 'jquery' ),
    700                         filemtime( plugin_dir_path( __FILE__ ) . 'js/favourite-sessions.js' ),
    701                         true
    702                 );
    703 
    704                 wp_localize_script(
    705                         'favourite-sessions',
    706                         'favSessionsPhpObject',
    707                         array(
    708                                 'root' => esc_url_raw( rest_url() ),
    709                                 'i18n' => array(
    710                                         'reqTimeOut' => esc_html__( 'Sorry, the email request timed out.', 'wordcamporg' ),
    711                                         'otherError' => esc_html__( 'Sorry, the email request failed.',    'wordcamporg' ),
    712                                 ),
    713                         )
    714                 );
    715         }
    716 
    717         /**
    718          * Return HTML code for email form used to send/share favourite sessions over email.
    719          *
    720          * Both form and button/link to show/hide the form can be styled using classes email-form
    721          * and show-email-form, respectively.
    722          *
    723          * @return string HTML code that represents the form to send emails and a link to show and hide it.
    724          */
    725         function fav_session_email_form() {
    726                 static $email_form_count = 0;
    727 
    728                 // Skip email form if it is disabled or it was already added to document.
    729                 if ( email_fav_sessions_disabled() || $email_form_count !== 0 ) {
    730                         return '';
    731                 }
    732 
    733                 ob_start();
    734                 ?>
    735 
    736                 <div class="email-form fav-session-email-form-hide">
    737                         <div id="fav-session-email-form">
    738                                 <?php esc_html_e( 'Send me my favorite sessions:', 'wordcamporg' ); ?>
    739 
    740                                 <form id="fav-sessions-form">
    741                                         <input type="text" name="email_address" id="fav-sessions-email-address" placeholder="my@email.com" />
    742                                         <input type="submit" value="<?php esc_attr_e( 'Send', 'wordcamporg' ); ?>" />
    743                                 </form>
    744                         </div>
    745                         <div class="fav-session-email-wait-spinner"></div>
    746                         <div class="fav-session-email-result"></div>
    747                 </div>
    748 
    749                 <a class="show-email-form" href="javascript:">
    750                         <span class="dashicons dashicons-star-filled"></span>
    751                         <span class="dashicons dashicons-email-alt"></span>
    752                 </a>
    753 
    754                 <?php
    755                 $email_form = ob_get_clean();
    756 
    757                 $email_form_count++;
    758 
    759                 return $email_form;
    760         }
    761 
    762         /**
    763783         * Returns a speaker's WordPress.org profile url (if username set)
    764784         *
    765785         * @param $speaker_id int The speaker's post id.
    766          *
    767          * @return NULL|string
    768786         */
    769787        function get_speaker_wporg_permalink( $speaker_id ) {
    770788                $post = get_post( $speaker_id );
    class WordCamp_Post_Types_Plugin { 
    12471265        }
    12481266
    12491267        /**
    1250          * Add speaker information to Session posts
     1268         * Add session information to Session posts
    12511269         *
    12521270         * We don't enable it for sites that were created before it was committed, because some will have already
    12531271         * crafted the bio to include this content, so duplicating it would look wrong, but we still allow older
    class WordCamp_Post_Types_Plugin { 
    12571275         *
    12581276         * @return string
    12591277         */
    1260         function add_speaker_info_to_session_posts( $content ) {
     1278        function add_session_info_to_session_posts( $content ) {
    12611279                global $post;
    12621280                $enabled_site_ids = apply_filters( 'wcpt_session_post_speaker_info_enabled_site_ids', array( 364 ) );    // 2014.sf
    12631281
    class WordCamp_Post_Types_Plugin { 
    12701288                        return $content;
    12711289                }
    12721290
     1291                // Get the list of speakers
    12731292                $speaker_ids = (array) get_post_meta( $post->ID, '_wcpt_speaker_id' );
    1274 
    1275                 if ( empty ( $speaker_ids ) ) {
    1276                         return $content;
    1277                 }
    1278 
    12791293                $speaker_args = array(
    12801294                        'post_type'      => 'wcb_speaker',
    12811295                        'posts_per_page' => -1,
    class WordCamp_Post_Types_Plugin { 
    12861300
    12871301                $speakers = new WP_Query( $speaker_args );
    12881302
    1289                 if ( ! $speakers->have_posts() ) {
    1290                         return $content;
    1291                 }
    1292 
    1293                 $speakers_html = sprintf(
    1294                         '<h2 class="session-speakers">%s</h2>',
    1295                         _n(
    1296                                 __( 'Speaker', 'wordcamporg' ),
    1297                                 __( 'Speakers', 'wordcamporg' ),
    1298                                 $speakers->post_count
    1299                         )
     1303                $speaker_text = _n(
     1304                        __( 'Speaker', 'wordcamporg' ),
     1305                        __( 'Speakers', 'wordcamporg' ),
     1306                        $speakers->post_count,
     1307                        'wordcamporg'
    13001308                );
    13011309
    1302                 $speakers_html .= '<ul id="session-speaker-names">';
     1310                $speakers_array = array();
    13031311                while ( $speakers->have_posts() ) {
    13041312                        $speakers->the_post();
    1305                         $speakers_html .= sprintf( '<li><a href="%s">%s</a></li>', get_the_permalink(), get_the_title() );
     1313                        $speakers_array[] = sprintf( '<a href="%s">%s</a>', get_the_permalink(), get_the_title() );
    13061314                }
    1307                 $speakers_html .= '</ul>';
    13081315
    13091316                wp_reset_postdata();
    13101317
    1311                 return $content . $speakers_html;
    1312         }
    1313 
    1314         /**
    1315          * Add Slides link to Session posts
    1316          *
    1317          * We don't enable it for sites that were created before it was committed, because some will have already
    1318          * crafted the session to include this content, so duplicating it would look wrong, but we still allow older
    1319          * sites to opt-in.
    1320          *
    1321          * @param string $content
    1322          *
    1323          * @return string
    1324          */
    1325         function add_slides_info_to_session_posts( $content ) {
    1326                 global $post;
    1327                 $enabled_site_ids = apply_filters( 'wcpt_session_post_slides_info_enabled_site_ids', array(
    1328                         206,  // testing.wordcamp.org
    1329                         648,  // 2016.asheville
    1330                         651,  // 2016.kansascity
    1331                         623,  // 2016.tampa
    1332                 ) );
    1333 
    1334                 if ( ! $this->is_single_cpt_post( 'wcb_session' ) ) {
    1335                         return $content;
     1318                $speakers_list = join( ', ', $speakers_array );
     1319                if( $speakers_list ) {
     1320                        $speaker_text .= ': ' . $speakers_list;
     1321                } else {
     1322                        $speaker_text = '';
    13361323                }
    13371324
    1338                 $site_id = get_current_blog_id();
    1339                 if ( $site_id <= apply_filters( 'wcpt_session_post_slides_info_min_site_id', 699 ) && ! in_array( $site_id, $enabled_site_ids ) ) {
    1340                         return $content;
    1341                 }
     1325                // Get the time and date of the session
     1326                $time = absint( get_post_meta( $post->ID, '_wcpt_session_time', true ) );
     1327                $time_text = '';
     1328                if( $time ) {
     1329                        $time_format = get_option( 'time_format', 'g:i a' );
     1330                        $date_format = get_option( 'date_format', 'F j, Y' );
    13421331
    1343                 $session_slides = get_post_meta( $post->ID, '_wcpt_session_slides', true );
     1332                        $time_string = esc_html( date( $time_format, $time ) );
     1333                        $date_string = esc_html( date( $date_format, $time ) );
    13441334
    1345                 if ( empty ( $session_slides ) ) {
    1346                         return $content;
     1335                        $time_text = __( 'Time', 'wordcamporg' ) . ': ' . $date_string . ' @ ' . $time_string . '</li>';
    13471336                }
    13481337
    1349                 $session_slides_html  = '<div class="session-video">';
    1350                 $session_slides_html .= sprintf( __( '<a href="%s" target="_blank">View Session Slides</a>', 'wordcamporg' ), esc_url( $session_slides ) );
    1351                 $session_slides_html .= '</div>';
     1338                //  Get a list of the session tracks
     1339                $tracks = get_the_terms( $post->ID, 'wcb_track' );
     1340                $tracks_array = array();
     1341                foreach ( $tracks as $track ) {
     1342                        $tracks_array[] = $track->name;
     1343                }
    13521344
    1353                 return $content . $session_slides_html;
    1354         }
     1345                $num_tracks = count ( $tracks_array );
     1346                $tracks_text = '';
     1347                if( $num_tracks ) {
    13551348
    1356         /**
    1357          * Add Video link to Session posts
    1358          *
    1359          * We don't enable it for sites that were created before it was committed, because some will have already
    1360          * crafted the session to include this content, so duplicating it would look wrong, but we still allow older
    1361          * sites to opt-in.
    1362          *
    1363          * @param string $content
    1364          *
    1365          * @return string
    1366          */
    1367         function add_video_info_to_session_posts( $content ) {
    1368                 global $post;
    1369                 $enabled_site_ids = apply_filters( 'wcpt_session_post_video_info_enabled_site_ids', array(
    1370                         206,  // testing.wordcamp.org
    1371                         648,  // 2016.asheville
    1372                         623,  // 2016.tampa
    1373                 ) );
     1349                        $tracks_text = _n(
     1350                                __( 'Track', 'wordcamporg' ),
     1351                                __( 'Tracks', 'wordcamporg' ),
     1352                                $num_tracks,
     1353                                'wordcamporg'
     1354                        );
    13741355
    1375                 if ( ! $this->is_single_cpt_post( 'wcb_session' ) ) {
    1376                         return $content;
     1356                        $tracks_list = join( ", ", $tracks_array );
     1357                        $tracks_text .= ': ' . $tracks_list . '</li>';
    13771358                }
    13781359
    1379                 $site_id = get_current_blog_id();
    1380                 if ( $site_id <= apply_filters( 'wcpt_session_post_video_info_min_site_id', 699 ) && ! in_array( $site_id, $enabled_site_ids ) ) {
    1381                         return $content;
     1360                // Get the link to the session slides
     1361                $session_slides = get_post_meta( $post->ID, '_wcpt_session_slides', true );
     1362                $slides_text = '';
     1363                if ( $session_slides ) {
     1364                        $slides_text = sprintf( __( '<a href="%s" target="_blank">View Session Slides</a>', 'wordcamporg' ), esc_url( $session_slides ) );
    13821365                }
    13831366
     1367                // Get the link to the session video
    13841368                $session_video = get_post_meta( $post->ID, '_wcpt_session_video', true );
    1385 
    1386                 if ( empty ( $session_video ) ) {
    1387                         return $content;
     1369                $video_text = '';
     1370                if( $session_video ) {
     1371                        $video_text = sprintf( __( '<a href="%s" target="_blank">View Session Video</a>', 'wordcamporg' ), esc_url( $session_video ) );
    13881372                }
    13891373
    1390                 $session_video_html  = '<div class="session-video">';
    1391                 $session_video_html .= sprintf( __( '<a href="%s" target="_blank">View Session Video</a>', 'wordcamporg' ), esc_url( $session_video ) );
    1392                 $session_video_html .= '</div>';
    1393 
    1394                 return $content . $session_video_html;
    1395         }
    1396 
    1397         /**
    1398          * Append a session's categories to its post content.
    1399          *
    1400          * @param string $content
    1401          *
    1402          * @return string
    1403          */
    1404         function add_session_categories_to_session_posts( $content ) {
    1405                 global $post;
    1406 
    1407                 if ( ! $this->is_single_cpt_post( 'wcb_session' ) ) {
    1408                         return $content;
     1374                // Get the list of session categories
     1375                $categories_list = get_the_term_list( $post->ID, 'wcb_session_category', '', _x( ', ', 'Used between list items, there is a space after the comma.', 'wordcamporg' ) );
     1376                $categories_text = '';
     1377                if ( $categories_list ) {
     1378                        $num_categories = count( explode( ', ', $categories_list ) );
     1379                        $categories_text = _n(
     1380                                __( 'Category', 'wordcamporg' ),
     1381                                __( 'Categories', 'wordcamporg' ),
     1382                                $num_categories,
     1383                                'wordcamporg'
     1384                        );
     1385                        $categories_text .= ': ' . $categories_list;
    14091386                }
    14101387
    1411                 $session_categories_html = '';
    1412 
    1413                 $session_categories_list = get_the_term_list( $post->ID, 'wcb_session_category', '', _x( ', ', 'Used between list items, there is a space after the comma.', 'wordcamporg' ) );
    1414                 if ( $session_categories_list ) {
    1415                         $session_categories_html = sprintf(
    1416                                 '<span class="session-categories-links"><span class="screen-reader-text">%1$s</span> %2$s</span>',
    1417                                 esc_html_x( 'Categories', 'Used before session category names.', 'wordcamporg' ),
    1418                                 wp_kses_post( $session_categories_list )
    1419                         );
     1388                // Generate meta list for display
     1389                $meta_html = '';
     1390                if( $speaker_text || $time_text || $tracks_text || $slides_text || $video_text || $categories_text ) {
     1391                        ob_start();
     1392                        require_once( __DIR__ . '/views/common/session-meta-data-list.php' );
     1393                        $meta_html = ob_get_clean();
    14201394                }
    14211395
    1422                 return $content . $session_categories_html;
     1396                // Append meta list to the end of the content
     1397                return $content . $meta_html;
    14231398        }
    14241399
     1400
    14251401        /**
    14261402         * Add the sessions's category slugs to the body tag.
    14271403         *
    class WordCamp_Post_Types_Plugin { 
    18071783        }
    18081784
    18091785        /**
     1786         * Display the indicator that marks a form field as required
     1787         */
     1788        function render_form_field_required_indicator() {
     1789                require( __DIR__ . '/views/common/form-field-required-indicator.php' );
     1790        }
     1791
     1792        /**
    18101793         * Fired when a post is saved, makes sure additional metadata is also updated.
    18111794         */
    18121795        function save_post_speaker( $post_id, $post ) {