<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[1537] sites/trunk/wordcamp.org/public_html/wp-content/plugins/wc-post-types/wc-post-types.php: WordCamp Post Types: Align syntax markers to improve readability.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="http://meta.trac.wordpress.org/changeset/1537">1537</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"http://meta.trac.wordpress.org/changeset/1537","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>iandunn</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2015-05-04 18:51:50 +0000 (Mon, 04 May 2015)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>WordCamp Post Types: Align syntax markers to improve readability.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginswcposttypeswcposttypesphp">sites/trunk/wordcamp.org/public_html/wp-content/plugins/wc-post-types/wc-post-types.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginswcposttypeswcposttypesphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordcamp.org/public_html/wp-content/plugins/wc-post-types/wc-post-types.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/public_html/wp-content/plugins/wc-post-types/wc-post-types.php 2015-05-03 22:26:33 UTC (rev 1536)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/wc-post-types/wc-post-types.php 2015-05-04 18:51:50 UTC (rev 1537)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -183,13 +183,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $query->set( 'meta_query', array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'relation' => 'OR',
</span><span class="cx" style="display: block; padding: 0 10px"> array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'key' => '_wcpt_session_time',
- 'value' => '',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'key' => '_wcpt_session_time',
+ 'value' => '',
</ins><span class="cx" style="display: block; padding: 0 10px"> 'compare' => 'EXISTS',
</span><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'key' => '_wcpt_session_time',
- 'value' => '',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'key' => '_wcpt_session_time',
+ 'value' => '',
</ins><span class="cx" style="display: block; padding: 0 10px"> 'compare' => 'NOT EXISTS',
</span><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -267,19 +267,19 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Prepare the shortcode arguments
</span><span class="cx" style="display: block; padding: 0 10px"> $attr = shortcode_atts( array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'show_avatars' => true,
- 'avatar_size' => 100,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'show_avatars' => true,
+ 'avatar_size' => 100,
</ins><span class="cx" style="display: block; padding: 0 10px"> 'posts_per_page' => -1,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'orderby' => 'date',
- 'order' => 'desc',
- 'track' => 'all',
- 'speaker_link' => '',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'orderby' => 'date',
+ 'order' => 'desc',
+ 'track' => 'all',
+ 'speaker_link' => '',
</ins><span class="cx" style="display: block; padding: 0 10px"> ), $attr );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $attr['show_avatars'] = $this->str_to_bool( $attr['show_avatars'] );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $attr['orderby'] = ( in_array( $attr['orderby'], array( 'date', 'title', 'rand' ) ) ) ? $attr['orderby'] : 'date';
- $attr['order'] = ( in_array( $attr['order'], array( 'asc', 'desc') ) ) ? $attr['order'] : 'desc';
- $attr['speaker_link'] = ( in_array( $attr['speaker_link'], array( 'permalink' ) ) ) ? $attr['speaker_link'] : '';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $attr['orderby'] = ( in_array( $attr['orderby'], array( 'date', 'title', 'rand' ) ) ) ? $attr['orderby'] : 'date';
+ $attr['order'] = ( in_array( $attr['order'], array( 'asc', 'desc' ) ) ) ? $attr['order'] : 'desc';
+ $attr['speaker_link'] = ( in_array( $attr['speaker_link'], array( 'permalink' ) ) ) ? $attr['speaker_link'] : '';
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /*
</span><span class="cx" style="display: block; padding: 0 10px"> * Only allow 2014.capetown to use the new track attribute
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -333,10 +333,10 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Fetch all specified speakers
</span><span class="cx" style="display: block; padding: 0 10px"> $speaker_args = array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'post_type' => 'wcb_speaker',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'post_type' => 'wcb_speaker',
</ins><span class="cx" style="display: block; padding: 0 10px"> 'posts_per_page' => intval( $attr['posts_per_page'] ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'orderby' => $attr['orderby'],
- 'order' => $attr['order'],
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'orderby' => $attr['orderby'],
+ 'order' => $attr['order'],
</ins><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 'all' != $attr['track'] ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -398,10 +398,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function shortcode_organizers( $attr, $content ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $attr = shortcode_atts( array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'show_avatars' => true,
- 'avatar_size' => 100,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'show_avatars' => true,
+ 'avatar_size' => 100,
</ins><span class="cx" style="display: block; padding: 0 10px"> 'posts_per_page' => -1,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'orderby' => 'date',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'orderby' => 'date',
</ins><span class="cx" style="display: block; padding: 0 10px"> ), $attr );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $attr['show_avatars'] = $this->str_to_bool( $attr['show_avatars'] );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -451,8 +451,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function shortcode_schedule( $attr, $content ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $attr = shortcode_atts( array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'date' => null,
- 'tracks' => 'all',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'date' => null,
+ 'tracks' => 'all',
</ins><span class="cx" style="display: block; padding: 0 10px"> 'speaker_link' => 'anchor', // anchor|wporg|permalink|none
</span><span class="cx" style="display: block; padding: 0 10px"> 'session_link' => 'permalink', // permalink|anchor|none
</span><span class="cx" style="display: block; padding: 0 10px"> ), $attr );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -467,12 +467,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $tracks = array();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $query_args = array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'post_type' => 'wcb_session',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'post_type' => 'wcb_session',
</ins><span class="cx" style="display: block; padding: 0 10px"> 'posts_per_page' => -1,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'meta_query' => array(
- 'relation' => 'AND',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'meta_query' => array(
+ 'relation' => 'AND',
</ins><span class="cx" style="display: block; padding: 0 10px"> array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'key' => '_wcpt_session_time',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'key' => '_wcpt_session_time',
</ins><span class="cx" style="display: block; padding: 0 10px"> 'compare' => 'EXISTS',
</span><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -494,21 +494,21 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! empty( $tracks ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $query_args['tax_query'][] = array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'taxonomy' => 'wcb_track',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'field' => 'id',
- 'terms' => array_values( wp_list_pluck( $tracks, 'term_id' ) ),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'field' => 'id',
+ 'terms' => array_values( wp_list_pluck( $tracks, 'term_id' ) ),
</ins><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $attr['date'] && strtotime( $attr['date'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $query_args['meta_query'][] = array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'key' => '_wcpt_session_time',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'key' => '_wcpt_session_time',
</ins><span class="cx" style="display: block; padding: 0 10px"> 'value' => array(
</span><span class="cx" style="display: block; padding: 0 10px"> strtotime( $attr['date'] ),
</span><span class="cx" style="display: block; padding: 0 10px"> strtotime( $attr['date'] . ' +1 day' ),
</span><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'compare' => 'BETWEEN',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'type' => 'NUMERIC',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'type' => 'NUMERIC',
</ins><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -607,13 +607,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Gather relevant data about the session
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $colspan = 1;
- $classes = array();
- $session = get_post( $entry[ $term_id ] );
- $session_title = apply_filters( 'the_title', $session->post_title );
- $session_tracks = get_the_terms( $session->ID, 'wcb_track' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $colspan = 1;
+ $classes = array();
+ $session = get_post( $entry[ $term_id ] );
+ $session_title = apply_filters( 'the_title', $session->post_title );
+ $session_tracks = get_the_terms( $session->ID, 'wcb_track' );
</ins><span class="cx" style="display: block; padding: 0 10px"> $session_track_titles = implode( ', ', wp_list_pluck( $session_tracks, 'name' ) ); // todo implode(): Invalid arguments passed in wc-post-types.php on line 612
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $session_type = get_post_meta( $session->ID, '_wcpt_session_type', true );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $session_type = get_post_meta( $session->ID, '_wcpt_session_type', true );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! in_array( $session_type, array( 'session', 'custom' ) ) )
</span><span class="cx" style="display: block; padding: 0 10px"> $session_type = 'session';
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -694,7 +694,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $columns_html .= sprintf( '<td colspan="%d" class="%s" data-track-title="%s">%s</td>', $colspan, esc_attr( implode( ' ', $classes ) ), $session_track_titles, $content );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $global_session = $colspan == count( $columns ) ? ' global-session' : '';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $global_session = $colspan == count( $columns ) ? ' global-session' : '';
</ins><span class="cx" style="display: block; padding: 0 10px"> $global_session_slug = $global_session ? ' ' . sanitize_html_class( sanitize_title_with_dashes( $session->post_title ) ) : '';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $html .= sprintf( '<tr class="%s">', sanitize_html_class( 'wcpt-time-' . date( $time_format, $time ) ) . $global_session . $global_session_slug );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -833,15 +833,15 @@
</span><span class="cx" style="display: block; padding: 0 10px"> global $post;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $attr = shortcode_atts( array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'date' => null,
- 'show_meta' => false,
- 'show_avatars' => false,
- 'avatar_size' => 100,
- 'track' => 'all',
- 'speaker_link' => 'wporg', // anchor|wporg|permalink|none
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'date' => null,
+ 'show_meta' => false,
+ 'show_avatars' => false,
+ 'avatar_size' => 100,
+ 'track' => 'all',
+ 'speaker_link' => 'wporg', // anchor|wporg|permalink|none
</ins><span class="cx" style="display: block; padding: 0 10px"> 'posts_per_page' => -1,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'orderby' => 'date', // date|title|rand
- 'order' => 'desc', // asc|desc
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'orderby' => 'date', // date|title|rand
+ 'order' => 'desc', // asc|desc
</ins><span class="cx" style="display: block; padding: 0 10px"> ), $attr );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Convert bools to real booleans.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -862,11 +862,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $args = array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'post_type' => 'wcb_session',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'post_type' => 'wcb_session',
</ins><span class="cx" style="display: block; padding: 0 10px"> 'posts_per_page' => intval( $attr['posts_per_page'] ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'tax_query' => array(),
- 'orderby' => $attr['orderby'],
- 'order' => $attr['order'],
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'tax_query' => array(),
+ 'orderby' => $attr['orderby'],
+ 'order' => $attr['order'],
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Only ones marked "session" or where the meta key does
</span><span class="cx" style="display: block; padding: 0 10px"> // not exist, for backwards compatibility.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -906,8 +906,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 'all' != $attr['track'] ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $args['tax_query'][] = array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'taxonomy' => 'wcb_track',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'field' => 'slug',
- 'terms' => $attr['track'],
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'field' => 'slug',
+ 'terms' => $attr['track'],
</ins><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -934,9 +934,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $speakers_ids = array_map( 'absint', (array) get_post_meta( get_the_ID(), '_wcpt_speaker_id' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! empty( $speakers_ids ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $speakers = get_posts( array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'post_type' => 'wcb_speaker',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'post_type' => 'wcb_speaker',
</ins><span class="cx" style="display: block; padding: 0 10px"> 'posts_per_page' => -1,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'post__in' => $speakers_ids,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'post__in' => $speakers_ids,
</ins><span class="cx" style="display: block; padding: 0 10px"> ) );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1028,11 +1028,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <?php foreach ( $terms as $term ) : ?>
</span><span class="cx" style="display: block; padding: 0 10px"> <?php
</span><span class="cx" style="display: block; padding: 0 10px"> $sponsors = new WP_Query( array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'post_type' => 'wcb_sponsor',
- 'order' => 'ASC',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'post_type' => 'wcb_sponsor',
+ 'order' => 'ASC',
</ins><span class="cx" style="display: block; padding: 0 10px"> 'posts_per_page' => -1,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'taxonomy' => $term->taxonomy,
- 'term' => $term->slug,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'taxonomy' => $term->taxonomy,
+ 'term' => $term->slug,
</ins><span class="cx" style="display: block; padding: 0 10px"> ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! $sponsors->have_posts() )
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1249,11 +1249,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Fired during add_meta_boxes, adds extra meta boxes to our custom post types.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function add_meta_boxes() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- add_meta_box( 'speaker-info', __( 'Speaker Info', 'wordcamporg' ), array( $this, 'metabox_speaker_info' ), 'wcb_speaker', 'side' );
- add_meta_box( 'organizer-info', __( 'Organizer Info', 'wordcamporg' ), array( $this, 'metabox_organizer_info' ), 'wcb_organizer', 'side' );
- add_meta_box( 'speakers-list', __( 'Speakers', 'wordcamporg' ), array( $this, 'metabox_speakers_list' ), 'wcb_session', 'side' );
- add_meta_box( 'session-info', __( 'Session Info', 'wordcamporg' ), array( $this, 'metabox_session_info' ), 'wcb_session', 'side' );
- add_meta_box( 'sponsor-info', __( 'Sponsor Info', 'wordcampbase' ), array( $this, 'metabox_sponsor_info' ), 'wcb_sponsor', 'side' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ add_meta_box( 'speaker-info', __( 'Speaker Info', 'wordcamporg' ), array( $this, 'metabox_speaker_info' ), 'wcb_speaker', 'side' );
+ add_meta_box( 'organizer-info', __( 'Organizer Info', 'wordcamporg' ), array( $this, 'metabox_organizer_info' ), 'wcb_organizer', 'side' );
+ add_meta_box( 'speakers-list', __( 'Speakers', 'wordcamporg' ), array( $this, 'metabox_speakers_list' ), 'wcb_session', 'side' );
+ add_meta_box( 'session-info', __( 'Session Info', 'wordcamporg' ), array( $this, 'metabox_session_info' ), 'wcb_session', 'side' );
+ add_meta_box( 'sponsor-info', __( 'Sponsor Info', 'wordcampbase' ), array( $this, 'metabox_sponsor_info' ), 'wcb_sponsor', 'side' );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1264,12 +1264,15 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $email = get_post_meta( $post->ID, '_wcb_speaker_email', true );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $wporg_username = '';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $user_id = get_post_meta( $post->ID, '_wcpt_user_id', true );
- $wporg_user = get_user_by( 'id', $user_id );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user_id = get_post_meta( $post->ID, '_wcpt_user_id', true );
+ $wporg_user = get_user_by( 'id', $user_id );
+
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( $wporg_user )
</span><span class="cx" style="display: block; padding: 0 10px"> $wporg_username = $wporg_user->user_nicename;
</span><span class="cx" style="display: block; padding: 0 10px"> ?>
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> <?php wp_nonce_field( 'edit-speaker-info', 'wcpt-meta-speaker-info' ); ?>
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> <p>
</span><span class="cx" style="display: block; padding: 0 10px"> <label for="wcpt-gravatar-email"><?php _e( 'Gravatar Email:', 'wordcamporg' ); ?></label>
</span><span class="cx" style="display: block; padding: 0 10px"> <input type="text" class="widefat" id="wcpt-gravatar-email" name="wcpt-gravatar-email" value="<?php echo esc_attr( $email ); ?>" />
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1279,6 +1282,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <label for="wcpt-wporg-username"><?php _e( 'WordPress.org Username:', 'wordcamporg' ); ?></label>
</span><span class="cx" style="display: block; padding: 0 10px"> <input type="text" class="widefat" id="wcpt-wporg-username" name="wcpt-wporg-username" value="<?php echo esc_attr( $wporg_username ); ?>" />
</span><span class="cx" style="display: block; padding: 0 10px"> </p>
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> <?php
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1289,16 +1293,20 @@
</span><span class="cx" style="display: block; padding: 0 10px"> global $post;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $wporg_username = '';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $user_id = get_post_meta( $post->ID, '_wcpt_user_id', true );
- $wporg_user = get_user_by( 'id', $user_id );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user_id = get_post_meta( $post->ID, '_wcpt_user_id', true );
+ $wporg_user = get_user_by( 'id', $user_id );
+
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( $wporg_user )
</span><span class="cx" style="display: block; padding: 0 10px"> $wporg_username = $wporg_user->user_nicename;
</span><span class="cx" style="display: block; padding: 0 10px"> ?>
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> <?php wp_nonce_field( 'edit-organizer-info', 'wcpt-meta-organizer-info' ); ?>
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> <p>
</span><span class="cx" style="display: block; padding: 0 10px"> <label for="wcpt-wporg-username"><?php _e( 'WordPress.org Username:', 'wordcamporg' ); ?></label>
</span><span class="cx" style="display: block; padding: 0 10px"> <input type="text" class="widefat" id="wcpt-wporg-username" name="wcpt-wporg-username" value="<?php echo esc_attr( $wporg_username ); ?>" />
</span><span class="cx" style="display: block; padding: 0 10px"> </p>
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> <?php
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1310,10 +1318,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $speakers = get_post_meta( $post->ID, '_wcb_session_speakers', true );
</span><span class="cx" style="display: block; padding: 0 10px"> wp_enqueue_script( 'jquery-ui-autocomplete' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $speakers_names = array();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $speakers_names = array();
</ins><span class="cx" style="display: block; padding: 0 10px"> $speakers_objects = get_posts( array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'post_type' => 'wcb_speaker',
- 'post_status' => 'publish',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'post_type' => 'wcb_speaker',
+ 'post_status' => 'publish',
</ins><span class="cx" style="display: block; padding: 0 10px"> 'posts_per_page' => -1,
</span><span class="cx" style="display: block; padding: 0 10px"> ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1322,10 +1330,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $speakers_names[] = $speaker_object->post_title;
</span><span class="cx" style="display: block; padding: 0 10px"> $speakers_names_first = array_pop( $speakers_names );
</span><span class="cx" style="display: block; padding: 0 10px"> ?>
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> <?php wp_nonce_field( 'edit-speakers-list', 'wcpt-meta-speakers-list-nonce' ); ?>
</span><span class="cx" style="display: block; padding: 0 10px"> <!--<input type="text" class="text" id="wcpt-speakers-list" name="wcpt-speakers-list" value="<?php echo esc_attr( $speakers ); ?>" />-->
</span><span class="cx" style="display: block; padding: 0 10px"> <textarea class="large-text" placeholder="Start typing a name" id="wcpt-speakers-list" name="wcpt-speakers-list"><?php echo esc_textarea( $speakers ); ?></textarea>
</span><span class="cx" style="display: block; padding: 0 10px"> <p class="description"><?php _e( 'A speaker entry must exist first. Separate multiple speakers with commas.', 'wordcamporg' ); ?></p>
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> <script>
</span><span class="cx" style="display: block; padding: 0 10px"> jQuery(document).ready( function($) {
</span><span class="cx" style="display: block; padding: 0 10px"> var availableSpeakers = [ <?php
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1368,19 +1378,22 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px"> </script>
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> <?php
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> function metabox_session_info() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $post = get_post();
- $session_time = absint( get_post_meta( $post->ID, '_wcpt_session_time', true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $post = get_post();
+ $session_time = absint( get_post_meta( $post->ID, '_wcpt_session_time', true ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> $session_date = ( $session_time ) ? date( 'Y-m-d', $session_time ) : date( 'Y-m-d' );
</span><span class="cx" style="display: block; padding: 0 10px"> $session_hours = ( $session_time ) ? date( 'g', $session_time ) : date( 'g' );
</span><span class="cx" style="display: block; padding: 0 10px"> $session_minutes = ( $session_time ) ? date( 'i', $session_time ) : '00';
</span><span class="cx" style="display: block; padding: 0 10px"> $session_meridiem = ( $session_time ) ? date( 'a', $session_time ) : 'am';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $session_type = get_post_meta( $post->ID, '_wcpt_session_type', true );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $session_type = get_post_meta( $post->ID, '_wcpt_session_type', true );
</ins><span class="cx" style="display: block; padding: 0 10px"> ?>
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> <?php wp_nonce_field( 'edit-session-info', 'wcpt-meta-session-info' ); ?>
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> <p>
</span><span class="cx" style="display: block; padding: 0 10px"> <label for="wcpt-session-date"><?php _e( 'Date:', 'wordcamporg' ); ?></label>
</span><span class="cx" style="display: block; padding: 0 10px"> <input type="text" id="wcpt-session-date" data-date="<?php echo esc_attr( $session_date ); ?>" name="wcpt-session-date" value="<?php echo esc_attr( $session_date ); ?>" /><br />
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1415,6 +1428,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <option value="custom" <?php selected( $session_type, 'custom' ); ?>><?php _e( 'Break, Lunch, etc.', 'wordcamporg' ); ?></option>
</span><span class="cx" style="display: block; padding: 0 10px"> </select>
</span><span class="cx" style="display: block; padding: 0 10px"> </p>
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> <?php
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1443,9 +1457,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( isset( $_POST['wcpt-meta-speaker-info'] ) && wp_verify_nonce( $_POST['wcpt-meta-speaker-info'], 'edit-speaker-info' ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $email = sanitize_text_field( $_POST['wcpt-gravatar-email'] );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $email = sanitize_text_field( $_POST['wcpt-gravatar-email'] );
</ins><span class="cx" style="display: block; padding: 0 10px"> $wporg_username = sanitize_text_field( $_POST['wcpt-wporg-username'] );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $wporg_user = $this->get_wporg_user( $wporg_username );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $wporg_user = $this->get_wporg_user( $wporg_username );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( empty( $email ) )
</span><span class="cx" style="display: block; padding: 0 10px"> delete_post_meta( $post_id, '_wcb_speaker_email' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1533,7 +1547,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $speakers_list = array();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $speaker_ids = array();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $speakers = array_unique( array_map( 'trim', $speakers_list ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $speakers = array_unique( array_map( 'trim', $speakers_list ) );
+
</ins><span class="cx" style="display: block; padding: 0 10px"> foreach ( $speakers as $speaker_name ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( empty( $speaker_name ) )
</span><span class="cx" style="display: block; padding: 0 10px"> continue;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1722,6 +1737,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'supports' => array( 'title', 'editor', 'revisions' ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'menu_position' => 22,
</span><span class="cx" style="display: block; padding: 0 10px"> 'public' => false,
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // todo public or publicly_queryable = true, so consistent with others? at the very least set show_in_json = true
</ins><span class="cx" style="display: block; padding: 0 10px"> 'show_ui' => true,
</span><span class="cx" style="display: block; padding: 0 10px"> 'can_export' => true,
</span><span class="cx" style="display: block; padding: 0 10px"> 'capability_type' => 'post',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1795,14 +1811,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> switch ( $current_filter ) {
</span><span class="cx" style="display: block; padding: 0 10px"> case 'manage_wcb_organizer_posts_columns':
</span><span class="cx" style="display: block; padding: 0 10px"> // Insert at offset 1, that's right after the checkbox.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $columns = array_slice( $columns, 0, 1, true ) + array( 'wcb_organizer_avatar' => __( 'Avatar', 'wordcamporg' ) ) + array_slice( $columns, 1, null, true );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $columns = array_slice( $columns, 0, 1, true ) + array( 'wcb_organizer_avatar' => __( 'Avatar', 'wordcamporg' ) ) + array_slice( $columns, 1, null, true );
</ins><span class="cx" style="display: block; padding: 0 10px"> break;
</span><span class="cx" style="display: block; padding: 0 10px"> case 'manage_wcb_speaker_posts_columns':
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $columns = array_slice( $columns, 0, 1, true ) + array( 'wcb_speaker_avatar' => __( 'Avatar', 'wordcamporg' ) ) + array_slice( $columns, 1, null, true );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $columns = array_slice( $columns, 0, 1, true ) + array( 'wcb_speaker_avatar' => __( 'Avatar', 'wordcamporg' ) ) + array_slice( $columns, 1, null, true );
</ins><span class="cx" style="display: block; padding: 0 10px"> break;
</span><span class="cx" style="display: block; padding: 0 10px"> case 'manage_wcb_session_posts_columns':
</span><span class="cx" style="display: block; padding: 0 10px"> $columns = array_slice( $columns, 0, 2, true ) + array( 'wcb_session_speakers' => __( 'Speakers', 'wordcamporg' ) ) + array_slice( $columns, 2, null, true );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $columns = array_slice( $columns, 0, 1, true ) + array( 'wcb_session_time' => __( 'Time', 'wordcamporg' ) ) + array_slice( $columns, 1, null, true );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $columns = array_slice( $columns, 0, 1, true ) + array( 'wcb_session_time' => __( 'Time', 'wordcamporg' ) ) + array_slice( $columns, 1, null, true );
</ins><span class="cx" style="display: block; padding: 0 10px"> break;
</span><span class="cx" style="display: block; padding: 0 10px"> default:
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1822,9 +1838,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> case 'wcb_organizer_avatar':
</span><span class="cx" style="display: block; padding: 0 10px"> edit_post_link( get_avatar( absint( get_post_meta( get_the_ID(), '_wcpt_user_id', true ) ), 32 ) );
</span><span class="cx" style="display: block; padding: 0 10px"> break;
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> case 'wcb_speaker_avatar':
</span><span class="cx" style="display: block; padding: 0 10px"> edit_post_link( get_avatar( get_post_meta( get_the_ID(), '_wcb_speaker_email', true ), 32 ) );
</span><span class="cx" style="display: block; padding: 0 10px"> break;
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> case 'wcb_session_speakers':
</span><span class="cx" style="display: block; padding: 0 10px"> $speakers = array();
</span><span class="cx" style="display: block; padding: 0 10px"> $speakers_ids = array_map( 'absint', (array) get_post_meta( $post_id, '_wcpt_speaker_id' ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1843,11 +1861,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> echo implode( ', ', $output );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> break;
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> case 'wcb_session_time':
</span><span class="cx" style="display: block; padding: 0 10px"> $session_time = absint( get_post_meta( get_the_ID(), '_wcpt_session_time', true ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $session_time = ( $session_time ) ? date( get_option( 'time_format' ), $session_time ) : '—';
</span><span class="cx" style="display: block; padding: 0 10px"> echo esc_html( $session_time );
</span><span class="cx" style="display: block; padding: 0 10px"> break;
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> default:
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1891,9 +1911,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> function register_widgets() {
</span><span class="cx" style="display: block; padding: 0 10px"> require_once( 'inc/widgets.php' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- register_widget( 'WCB_Widget_Sponsors' );
- register_widget( 'WCPT_Widget_Speakers' );
- register_widget( 'WCPT_Widget_Sessions' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ register_widget( 'WCB_Widget_Sponsors' );
+ register_widget( 'WCPT_Widget_Speakers' );
+ register_widget( 'WCPT_Widget_Sessions' );
</ins><span class="cx" style="display: block; padding: 0 10px"> register_widget( 'WCPT_Widget_Organizers' );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1909,7 +1929,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> continue;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $num_posts = wp_count_posts( $post_type );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $num_posts = wp_count_posts( $post_type );
</ins><span class="cx" style="display: block; padding: 0 10px"> $post_type_object = get_post_type_object( $post_type );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $num_posts && $num_posts->publish ) {
</span></span></pre>
</div>
</div>
</body>
</html>