<!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>[3015] sites/trunk/wordcamp.org/public_html/wp-content/plugins: CampTix Badge Generator: Initial commit.</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/3015">3015</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/3015","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>2016-04-26 19:45:41 +0000 (Tue, 26 Apr 2016)</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 Badge Generator: Initial commit.</pre>

<h3>Added Paths</h3>
<ul>
<li>sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/</li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginscamptixbadgegeneratorTODOmd">sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/TODO.md</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginscamptixbadgegeneratorbootstrapphp">sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/bootstrap.php</a></li>
<li>sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/css/</li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginscamptixbadgegeneratorcsscommoncss">sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/css/common.css</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginscamptixbadgegeneratorcsshtmlbadgescustomizercss">sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/css/html-badges-customizer.css</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginscamptixbadgegeneratorcsshtmlbadgesdefaultstylescss">sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/css/html-badges-default-styles.css</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginscamptixbadgegeneratorcssnormalizemincss">sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/css/normalize.min.css</a></li>
<li>sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/includes/</li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginscamptixbadgegeneratorincludescommonphp">sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/includes/common.php</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginscamptixbadgegeneratorincludeshtmlbadgesphp">sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/includes/html-badges.php</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginscamptixbadgegeneratorincludesindesignbadgesphp">sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/includes/indesign-badges.php</a></li>
<li>sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/javascript/</li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginscamptixbadgegeneratorjavascripthtmlbadgescustomizerjs">sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/javascript/html-badges-customizer.js</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginscamptixbadgegeneratorjavascripthtmlbadgespreviewerjs">sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/javascript/html-badges-previewer.js</a></li>
<li>sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/views/</li>
<li>sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/views/common/</li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginscamptixbadgegeneratorviewscommonpagegeneratebadgesphp">sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/views/common/page-generate-badges.php</a></li>
<li>sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/views/html-badges/</li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginscamptixbadgegeneratorviewshtmlbadgessectiondescriptionphp">sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/views/html-badges/section-description.php</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginscamptixbadgegeneratorviewshtmlbadgestemplatebadgesphp">sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/views/html-badges/template-badges.php</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginscamptixbadgegeneratorviewshtmlbadgestemplatepartbadgecontentsphp">sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/views/html-badges/template-part-badge-contents.php</a></li>
<li>sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/views/indesign-badges/</li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginscamptixbadgegeneratorviewsindesignbadgespageindesignbadgesphp">sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/views/indesign-badges/page-indesign-badges.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginscamptixbadgegeneratorTODOmd"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/TODO.md</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-badge-generator/TODO.md                           (rev 0)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/TODO.md     2016-04-26 19:45:41 UTC (rev 3015)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,34 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+## HTML v2

