<!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>[7472] sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-attendance/addons: CampTix Attendance: Add sorting options to attendance UI.</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 { white-space: pre-line; 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/7472">7472</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/7472","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>coreymckrill</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2018-07-17 19:24:58 +0000 (Tue, 17 Jul 2018)</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'>CampTix Attendance: Add sorting options to attendance UI.
Update the Attendance UI filters with the ability to sort Attendees by First
Name, Last Name and Order Date.
Also:
* Assure defaults for model and filter settings (id was missing from model).
* Fix console error about viewport tag using semicolons instead of commas.
Fixes <a href="http://meta.trac.wordpress.org/ticket/1097">#1097</a>
Props dryanpress</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginscamptixattendanceaddonsassetsattendanceuijs">sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-attendance/addons/assets/attendance-ui.js</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginscamptixattendanceaddonsattendanceuiphp">sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-attendance/addons/attendance-ui.php</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginscamptixattendanceaddonsattendancephp">sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-attendance/addons/attendance.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginscamptixattendanceaddonsassetsattendanceuijs"></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/camptix-attendance/addons/assets/attendance-ui.js</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/camptix-attendance/addons/assets/attendance-ui.js 2018-07-17 10:59:58 UTC (rev 7471)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-attendance/addons/assets/attendance-ui.js 2018-07-17 19:24:58 UTC (rev 7472)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -14,9 +14,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> camptix.models.Attendee = Backbone.Model.extend({
</span><span class="cx" style="display: block; padding: 0 10px"> defaults: function() {
</span><span class="cx" style="display: block; padding: 0 10px"> return {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ id: null,
</ins><span class="cx" style="display: block; padding: 0 10px"> status: false,
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ sort: 'firstName',
</ins><span class="cx" style="display: block; padding: 0 10px"> avatar: '',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- name: '',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ firstName: '',
+ lastName: ''
</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">@@ -162,7 +165,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Render the attendee list item.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> render: function() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- this.$el.html( this.template( this.model.toJSON() ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ var attendeeData = _.extend( this.model.toJSON(), { sort: this.controller.filterSettings.sort } );
+ this.$el.html( this.template( attendeeData ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> return this;
</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">@@ -315,6 +319,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> events: {
</span><span class="cx" style="display: block; padding: 0 10px"> 'fastClick .close': 'close',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'fastClick .filter-sort li': 'toggleSort',
</ins><span class="cx" style="display: block; padding: 0 10px"> 'fastClick .filter-attendance li': 'toggleAttendance',
</span><span class="cx" style="display: block; padding: 0 10px"> 'fastClick .filter-tickets li': 'toggleTickets'
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -366,6 +371,17 @@
</span><span class="cx" style="display: block; padding: 0 10px"> this.render();
</span><span class="cx" style="display: block; padding: 0 10px"> this.controller.trigger( 'filter', this.filterSettings );
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ /**
+ * Toggle sort order for tickets list
+ */
+ toggleSort: function( event ) {
+ var sortOrder = $( event.target ).data( 'sort' );
+ this.filterSettings.sort = sortOrder;
+ this.render();
+
+ this.controller.trigger( 'filter', this.filterSettings );
+ }
</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">@@ -380,6 +396,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> events: {
</span><span class="cx" style="display: block; padding: 0 10px"> 'fastClick .dashicons-menu': 'menu',
</span><span class="cx" style="display: block; padding: 0 10px"> 'fastClick .submenu .search': 'searchView',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'fastClick .submenu .sort': 'sortView',
</ins><span class="cx" style="display: block; padding: 0 10px"> 'fastClick .submenu .refresh': 'refresh',
</span><span class="cx" style="display: block; padding: 0 10px"> 'fastClick .submenu .filter': 'filterView'
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -396,7 +413,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> this.filterSettings = {
</span><span class="cx" style="display: block; padding: 0 10px"> 'attendance': 'none',
</span><span class="cx" style="display: block; padding: 0 10px"> 'tickets': _camptixAttendanceTickets,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'search': ''
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'search': '',
+ 'sort': 'firstName'
</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"> this.render();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -432,7 +450,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> options = {};
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Dispose of the current collection and cache it for later use.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 'undefined' != typeof this.collection ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( 'undefined' !== typeof this.collection ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> this.collection.off( null, null, this );
</span><span class="cx" style="display: block; padding: 0 10px"> this.cache.push( this.collection );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginscamptixattendanceaddonsattendanceuiphp"></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/camptix-attendance/addons/attendance-ui.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/camptix-attendance/addons/attendance-ui.php 2018-07-17 10:59:58 UTC (rev 7471)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-attendance/addons/attendance-ui.php 2018-07-17 19:24:58 UTC (rev 7472)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -19,7 +19,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> _camptixAttendanceTickets = [ <?php echo esc_js( implode( ', ', array_map( 'absint', wp_list_pluck( $camptix_tickets, 'ID' ) ) ) ); ?> ];
</span><span class="cx" style="display: block; padding: 0 10px"> </script>
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
</ins><span class="cx" style="display: block; padding: 0 10px"> <meta name="referrer" content="never" />
</span><span class="cx" style="display: block; padding: 0 10px"> </head>
</span><span class="cx" style="display: block; padding: 0 10px"> <body>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -26,14 +26,19 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <script id="tmpl-attendee" type="text/template">
</span><span class="cx" style="display: block; padding: 0 10px"> <div class="spinner-container"><span class="spinner"></span></div>
</span><span class="cx" style="display: block; padding: 0 10px"> <a href="#" class="status toggle <# if ( data.status ) { #> yes <# } #>"><div class="dashicons dashicons-admin-users"></div></a>
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> <span class="name">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- {{ data.name }}
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <# if ( 'lastName' == data.sort ) { #>
+ {{ data.lastName }}, {{ data.firstName }}
+ <# } else { #>
+ {{ data.firstName }} {{ data.lastName }}
+ <# } #>
</ins><span class="cx" style="display: block; padding: 0 10px"> </span>
</span><span class="cx" style="display: block; padding: 0 10px"> </script>
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> <script id="tmpl-attendee-toggle" type="text/template">
</span><span class="cx" style="display: block; padding: 0 10px"> <img src="{{ data.avatar }}" />
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <p>Did <strong>{{ data.name }}</strong> attend <?php echo esc_html( $camptix_options['event_name'] ); ?>?</p>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <p>Did <strong>{{ data.firstName }} {{ data.lastName }}</strong> attend <?php echo esc_html( $camptix_options['event_name'] ); ?>?</p>
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> <div class="yes-no-container">
</span><span class="cx" style="display: block; padding: 0 10px"> <a href="#" class="yes">Yes</a>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -51,7 +56,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <a href="#" class="dashicons dashicons-menu"></a>
</span><span class="cx" style="display: block; padding: 0 10px"> <div class="submenu">
</span><span class="cx" style="display: block; padding: 0 10px"> <a href="#" class="search">Search</a>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <a href="#" class="filter">Filter</a>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <a href="#" class="filter">Sort & Filter</a>
</ins><span class="cx" style="display: block; padding: 0 10px"> <a href="#" class="refresh">Refresh</a>
</span><span class="cx" style="display: block; padding: 0 10px"> </div>
</span><span class="cx" style="display: block; padding: 0 10px"> </div>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -78,8 +83,15 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <script id="tmpl-attendee-filter" type="text/template">
</span><span class="cx" style="display: block; padding: 0 10px"> <a href="#" class="close dashicons dashicons-no"></a>
</span><span class="cx" style="display: block; padding: 0 10px"> <div class="wrapper">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <h1>Filters</h1>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <h1>Sort & Filter</h1>
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <h1 class="section-title">Sort Attendees By</h1>
+ <ul class="filter-sort section-controls">
+ <li data-sort="firstName" <# if ( data.sort == 'firstName' ) { #> class="selected" <# } #> >First Name</li>
+ <li data-sort="lastName" <# if ( data.sort == 'lastName' ) { #> class="selected" <# } #> >Last Name</li>
+ <li data-sort="orderDate" <# if ( data.sort == 'orderDate' ) { #> class="selected" <# } #> >Order Date</li>
+ </ul>
+
</ins><span class="cx" style="display: block; padding: 0 10px"> <h1 class="section-title">Attendance</h1>
</span><span class="cx" style="display: block; padding: 0 10px"> <ul class="filter-attendance section-controls">
</span><span class="cx" style="display: block; padding: 0 10px"> <li data-attendance="none" <# if ( data.attendance == 'none' ) { #> class="selected" <# } #> >All</li>
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginscamptixattendanceaddonsattendancephp"></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/camptix-attendance/addons/attendance.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/camptix-attendance/addons/attendance.php 2018-07-17 10:59:58 UTC (rev 7471)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-attendance/addons/attendance.php 2018-07-17 19:24:58 UTC (rev 7472)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -70,7 +70,7 @@
</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><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Synchronize an attendee model.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Synchronize a single attendee model.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * Sets are removes the attended flag for a given camptix_id.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -113,15 +113,37 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $ticket_ids = wp_list_pluck( $this->get_tickets(), 'ID' );
</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' => 'tix_attendee',
- 'post_status' => 'publish',
- 'orderby' => 'title',
- 'order' => 'ASC',
- 'paged' => $paged,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'post_type' => 'tix_attendee',
+ 'post_status' => 'publish',
+ 'orderby' => 'title',
+ 'order' => 'ASC',
+ 'paged' => $paged,
</ins><span class="cx" style="display: block; padding: 0 10px"> 'posts_per_page' => 50,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'meta_query' => '',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'meta_query' => '',
</ins><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /**
+ * Sort Attendee Posts
+ */
+ if ( ! empty( $_REQUEST['camptix_filters']['sort'] ) ) {
+ switch ( $_REQUEST['camptix_filters']['sort'] ) {
+ case 'lastName':
+ $query_args['orderby'] = 'meta_value';
+ $query_args['meta_key'] = 'tix_last_name';
+ break;
+ case 'orderDate':
+ $query_args['orderby'] = 'date';
+ $query_args['order'] = 'DESC';
+ break;
+ case 'firstName':
+ default:
+ // each $attendee->post_title is already First Lastname
+ break;
+ }
+
+ unset( $_REQUEST['camptix_filters']['sort'] );
+ }
+
</ins><span class="cx" style="display: block; padding: 0 10px"> $filters = array();
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! empty( $_REQUEST['camptix_filters'] ) )
</span><span class="cx" style="display: block; padding: 0 10px"> $filters = (array) $_REQUEST['camptix_filters'];
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -173,7 +195,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $attendee = get_post( $attendee );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $first_name = get_post_meta( $attendee->ID, 'tix_first_name', true );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $last_name = get_post_meta( $attendee->ID, 'tix_last_name', true );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $last_name = get_post_meta( $attendee->ID, 'tix_last_name', true );
</ins><span class="cx" style="display: block; padding: 0 10px"> $avatar_url = sprintf( 'https://secure.gravatar.com/avatar/%s?s=160', md5( get_post_meta( $attendee->ID, 'tix_email', true ) ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $avatar_url = add_query_arg( 'd', 'https://secure.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536?s=160', $avatar_url );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -181,7 +203,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> return array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'id' => $attendee->ID,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'name' => sprintf( '%s %s', $first_name, $last_name ),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'firstName' => $first_name,
+ 'lastName' => $last_name,
</ins><span class="cx" style="display: block; padding: 0 10px"> 'avatar' => esc_url_raw( $avatar_url ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'status' => $status,
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -249,6 +272,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function setup_sections( $sections ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $sections['attendance-ui'] = esc_html__( 'Attendance UI', 'wordcamporg' );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> return $sections;
</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">@@ -313,7 +337,7 @@
</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><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Get CampTix Tickets
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Get CampTix Tickets (not to be confused with Attendees)
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * Returns an array of published tickets registered with CampTix.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span></span></pre>
</div>
</div>
</body>
</html>