+* page-breaking issues in chrome/safari
+       * lots of potential solutions on StackOverflow, but none worked so far.
+       * may need to make font size and avatar size smaller, but prob not if can fix chrome page-break issues
+       * want `overflow:hidden` in theory, but may mess up chrome page breaking
+       * try `page-break-inside: avoid;` again
+       * maybe try to build minimal snippet and work up from there until find problem
+       * once that's fixed
+               * move the section-description back to just being a string, rather than separate file.
+               * also remove browser warning.
+
+* big spacing diff between firefox and chrome, despite normalize
+       * have to fix page-break bug before this matters.
+
+* improve the default design
+
+* add checkbox to include twitter, option to pick arbitrary image, option for name instead of image, etc
+       * can use the [gear] icon like the Menus section does
+       
+* move documentation from make/comm/handbook to a `?` icon like menu/widget panels have.
+       * might need custom section markup for that.
+
+
+## InDesign v1
+
+* take latest version of bin script and convert it to work in wp-admin
+* push button to generate zip file to download with CSV and gravatars. see notes in #262
+* add option for ticket type, twitter, etc
+* display instructions for indesign data merge in contextual help
+
+
+## InDesign v2
+* pick options and generate a zip file w/ csv and gravatars
</ins></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginscamptixbadgegeneratorbootstrapphp"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/bootstrap.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-badge-generator/bootstrap.php                             (rev 0)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/bootstrap.php       2016-04-26 19:45:41 UTC (rev 3015)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,22 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+
+/*
+ * Plugin Name: CampTix Badge Generator
+ * Description: Generates personalized attendee badges with HTML/CSS or InDesign.
+ * Version:     0.1
+ * Author:      WordCamp.org
+ * Author URI:  http://wordcamp.org
+ * License:     GPLv2 or later
+ */
+
+namespace CampTix\Badge_Generator;
+defined( 'WPINC' ) or die();
+
+const REQUIRED_CAPABILITY = 'manage_options';
+
+if ( is_admin() ) {
+       require_once( __DIR__ . '/includes/common.php'          );
+       require_once( __DIR__ . '/includes/indesign-badges.php' );
+}
+
+require_once( __DIR__ . '/includes/html-badges.php' );
</ins></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginscamptixbadgegeneratorcsscommoncss"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/css/common.css</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-badge-generator/css/common.css                            (rev 0)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/css/common.css      2016-04-26 19:45:41 UTC (rev 3015)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,9 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+#cbg-method-overviews {
+       display: flex;
+       justify-content: center;
+       margin-bottom: 30px;
+}
+
+       #cbg-method-overviews > div {
+               margin: 0 25px;
+       }
</ins></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginscamptixbadgegeneratorcsshtmlbadgescustomizercss"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/css/html-badges-customizer.css</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-badge-generator/css/html-badges-customizer.css                            (rev 0)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/css/html-badges-customizer.css      2016-04-26 19:45:41 UTC (rev 3015)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,5 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+#customize-control-cbg_print_badges,
+#customize-control-cbg_reset_css {
+       width: 50%;
+       clear: none;
+}
</ins></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginscamptixbadgegeneratorcsshtmlbadgesdefaultstylescss"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/css/html-badges-default-styles.css</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-badge-generator/css/html-badges-default-styles.css                                (rev 0)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/css/html-badges-default-styles.css  2016-04-26 19:45:41 UTC (rev 3015)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,71 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+html, body {
+       margin: 0;
+       background-color: white;
+}
+
+.attendee {
+       float: left;
+       width: 3.25in;
+       height: 9in;
+       overflow: hidden;
+       font-family: sans-serif;
+       text-align: center;
+       box-sizing: border-box;
+}
+
+.attendee:nth-of-type( odd ) {
+       clear: left;
+}
+
+.attendee:nth-of-type( even ) {
+       float: right;
+       page-break-after: always;
+}
+
+/* Cut lines */
+.attendee:nth-of-type( 1 ),
+.attendee:nth-of-type( 2 ) {
+       outline: 1px solid #888888;
+}
+
+.badge {
+       padding: 5em 1em 1em 1em;
+       box-sizing: border-box;
+       height: 50%;
+       position: relative;
+}
+
+.badge-back {
+       transform: rotate( 180deg );
+       border-top: 2px solid #888888;
+}
+
+.holepunch {
+       font-size: 0.7em;
+       text-align: center;
+       position: absolute;
+       left: 0;
+       right: 0;
+       top: 5%;
+}
+
+.custom-logo {
+       max-width: 25%;
+       height: auto;
+}
+
+.wordcamp-name {
+       margin: 0;
+}
+
+.attendee-avatar {
+       max-width: 70%;
+       height: auto;
+       margin: .5em 0 0 0;
+       border-radius: 50%;
+}
+
+.attendee-name {
+       margin: .5em 0 0 0;
+       font-size: 2.4em;
+}
</ins></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginscamptixbadgegeneratorcssnormalizemincss"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/css/normalize.min.css</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-badge-generator/css/normalize.min.css                             (rev 0)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/css/normalize.min.css       2016-04-26 19:45:41 UTC (rev 3015)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,2 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/*! normalize.css v4.1.1 | MIT License | github.com/necolas/normalize.css */
+html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block}audio:not([controls]){display:none;height:0}progress{vertical-align:baseline}template,[hidden]{display:none}a{background-color:transparent;-webkit-text-decoration-skip:objects}a:active,a:hover{outline-width:0}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:inherit;font-weight:bolder}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}svg:not(:root){overflow:hidden}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}figure{margin:1em 40px}hr{box-sizing:content-box;height:0;overflow
 :visible}button,input,select,textarea{font:inherit;margin:0}optgroup{font-weight:700}button,input{overflow:visible}button,select{text-transform:none}button,html [type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer
 -spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px}[type="search"]::-webkit-search-cancel-button,[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-input-placeholder{color:inherit;opacity:.54}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginscamptixbadgegeneratorincludescommonphp"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/includes/common.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-badge-generator/includes/common.php                               (rev 0)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/includes/common.php 2016-04-26 19:45:41 UTC (rev 3015)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,59 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+
+namespace CampTix\Badge_Generator;
+use \CampTix\Badge_Generator\HTML;
+
+defined( 'WPINC' ) or die();
+
+add_filter( 'camptix_menu_tools_tabs',   __NAMESPACE__ . '\add_badges_tab'     );
+add_action( 'camptix_menu_tools_badges', __NAMESPACE__ . '\render_badges_page' );
+add_action( 'admin_print_styles',        __NAMESPACE__ . '\print_admin_styles' );
+
+/**
+ * Add the Generate Badges tab to the CampTix Tools page
+ *
+ * @param array $sections
+ *
+ * @return array
+ */
+function add_badges_tab( $sections ) {
+       $sections['badges'] = __( 'Generate Badges', 'wordcamporg' );
+
+       return $sections;
+}
+
+/**
+ * Render the main Generate Badges page
+ */
+function render_badges_page() {
+       if ( ! current_user_can( REQUIRED_CAPABILITY ) ) {
+               return;
+       }
+
+       $html_customizer_url = HTML\get_customizer_section_url();
+       $notify_tool_url     = admin_url( 'edit.php?post_type=tix_ticket&page=camptix_tools&tix_section=notify' );
+       $indesign_page_url   = admin_url( 'edit.php?post_type=tix_ticket&page=camptix_tools&tix_section=indesign_badges' );
+
+       require_once( dirname( __DIR__ ) . '/views/common/page-generate-badges.php' );
+}
+
+/**
+ * Print CSS styles for wp-admin
+ */
+function print_admin_styles() {
+       $screen = get_current_screen();
+
+       if ( 'tix_ticket_page_camptix_tools' !== $screen->id ) {
+               return;
+       }
+
+       ?>
+
+       <!-- BEGIN CampTix Badge Generator -->
+       <style type="text/css">
+               <?php require_once( dirname( __DIR__ ) . '/css/common.css' ); ?>
+       </style>
+       <!-- END CampTix Badge Generator -->
+
+       <?php
+}
</ins></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginscamptixbadgegeneratorincludeshtmlbadgesphp"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/includes/html-badges.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-badge-generator/includes/html-badges.php                          (rev 0)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/includes/html-badges.php    2016-04-26 19:45:41 UTC (rev 3015)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,331 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+
+namespace CampTix\Badge_Generator\HTML;
+use \CampTix\Badge_Generator;
+
+defined( 'WPINC' ) or die();
+
+add_action( 'customize_register',    __NAMESPACE__ . '\register_customizer_components'   );
+add_action( 'admin_enqueue_scripts', __NAMESPACE__ . '\enqueue_customizer_scripts'       );
+add_action( 'admin_print_styles',    __NAMESPACE__ . '\print_customizer_styles'          );
+add_action( 'wp_enqueue_scripts',    __NAMESPACE__ . '\remove_all_previewer_styles', 998 );
+add_action( 'wp_enqueue_scripts',    __NAMESPACE__ . '\enqueue_previewer_scripts',   999 );  // after remove_all_previewer_styles()
+add_filter( 'template_include',      __NAMESPACE__ . '\use_badges_template'              );
+
+/**
+ * Register our Customizer settings, panels, sections, and controls
+ *
+ * @param \WP_Customize_Manager $wp_customize
+ */
+function register_customizer_components( $wp_customize ) {
+       ob_start();
+       require_once( dirname( __DIR__ ) . '/views/html-badges/section-description.php' );
+       $section_description = ob_get_clean();
+
+       $wp_customize->add_section(
+               'camptix_html_badges',
+               array(
+                       'capability'  => Badge_Generator\REQUIRED_CAPABILITY,
+                       'type'        => 'cbgSection',
+                       'title'       => __( 'CampTix HTML Badges', 'wordcamporg' ),
+                       'description' => $section_description,
+               )
+       );
+
+       $wp_customize->add_control(
+               'cbg_print_badges',
+               array(
+                       'section'     => 'camptix_html_badges',
+                       'settings'    => array(),
+                       'type'        => 'button',
+                       'priority'    => 1,
+                       'capability'  => Badge_Generator\REQUIRED_CAPABILITY,
+                       'input_attrs' => array(
+                               'class' => 'button button-primary',
+                               'value' => __( 'Print', 'wordcamporg' ),
+                       ),
+               )
+       );
+
+       $wp_customize->add_control(
+               'cbg_reset_css',
+               array(
+                       'section'     => 'camptix_html_badges',
+                       'settings'    => array(),
+                       'type'        => 'button',
+                       'priority'    => 1,
+                       'capability'  => Badge_Generator\REQUIRED_CAPABILITY,
+                       'input_attrs' => array(
+                               'class' => 'button button-secondary',
+                               'value' => __( 'Reset to Default', 'wordcamporg' ),
+                       ),
+               )
+       );
+
+       $wp_customize->add_setting(
+               'cbg_badge_css',
+               array(
+                       'default'           => file_get_contents( dirname( __DIR__ ) . '/css/html-badges-default-styles.css' ),
+                       'type'              => 'option',
+                       'capability'        => Badge_Generator\REQUIRED_CAPABILITY,
+                       'transport'         => 'postMessage',
+                       'sanitize_callback' => 'esc_textarea',
+               )
+       );
+
+       $wp_customize->add_control(
+               'cbg_badge_css',
+               array(
+                       'section'  => 'camptix_html_badges',
+                       'type'     => 'textarea',
+                       'priority' => 2,
+                       'label'    => __( 'Customize Badge CSS', 'wordcamporg' ),
+               )
+       );
+}
+
+/**
+ * Get the URL for the HTML Badges section in the Customizer
+ *
+ * @return string
+ */
+function get_customizer_section_url() {
+       $url = add_query_arg(
+               array(
+                       'autofocus[section]' => 'camptix_html_badges',
+                       'url'                => rawurlencode( add_query_arg( 'camptix-badges', '', site_url() ) ),
+               ),
+               admin_url( 'customize.php' )
+       );
+
+       return $url;
+}
+
+/**
+ * Check if the current page request is in the Customizer
+ *
+ * @return bool
+ */
+function is_customizer_request() {
+       return isset( $GLOBALS['wp_customize'] );
+}
+
+/**
+ * Enqueue scripts and styles for the Customizer
+ */
+function enqueue_customizer_scripts() {
+       if ( ! is_customizer_request() ) {
+               return;
+       }
+
+       // Enqueue CodeMirror script and style
+       if ( ! is_callable( array( 'Jetpack_Custom_CSS', 'enqueue_scripts' ) ) ) {
+               require_once( JETPACK__PLUGIN_DIR . 'modules/custom-css/custom-css.php' );
+               define( 'SAFECSS_USE_ACE', true );
+       }
+
+       \Jetpack_Custom_CSS::enqueue_scripts( 'appearance_page_editcss' );
+
+       // Dequeue extraneous Jetpack scripts and styles
+       wp_dequeue_script( 'postbox' );
+       wp_dequeue_script( 'custom-css-editor' );
+       wp_dequeue_style( 'custom-css-editor' );
+       wp_dequeue_script( 'jetpack-css-use-codemirror' );
+
+       // Enqueue our scripts
+       wp_enqueue_script(
+               'camptix-html-badges-customizer',
+               plugins_url( 'javascript/html-badges-customizer.js', __DIR__ ),
+               array( 'jquery', 'jetpack-css-codemirror' ),
+               1,
+               true
+       );
+
+       wp_localize_script(
+               'camptix-html-badges-customizer',
+               'cbgHtmlCustomizerData',
+               array(
+                       'defaultCSS' => file_get_contents( dirname( __DIR__ ) . '/css/html-badges-default-styles.css' ),
+               )
+       );
+}
+
+/**
+ * Print styles for the Customizer
+ */
+function print_customizer_styles() {
+       if ( ! is_customizer_request() ) {
+               return;
+       }
+
+       ?>
+
+       <!-- BEGIN CampTix Badge Generator -->
+       <style type="text/css">
+               <?php require_once( dirname( __DIR__ ) . '/css/html-badges-customizer.css' ); ?>
+       </style>
+       <!-- END CampTix Badge Generator -->
+
+       <?php
+}
+
+/**
+ * Check if the current page is our section of the Previewer
+ *
+ * @return bool
+ */
+function is_badges_preview() {
+       global $wp_customize;
+
+       return isset( $_GET['camptix-badges'] ) && $wp_customize->is_preview();
+}
+
+/**
+ * Use our custom template when the Badges page is requested
+ *
+ * @param string $template
+ *
+ * @return string
+ */
+function use_badges_template( $template ) {
+       if ( ! is_badges_preview() ) {
+               return $template;
+       }
+
+       if ( ! current_user_can( Badge_Generator\REQUIRED_CAPABILITY ) ) {
+               return $template;
+       }
+
+       return dirname( __DIR__ ) . '/views/html-badges/template-badges.php';
+}
+
+/**
+ * Render the template for HTML badges
+ */
+function render_badges_template() {
+       /** @var $camptix \CampTix_Plugin */
+       global $camptix;
+       
+       $allowed_html = array(
+               'span' => array(
+                       'class' => true,
+               ),
+       );
+       
+       $attendees = get_posts( array(
+               'post_type'      => 'tix_attendee',
+               'posts_per_page' => -1,
+               'orderby'        => 'title',
+       ) );
+
+       require( dirname( __DIR__ ) . '/views/html-badges/template-badges.php' );
+}
+
+/**
+ * Get all the data required to render an attendee badge
+ *
+ * @param \WP_Post $attendee
+ *
+ * @return array
+ */
+function get_attendee_data( $attendee ) {
+       /** @var $camptix \CampTix_Plugin */
+       global $camptix;
+       $css_classes = array( 'attendee-' . $attendee->post_name );
+
+       $first_name     = get_post_meta( $attendee->ID, 'tix_first_name', true );
+       $last_name      = get_post_meta( $attendee->ID, 'tix_last_name',  true );
+       $formatted_name = $camptix->format_name_string(
+               '<span class="first-name">%first%</span>
+                <span class="last-name">%last%</span>',
+               $first_name,
+               $last_name
+       );
+
+       $email_address = get_post_meta( $attendee->ID, 'tix_email', true );
+       $avatar_url    = get_avatar_url( $email_address, array( 'size' => 600 ) );
+
+       $ticket        = get_post( get_post_meta( $attendee->ID, 'tix_ticket_id', true ) );
+       $css_classes[] = 'ticket-' . $ticket->post_name;
+
+       $coupon_id = get_post_meta( $attendee->ID, 'tix_coupon_id', true );
+       if ( $coupon_id ) {
+               $coupon        = get_post( $coupon_id );
+               $css_classes[] = 'coupon-' . $coupon->post_name;
+       }
+
+       $css_classes = implode( ' ', $css_classes );
+
+       return compact( 'formatted_name', 'email_address', 'avatar_url', 'css_classes' );
+}
+
+/**
+ * Remove all other styles from the Previewer, to avoid conflicts
+ */
+function remove_all_previewer_styles() {
+       global $wp_styles;
+
+       if ( ! is_badges_preview() ) {
+               return;
+       }
+
+       foreach( $wp_styles->queue as $stylesheet ) {
+               wp_dequeue_style( $stylesheet );
+       }
+
+       remove_all_actions( 'wp_print_styles' );
+
+       remove_action( 'wp_head', array( 'Jetpack_Custom_CSS', 'link_tag' ), 101 );
+}
+
+/**
+ * Enqueue scripts and styles for the Previewer
+ */
+function enqueue_previewer_scripts() {
+       wp_register_script(
+               'camptix-html-badges-previewer',
+               plugins_url( 'javascript/html-badges-previewer.js', __DIR__ ),
+               array( 'jquery', 'customize-preview' ),
+               1,
+               true
+       );
+
+       wp_register_style(
+               'cbg_normalize',
+               plugins_url( 'css/normalize.min.css', __DIR__ ),
+               array(),
+               '4.1.1'
+       );
+
+       if ( ! is_badges_preview() ) {
+               return;
+       }
+
+       wp_enqueue_script( 'camptix-html-badges-previewer' );
+       wp_enqueue_style( 'cbg_normalize' );
+
+       /*
+        * Register the callback in this function so that the stylesheet is registered after remove_all_styles().
+        *
+        * Also, register it at wp_print_scripts instead of wp_print_styles, so that it gets printed _after_
+        * normalize.min.css.
+        */
+       add_action( 'wp_print_scripts', __NAMESPACE__ . '\print_saved_styles' );
+}
+
+/**
+ * Print the saved custom badge CSS
+ */
+function print_saved_styles() {
+       if ( ! is_badges_preview() ) {
+               return;
+       }
+
+       ?>
+
+       <style id="camptix-html-badges-css" type="text/css">
+               <?php echo esc_html( get_option( 'cbg_badge_css' ) ); ?>
+       </style>
+
+       <?php
+}
</ins></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginscamptixbadgegeneratorincludesindesignbadgesphp"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/includes/indesign-badges.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-badge-generator/includes/indesign-badges.php                              (rev 0)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/includes/indesign-badges.php        2016-04-26 19:45:41 UTC (rev 3015)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,22 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+
+namespace CampTix\Badge_Generator\InDesign;
+use \CampTix\Badge_Generator;
+use \CampTix\Badge_Generator\HTML;
+
+defined( 'WPINC' ) or die();
+
+add_action( 'camptix_menu_tools_indesign_badges', __NAMESPACE__ . '\render_indesign_page' );
+
+/**
+ * Render the Indesign Badges page
+ */
+function render_indesign_page() {
+       if ( ! current_user_can( Badge_Generator\REQUIRED_CAPABILITY ) ) {
+               return;
+       }
+
+       $html_customizer_url = HTML\get_customizer_section_url();
+
+       require_once( dirname( __DIR__ ) . '/views/indesign-badges/page-indesign-badges.php' );
+}
</ins></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginscamptixbadgegeneratorjavascripthtmlbadgescustomizerjs"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/javascript/html-badges-customizer.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-badge-generator/javascript/html-badges-customizer.js                              (rev 0)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/javascript/html-badges-customizer.js        2016-04-26 19:45:41 UTC (rev 3015)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,111 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+wp.customize.CampTixHtmlBadgesCustomizer = ( function( $, api ) {
+       'use strict';
+
+       var self = {
+               sectionID    : 'camptix_html_badges',
+               cssSettingID : 'cbg_badge_css',
+               siteURL      : window.location.protocol + '//' + window.location.hostname,
+               cmEditor     : null
+       };
+
+       self.badgesPageURL = self.siteURL + '?camptix-badges';
+
+       $.extend( self, cbgHtmlCustomizerData );
+       window.cbgHtmlCustomizerData = null;
+
+       /**
+        * Initialize
+        */
+       self.initialize = function() {
+               api.section( self.sectionID ).container.bind( 'expanded',  self.loadBadgesPage     );
+               api.section( self.sectionID ).container.bind( 'collapsed', self.unloadBadgesPage   );
+               api.section( self.sectionID ).container.bind( 'expanded',  self.setupCodeMirror    );
+               api.section( self.sectionID ).container.bind( 'expanded',  self.showBrowserWarning );
+
+               $( '#customize-control-cbg_print_badges' ).find( 'input[type=button]' ).click( self.printBadges );
+               $( '#customize-control-cbg_reset_css'    ).find( 'input[type=button]' ).click( self.resetCSS    );
+       };
+
+       /**
+        * Load the Badges pages when navigating to our Section
+        *
+        * @param {object} event
+        */
+       self.loadBadgesPage = function( event ) {
+               if ( self.badgesPageURL !== api.previewer.previewUrl.get() ) {
+                       api.previewer.previewUrl.set( self.badgesPageURL );
+               }
+       };
+
+       /**
+        * Unload the Badges page when navigating away from our Section
+        *
+        * @param {object} event
+        */
+       self.unloadBadgesPage = function( event ) {
+               if ( self.badgesPageURL === api.previewer.previewUrl.get() ) {
+                       api.previewer.previewUrl.set( self.siteURL );
+               }
+       };
+
+       /**
+        * Replace the plain textarea with a nice CSS editor
+        *
+        * @param {object} event
+        */
+       self.setupCodeMirror = function( event ) {
+               if ( self.cmEditor !== null ) {
+                       return;
+               }
+
+               self.cmEditor = CodeMirror.fromTextArea(
+                       $( '#customize-control-cbg_badge_css' ).find( 'textarea' ).get(0),
+                       {
+                               tabSize        : 2,
+                               indentWithTabs : true,
+                               lineWrapping   : true
+                       }
+               );
+
+               self.cmEditor.setSize( null, 'auto' );
+
+               self.cmEditor.on( 'change', function() {
+                       api( self.cssSettingID ).set( self.cmEditor.getValue() );
+               } );
+       };
+
+       /**
+        * Show the browser warning to non-Gecko based browsers
+        *
+        * @param {object} event
+        */
+       self.showBrowserWarning = function( event ) {
+               // Rendering engine string must include the "/" to prevent matching things like "like Gecko" in Chrome/Safari
+               if ( navigator.userAgent.toLowerCase().indexOf( 'gecko/' ) === -1 ) {
+                       $( '#cbg-firefox-recommended' ).removeClass( 'hidden' );
+               }
+       };
+
+       /**
+        * Print the badges in the Previewer frame
+        *
+        * @param {object} event
+        */
+       self.printBadges = function( event ) {
+               window.frames[0].print();
+       };
+
+       /**
+        * Reset to the default CSS
+        *
+        * @param {object} event
+        */
+       self.resetCSS = function( event ) {
+               api( self.cssSettingID ).set( self.defaultCSS );
+               self.cmEditor.setValue(       self.defaultCSS );
+       };
+
+       api.bind( 'ready', self.initialize );
+       return self;
+
+} ( jQuery, wp.customize ) );
</ins></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginscamptixbadgegeneratorjavascripthtmlbadgespreviewerjs"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/javascript/html-badges-previewer.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-badge-generator/javascript/html-badges-previewer.js                               (rev 0)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/javascript/html-badges-previewer.js 2016-04-26 19:45:41 UTC (rev 3015)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,45 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+wp.customize.CampTixHtmlBadgesPreviewer = ( function( $, api ) {
+       'use strict';
+
+       var self = {
+               removedCSS : false
+       };
+       
+       /**
+        * Initialize
+        */
+       self.initialize = function() {
+               api( 'cbg_badge_css', function( value ) {
+                       value.bind( self.updateCSS );
+               } );
+       };
+
+       /**
+        * Update the CSS in the Previewer
+        *
+        * @param {string} newCSS
+        */
+       self.updateCSS = function( newCSS ) {
+               var badgeStyleID      = 'camptix-html-badges-css',
+                   badgeStyleElement = $( '#' + badgeStyleID );
+
+               // In order to set the content of a <style> element, you first have to remove it once and re-create it.
+               if ( ! self.removedCSS ) {
+                       badgeStyleElement.remove();
+
+                       $( '<style />', {
+                               type : 'text/css',
+                               id   : badgeStyleID
+                       } ).appendTo( 'head' );
+
+                       self.removedCSS   = true;
+                       badgeStyleElement = $( '#' + badgeStyleID );
+               }
+
+               badgeStyleElement.text( newCSS );
+       };
+
+       self.initialize();
+       return self;
+
+} ( jQuery, wp.customize ) );
</ins></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginscamptixbadgegeneratorviewscommonpagegeneratebadgesphp"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/views/common/page-generate-badges.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-badge-generator/views/common/page-generate-badges.php                             (rev 0)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/views/common/page-generate-badges.php       2016-04-26 19:45:41 UTC (rev 3015)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,62 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+
+namespace CampTix\Badge_Generator;
+defined( 'WPINC' ) or die();
+
+?>
+
+<p>
+       <?php _e(
+               'This tool will help you create personalized badges for attendees to wear during the event.
+               There are two methods for this, depending on your preferences:',
+               'wordcamporg'
+       ); ?>
+</p>
+
+<div id="cbg-method-overviews">
+       <div id="html-badge-overview">
+               <h2><?php _e( 'HTML and CSS', 'wordcamporg' ); ?></h2>
+
+               <ul class="ul-disc">
+                       <li><?php _e( 'The Easiest method.',                                                                              'wordcamporg' ); ?></li>
+                       <li><?php _e( 'Can be as simple as using the default design and printing at home.',                               'wordcamporg' ); ?></li>
+                       <li><?php _e( 'Design is customizable by a designer or developer, but options are limited compared to InDesign.', 'wordcamporg' ); ?></li>
+               </ul>
+
+               <a class="button button-primary" href="<?php echo esc_url( $html_customizer_url ); ?>">
+                       <?php _e( 'Create Badges with HTML and CSS', 'wordcamporg' ); ?>
+               </a>
+       </div>
+
+       <div id="indesign-badges-overview" class="cbg-method-overview">
+               <h2><?php _e( 'InDesign', 'wordcamporg' ); ?></h2>
+
+               <ul class="ul-disc">
+                       <li><?php _e( 'The best results, but requires more work.', 'wordcamporg' ); ?></li>
+                       <li><?php _e( 'Most flexible design options.',             'wordcamporg' ); ?></li>
+                       <li>
+                               <?php printf(
+                                       __( 'Requires a designer and a copy of InDesign. <a href="%s">Free trial copies are available</a>.', 'wordcamporg' ),
+                                       'https://www.adobe.com/products/indesign.html'
+                               ); ?>
+                       </li>
+               </ul>
+
+               <a class="button button-primary" href="<?php echo esc_url( $indesign_page_url ); ?>">
+                       <?php _e( 'Create Badges with InDesign', 'wordcamporg' ); ?>
+               </a>
+       </div>
+</div>
+
+<p>
+       <?php printf(
+               __(
+                       'Regardless of which method you choose, you\'ll get the best results if you encourage attendees to create <a href="%s">Gravatar</a> accounts before you create the badges.
+                       You can use <a href="%s">the Notify tool</a> to e-mail everyone.
+                       Make sure to tell them to create their Gravatar account using the same e-mail address that provided when purchasing a ticket.',
+                       'wordcamporg'
+               ),
+               'https://gravatar.com',
+               esc_url( $notify_tool_url )
+       ); ?>
+</p>
</ins></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginscamptixbadgegeneratorviewshtmlbadgessectiondescriptionphp"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/views/html-badges/section-description.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-badge-generator/views/html-badges/section-description.php                         (rev 0)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/views/html-badges/section-description.php   2016-04-26 19:45:41 UTC (rev 3015)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,15 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+
+namespace CampTix\Badge_Generator\HTML;
+defined( 'WPINC' ) or die();
+
+_e( 'Create personalized attendee badges with HTML and CSS. ', 'wordcamporg' );
+
+?>
+
+<div id="cbg-firefox-recommended" class="notice notice-warning notice-large hidden">
+       <?php _e(
+               'We strongly recommend using Firefox, because other browsers have inconsistent support for CSS page breaks.',
+               'wordcamporg'
+       ); ?>
+</div>
</ins></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginscamptixbadgegeneratorviewshtmlbadgestemplatebadgesphp"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/views/html-badges/template-badges.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-badge-generator/views/html-badges/template-badges.php                             (rev 0)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/views/html-badges/template-badges.php       2016-04-26 19:45:41 UTC (rev 3015)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,60 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+
+namespace CampTix\Badge_Generator\HTML;
+defined( 'WPINC' ) or die();
+
+/*
+ * template-loader.php includes this file in the global scope, which is ugly. So, include this again from a
+ * function, so that we get a nice, clean, local scope.
+ */
+if ( isset( $template ) && __FILE__ == $template ) {
+       render_badges_template();
+       return;
+}
+
+?><!DOCTYPE html>
+<html <?php language_attributes(); ?>>
+
+<head>
+       <title><?php _e( 'CampTix HTML Badges', 'wordcamporg' ); ?></title>
+       <meta charset="<?php bloginfo( 'charset' ); ?>">
+       <?php wp_head(); ?>
+</head>
+
+<body>
+       <?php
+               if ( empty( $attendees ) ) :
+
+                       _e( 'No attendees were found. Please try again tickets have been purchased.', 'wordcamporg' );
+
+               else :
+
+                       foreach ( $attendees as $attendee_id ) :
+                               $attendee_data = get_attendee_data( $attendee_id );
+                               
+                               ?>
+
+                               <article class="attendee <?php echo esc_attr( $attendee_data['css_classes'] ); ?>">
+                                       <section class="badge badge-back">
+                                               <?php require( __DIR__ . '/template-part-badge-contents.php' ); ?>
+                                       </section>
+
+                                       <section class="badge badge-front">
+                                               <div class="holepunch">&#9421;</div>
+
+                                               <?php require( __DIR__ . '/template-part-badge-contents.php' ); ?>
+                                       </section>
+
+                                       <!-- These are arbitrary elements that you can use for any purpose -->
+                                       <div class="attendee-design-element-1"></div>
+                                       <div class="attendee-design-element-2"></div>
+                                       <div class="attendee-design-element-3"></div>
+                                       <div class="attendee-design-element-4"></div>
+                                       <div class="attendee-design-element-5"></div>
+                               </article>
+                       <?php endforeach; ?>
+               <?php endif; ?>
+
+       <?php wp_footer(); ?>
+</body>
+</html>
</ins></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginscamptixbadgegeneratorviewshtmlbadgestemplatepartbadgecontentsphp"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/views/html-badges/template-part-badge-contents.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-badge-generator/views/html-badges/template-part-badge-contents.php                                (rev 0)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/views/html-badges/template-part-badge-contents.php  2016-04-26 19:45:41 UTC (rev 3015)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,39 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+
+namespace CampTix\Badge_Generator\HTML;
+defined( 'WPINC' ) or die();
+
+?>
+
+<header>
+       <?php if ( has_custom_logo() ) : ?>
+               <?php the_custom_logo(); ?>
+
+       <?php else : ?>
+               <h2 class="wordcamp-name">
+                       <?php echo esc_html( get_wordcamp_name() ); ?>
+               </h2>
+
+       <?php endif; ?>
+</header>
+
+<figure>
+       <img
+           class="attendee-avatar"
+               src="<?php echo esc_url( $attendee_data['avatar_url'] ); ?>"
+               alt="<?php echo esc_attr( strip_tags( $attendee_data['formatted_name'] ) ); ?>"
+       />
+
+       <figcaption>
+               <h1 class="attendee-name">
+                       <?php echo wp_kses( $attendee_data['formatted_name'], $allowed_html ); ?>
+               </h1>
+       </figcaption>
+</figure>
+
+<!-- These are arbitrary elements that you can use for any purpose -->
+<div class="badge-design-element-1"></div>
+<div class="badge-design-element-2"></div>
+<div class="badge-design-element-3"></div>
+<div class="badge-design-element-4"></div>
+<div class="badge-design-element-5"></div>
</ins></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginscamptixbadgegeneratorviewsindesignbadgespageindesignbadgesphp"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/views/indesign-badges/page-indesign-badges.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-badge-generator/views/indesign-badges/page-indesign-badges.php                            (rev 0)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/views/indesign-badges/page-indesign-badges.php      2016-04-26 19:45:41 UTC (rev 3015)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,38 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+
+namespace CampTix\Badge_Generator\InDesign;
+defined( 'WPINC' ) or die();
+
+?>
+
+<h2>
+       <?php _e( 'InDesign Badges', 'wordcamporg' ); ?>
+</h2>
+
+<p>
+       <?php _e(
+               "The process for building InDesign badges hasn't been automated yet, so it requires a developer to run a script.
+                That script will create a CSV file and will download Gravatar images for all attendees.
+                Once that's done, a designer can take those files into InDesign and use the Data Merge feature to create personalized badges for each attendee.",
+               'wordcamporg'
+       ); ?>
+</p>
+
+<p>
+       <?php printf(
+               __(
+                       'Full instructions are <a href="%s">available in the WordCamp Organizer Handbook</a>.
+                       If you\'d prefer an easier way, <a href="%s">the HTML/CSS method</a> is much more automated at this time.',
+                       'wordcamporg'
+               ),
+               'https://make.wordpress.org/community/handbook/wordcamp-organizer-handbook/first-steps/helpful-documents-and-templates/create-wordcamp-badges-with-gravatars/',
+               esc_url( $html_customizer_url )
+       ); ?>
+</p>
+
+<p>
+       <?php printf(
+               __( 'if you\'d like to help automate the InDesign process, you can contribute to <a href="%s">Meta ticket #262</a>.', 'wordcamporg' ),
+               'https://meta.trac.wordpress.org/ticket/262'
+       ); ?>
+</p>
</ins></span></pre>
</div>
</div>

</body>
</html>