<!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>[4177] sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-docs: WordCamp Docs: Add two new visa templates to the docs generator.</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/4177">4177</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/4177","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>kovshenin</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2016-10-02 17:38:29 +0000 (Sun, 02 Oct 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'>WordCamp Docs: Add two new visa templates to the docs generator.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcampdocsclassesclasswordcampdocspdfgeneratorphp">sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-docs/classes/class-wordcamp-docs-pdf-generator.php</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcampdocsclassesclasswordcampdocsphp">sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-docs/classes/class-wordcamp-docs.php</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcampdocstemplatessponsorshipagreementphp">sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-docs/templates/sponsorship-agreement.php</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcampdocstemplatesassetswpcslogopng">sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-docs/templates/assets/wpcs-logo.png</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcampdocstemplatesattendeevisaphp">sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-docs/templates/attendee-visa.php</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcampdocstemplatesspeakervisaphp">sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-docs/templates/speaker-visa.php</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcampdocstemplatesassetslogopng">sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-docs/templates/assets/logo.png</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcampdocstemplatesspeakerinvitationphp">sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-docs/templates/speaker-invitation.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcampdocsclassesclasswordcampdocspdfgeneratorphp"></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/wordcamp-docs/classes/class-wordcamp-docs-pdf-generator.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/wordcamp-docs/classes/class-wordcamp-docs-pdf-generator.php       2016-10-01 21:15:34 UTC (rev 4176)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-docs/classes/class-wordcamp-docs-pdf-generator.php 2016-10-02 17:38:29 UTC (rev 4177)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -165,4 +165,4 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                return rmdir( $tmp_folder );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-}
</del><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+}
</ins></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcampdocsclassesclasswordcampdocsphp"></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/wordcamp-docs/classes/class-wordcamp-docs.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/wordcamp-docs/classes/class-wordcamp-docs.php     2016-10-01 21:15:34 UTC (rev 4176)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-docs/classes/class-wordcamp-docs.php       2016-10-02 17:38:29 UTC (rev 4177)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -50,11 +50,13 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @return array Same array of templates with new ones added.
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public static function default_templates( $templates ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                require_once( WORDCAMP_DOCS__PLUGIN_DIR . 'templates/speaker-invitation.php' );
</del><span class="cx" style="display: block; padding: 0 10px">                 require_once( WORDCAMP_DOCS__PLUGIN_DIR . 'templates/sponsorship-agreement.php' );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                require_once( WORDCAMP_DOCS__PLUGIN_DIR . 'templates/speaker-visa.php' );
+               require_once( WORDCAMP_DOCS__PLUGIN_DIR . 'templates/attendee-visa.php' );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $templates['speaker-invitation'] = new WordCamp_Docs_Template_Speaker_Invitation;
</del><span class="cx" style="display: block; padding: 0 10px">                 $templates['sponsorship-agreement'] = new WordCamp_Docs_Template_Sponsorship_Agreement;
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                $templates['speaker-visa'] = new WordCamp_Docs_Template_Speaker_Visa;
+               $templates['attendee-visa'] = new WordCamp_Docs_Template_Attendee_Visa;
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                return $templates;
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -189,4 +191,4 @@
</span><span class="cx" style="display: block; padding: 0 10px">        private function __construct() {} // Not this time.
</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">-add_action( 'plugins_loaded', array( 'WordCamp_Docs', 'load' ) );
</del><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+add_action( 'plugins_loaded', array( 'WordCamp_Docs', 'load' ) );
</ins></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcampdocstemplatesassetslogopng"></a>
<div class="binary"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Deleted: sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-docs/templates/assets/logo.png</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcampdocstemplatesassetswpcslogopng"></a>
<div class="binary"><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/wordcamp-docs/templates/assets/wpcs-logo.png</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<span class="cx" style="display: block; padding: 0 10px">Index: sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-docs/templates/assets/wpcs-logo.png
</span><span class="cx" style="display: block; padding: 0 10px">===================================================================
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">--- sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-docs/templates/assets/wpcs-logo.png 2016-10-01 21:15:34 UTC (rev 4176)
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-docs/templates/assets/wpcs-logo.png  2016-10-02 17:38:29 UTC (rev 4177)
</ins><span class="cx" style="display: block; padding: 0 10px">Property changes on: sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-docs/templates/assets/wpcs-logo.png
</span><span class="cx" style="display: block; padding: 0 10px">___________________________________________________________________
</span><a id="svnmimetype"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: svn:mime-type</h4></div>
<ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+image/png
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of property
</span><a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcampdocstemplatesattendeevisaphp"></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/wordcamp-docs/templates/attendee-visa.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/wordcamp-docs/templates/attendee-visa.php                         (rev 0)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-docs/templates/attendee-visa.php   2016-10-02 17:38:29 UTC (rev 4177)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,228 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+/**
+ * Attendee Visa Template
+ */
+class WordCamp_Docs_Template_Attendee_Visa implements WordCamp_Docs_Template {
+       public function form( $data ) {
+               $data = wp_parse_args( $data, array(
+                       'attendee_first_name' => '',
+                       'attendee_last_name' => '',
+                       'country_of_residency' => '',
+                       'passport_number' => '',
+
+                       'wordcamp_name' => '',
+                       'wordcamp_location' => '',
+                       'wordcamp_date_start' => '',
+                       'wordcamp_date_end' => '',
+
+                       'organizer_name' => '',
+                       'organizer_contacts' => '',
+               ) );
+               ?>
+               <style>
+               .wcorg-docs-form label {
+                       display: block;
+                       clear: both;
+                       margin-top: 12px;
+               }
+
+               .wcorg-docs-form input,
+               .wcorg-docs-form textarea,
+               .wcorg-docs-form select {
+                       width: 240px;
+               }
+
+               .wcorg-docs-form textarea {
+                       height: 120px;
+               }
+
+               .wcorg-docs-form .description {
+                       display: block;
+                       clear: both;
+               }
+               </style>
+
+               <div class="wcorg-docs-form">
+                       <label><?php _e( 'Attendee First Name:', 'wordcamporg' ); ?></label>
+                       <input name="attendee_first_name" value="<?php echo esc_attr( $data['attendee_first_name'] ); ?>" />
+
+                       <label><?php _e( 'Attendee Last Name:', 'wordcamporg' ); ?></label>
+                       <input name="attendee_last_name" value="<?php echo esc_attr( $data['attendee_last_name'] ); ?>" />
+
+                       <label><?php _e( 'Country of Residency:', 'wordcamporg' ); ?></label>
+                       <input name="country_of_residency" value="<?php echo esc_attr( $data['country_of_residency'] ); ?>" />
+
+                       <label><?php _e( 'Passport Number:', 'wordcamporg' ); ?></label>
+                       <input name="passport_number" value="<?php echo esc_attr( $data['passport_number'] ); ?>" />
+
+                       <label><?php _e( 'WordCamp Name:', 'wordcamporg' ); ?></label>
+                       <input name="wordcamp_name" value="<?php echo esc_attr( $data['wordcamp_name'] ); ?>" />
+
+                       <label><?php _e( 'WordCamp Location:', 'wordcamporg' ); ?></label>
+                       <input name="wordcamp_location" value="<?php echo esc_attr( $data['wordcamp_location'] ); ?>" />
+
+                       <label><?php _e( 'WordCamp Date Start:', 'wordcamporg' ); ?></label>
+                       <input name="wordcamp_date_start" value="<?php echo esc_attr( $data['wordcamp_date_start'] ); ?>" />
+
+                       <label><?php _e( 'WordCamp Date End:', 'wordcamporg' ); ?></label>
+                       <input name="wordcamp_date_end" value="<?php echo esc_attr( $data['wordcamp_date_end'] ); ?>" />
+
+                       <label><?php _e( 'Organizer Name:', 'wordcamporg' ); ?></label>
+                       <input name="organizer_name" value="<?php echo esc_attr( $data['organizer_name'] ); ?>" />
+
+                       <label><?php _e( 'Organizer Contacts:', 'wordcamporg' ); ?></label>
+                       <textarea name="organizer_contacts"><?php echo esc_textarea( $data['organizer_contacts'] ); ?></textarea>
+                       <span class="description"><?php _e( 'Use multiple lines.', 'wordcamporg' ); ?></span>
+               </div>
+
+               <?php
+       }
+
+       public function render( $data ) {
+               ob_start();
+               ?>
+<html>
+<head>
+<meta charset="UTF-8">
+<link href="http://fonts.googleapis.com/css?family=Open+Sans:300,600,700" rel="stylesheet" type="text/css" />
+<style type="text/css">
+body {
+       margin: 0;
+       padding: 0;
+       font-family: 'Open Sans', sans-serif;
+       font-size: 15px;
+       line-height: 1.5;
+       font-weight: 300;
+       color: #444;
+}
+
+p {
+       margin: 0 0 1.5em;
+}
+
+h1, h2, h3, h4, div, p, span, table {
+       font-family: 'Open Sans', sans-serif;
+}
+
+strong {
+       font-weight: 600;
+}
+
+table {
+       table-layout: fixed;
+       width: 100%;
+       margin: 0;
+       padding: 0;
+       border: none;
+       border-collapse: collapse;
+
+       font-family: 'Open Sans', sans-serif;
+       font-size: 15px;
+       line-height: 1.5;
+       font-weight: 300;
+       color: #444;
+}
+
+h2 {
+       font-size: 18px;
+}
+
+.wrap {
+       clear: both;
+       margin: 40px 20px;
+}
+
+.main {
+       float: left;
+       width: 100%;
+       margin-top: 40px;
+}
+
+.logo-wrapper {
+       text-align: center;
+       margin-bottom: 40px;
+}
+
+.logo {
+       width: 400px;
+       height: auto;
+}
+</style>
+</head>
+
+<body>
+
+<div class="wrap">
+       <div class="main">
+
+               <div class="logo-wrapper">
+                       <img class="logo" src="wpcs-logo.png" alt="WordPress Community Support, PBC">
+               </div>
+
+               <p><?php echo date( 'F j, Y' ); ?></p>
+
+               <p>To Whom It May Concern:</p>
+
+               <p>This letter is to confirm that <?php echo esc_html( $data['attendee_first_name'] ); ?> <?php echo esc_html( $data['attendee_last_name'] ); ?>
+               <?php echo esc_html( $data['country_of_residency'] ); ?> passport number <?php echo esc_html( $data['passport_number'] ); ?>,
+               is attending <?php echo esc_html( $data['wordcamp_name'] ); ?>, a community-organized event focusing on WordPress
+               development and technology.</p>
+
+               <p>WordPress is a web software you can use to create a beautiful website or blog. The core software is built by hundreds of community
+               volunteers. The mission of the WordPress open source project is to democratize publishing through Open Source, GPL software.</p>
+
+               <p>Attending <?php echo esc_html( $data['wordcamp_name'] ); ?> will require <?php echo esc_html( $data['attendee_first_name'] ); ?> to be
+               in <?php echo esc_html( $data['wordcamp_location'] ); ?> from <?php echo esc_html( $data['wordcamp_date_start'] ); ?>
+               through <?php echo esc_html( $data['wordcamp_date_end'] ); ?>.</p>
+
+               <p>I would be happy to provide any further information you may require.</p>
+
+               <p>Sincerely,<br />
+               <?php echo esc_html( $data['organizer_name'] ); ?><br />
+               Organizer<br />
+               <?php echo esc_html( $data['wordcamp_name'] ); ?></p>
+
+               <p><?php echo nl2br( esc_html( $data['organizer_contacts'] ) ); ?></p>
+
+       </div>
+
+</div>
+</body>
+</html>
+               <?php
+               return ob_get_clean();
+       }
+
+       public function sanitize( $input ) {
+               $output = array();
+               foreach ( array(
+                       'attendee_first_name',
+                       'attendee_last_name',
+                       'country_of_residency',
+                       'passport_number',
+                       'wordcamp_name',
+                       'wordcamp_location',
+                       'wordcamp_date_start',
+                       'wordcamp_date_end',
+                       'organizer_name',
+               ) as $field )
+                       $output[ $field ] = sanitize_text_field( wp_strip_all_tags( $input[ $field ] ) );
+
+               $output['organizer_contacts'] = wp_strip_all_tags( $input['organizer_contacts'] );
+               return $output;
+       }
+
+       public function get_name() {
+               return __( 'Attendee Visa Letter', 'wordcamporg' );
+       }
+
+       public function get_filename() {
+               return 'attendee-visa.pdf';
+       }
+
+       public function get_assets() {
+               return array(
+                       dirname( __FILE__ ) . '/assets/wpcs-logo.png',
+               );
+       }
+}
</ins></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcampdocstemplatesspeakerinvitationphp"></a>
<div class="delfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Deleted: sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-docs/templates/speaker-invitation.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/wordcamp-docs/templates/speaker-invitation.php    2016-10-01 21:15:34 UTC (rev 4176)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-docs/templates/speaker-invitation.php      2016-10-02 17:38:29 UTC (rev 4177)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,200 +0,0 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-<?php
-/**
- * Speakers Invitation Template
- *
- * @see classes/class-wordcamp-docs.php for implementation details.
- */
-class WordCamp_Docs_Template_Speaker_Invitation implements WordCamp_Docs_Template {
-       public function form( $data ) {
-
-               /**
-                * @todo Grab defaults from central and/or options, cpt, etc.
-                */
-               $data = wp_parse_args( $data, array(
-                       'name' => '',
-                       'gender' => '',
-                       'dates' => '',
-                       'city' => '',
-                       'country' => '',
-                       'venue_name' => '',
-                       'venue_address' => '',
-                       'signature' => '',
-               ) );
-               ?>
-               <style>
-               .wcorg-speaker-invitation-form label {
-                       display: block;
-                       clear: both;
-                       margin-top: 12px;
-               }
-
-               .wcorg-speaker-invitation-form input,
-               .wcorg-speaker-invitation-form textarea,
-               .wcorg-speaker-invitation-form select {
-                       width: 240px;
-               }
-
-               .wcorg-speaker-invitation-form textarea {
-                       height: 120px;
-               }
-
-               .wcorg-speaker-invitation-form .description {
-                       display: block;
-                       clear: both;
-               }
-               </style>
-
-               <div class="wcorg-speaker-invitation-form">
-                       <label><?php _e( 'Speaker Name:', 'wordcamporg' ); ?></label>
-                       <input name="name" value="<?php echo esc_attr( $data['name'] ); ?>" />
-
-                       <label><?php _e( 'Gender:', 'wordcamporg' ); ?></label>
-                       <select name="gender">
-                               <option value="male" <?php selected( $data['gender'], 'male' ); ?>><?php _e( 'Male', 'wordcamporg' ); ?></option>
-                               <option value="female" <?php selected( $data['gender'], 'female' ); ?>><?php _e( 'Female', 'wordcamporg' ); ?></option>
-                       </select>
-
-                       <label><?php _e( 'Travel Dates:', 'wordcamporg' ); ?></label>
-                       <input name="dates" value="<?php echo esc_attr( $data['dates'] ); ?>" />
-                       <span class="description"><?php _e( 'Ex: January 15-16, 2019', 'wordcamporg' ); ?></span>
-
-                       <label><?php _e( 'City:', 'wordcamporg' ); ?></label>
-                       <input name="city" value="<?php echo esc_attr( $data['city'] ); ?>" />
-
-                       <label><?php _e( 'Country:', 'wordcamporg' ); ?></label>
-                       <input name="country" value="<?php echo esc_attr( $data['country'] ); ?>" />
-
-                       <label><?php _e( 'Venue Name:', 'wordcamporg' ); ?></label>
-                       <input name="venue_name" value="<?php echo esc_attr( $data['venue_name'] ); ?>" />
-
-                       <label><?php _e( 'Venue Address:', 'wordcamporg' ); ?></label>
-                       <input name="venue_address" value="<?php echo esc_attr( $data['venue_address'] ); ?>" />
-
-                       <label><?php _e( 'Signature:', 'wordcamporg' ); ?></label>
-                       <textarea name="signature"><?php echo esc_textarea( $data['signature'] ); ?></textarea>
-                       <span class="description"><?php _e( 'Name, title, phone, e-mail address', 'wordcamporg' ); ?></span>
-               </div>
-
-               <?php
-       }
-
-       public function render( $data ) {
-               ob_start();
-               ?>
-<html>
-<head>
-<meta charset="UTF-8">
-<link href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,700" rel="stylesheet" type="text/css" />
-<style type="text/css">
-body {
-       margin: 0;
-       padding: 0;
-       font-family: 'Open Sans', sans-serif;
-       font-size: 16px;
-       line-height: 1.5;
-       font-weight: 300;
-       color: #444;
-}
-
-p {
-       margin: 0 0 1.5em;
-}
-
-h1, h2, h3, h4, div, p, span {
-       font-family: 'Open Sans', sans-serif;
-}
-
-.wrap {
-       clear: both;
-       margin: 40px 40px;
-}
-
-.main {
-       float: left;
-       width: 100%;
-       margin-top: 40px;
-}
-
-.logo {
-       width: 300px;
-       height: 150px;
-       margin-bottom: 40px;
-}
-
-#footer {
-       position: absolute;
-       bottom: 0px;
-       left: 40px;
-       right: 40px;
-}
-</style>
-</head>
-
-<body>
-
-<div class="wrap">
-       <div class="main">
-               <img class="logo" src="logo.png" alt="WordPress Foundation">
-
-               <p><?php echo date( 'F j, Y' ); ?></p>
-               <p>To whom it may concern:</p>
-
-               <p>This letter is to confirm that <?php echo esc_html( $data['name'] ); ?> has been invited to speak at an international WordCamp conference in <?php echo esc_html( $data['city'] ) ; ?>, <?php echo esc_html( $data['country'] ) ; ?>. <?php echo $data['gender'] == 'male' ? 'His' : 'Her'; ?> participation in this conference will require <?php echo $data['gender'] == 'male' ? 'him' : 'her'; ?> to be in <?php echo esc_html( $data['city'] ); ?> from <?php echo esc_html( $data['dates'] ); ?>.<p>
-
-               <p>The conference will be held at <?php echo esc_html( $data['venue_name'] ); ?>, <?php echo esc_html( $data['venue_address'] ); ?>.</p>
-
-               <p>Please don't hesitate to contact me for any additional information regarding this invitation.</p>
-
-               <p>Sincerely,</p>
-               <p><?php echo nl2br( esc_html( $data['signature'] ) ); ?></p>
-
-       </div>
-
-       <div id="footer">
-               <p>WordPress Foundation, 200 Brannan Street Apt 239, San Francisco, CA 94107-6008, USA</p>
-       </div>
-</div>
-</body>
-</html>
-               <?php
-               return ob_get_clean();
-       }
-
-       public function sanitize( $input ) {
-               $output = array();
-               $input = wp_parse_args( $input, array(
-                       'name' => '',
-                       'gender' => '',
-                       'dates' => '',
-                       'city' => '',
-                       'country' => '',
-                       'venue_name' => '',
-                       'venue_address' => '',
-                       'signature' => '',
-               ) );
-
-               foreach ( array( 'name', 'dates', 'city', 'country', 'venue_name', 'venue_address' ) as $field )
-                       $output[ $field ] = sanitize_text_field( wp_strip_all_tags( $input[ $field ] ) );
-
-               $output['gender'] = 'male';
-               if ( in_array( $input['gender'], array( 'male', 'female' ) ) )
-                       $output['gender'] = $input['gender'];
-
-               $output['signature'] = wp_strip_all_tags( $input['signature'] );
-               return $output;
-       }
-
-       public function get_name() {
-               return __( 'Speaker Invitation', 'wordcamporg' );
-       }
-
-       public function get_filename() {
-               return 'speaker-invitation.pdf';
-       }
-
-       public function get_assets() {
-               return array(
-                       dirname( __FILE__ ) . '/assets/logo.png',
-               );
-       }
-}
</del><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcampdocstemplatesspeakervisaphp"></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/wordcamp-docs/templates/speaker-visa.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/wordcamp-docs/templates/speaker-visa.php                          (rev 0)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-docs/templates/speaker-visa.php    2016-10-02 17:38:29 UTC (rev 4177)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,228 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+/**
+ * Speaker Visa Template
+ */
+class WordCamp_Docs_Template_Speaker_Visa implements WordCamp_Docs_Template {
+       public function form( $data ) {
+               $data = wp_parse_args( $data, array(
+                       'attendee_first_name' => '',
+                       'attendee_last_name' => '',
+                       'country_of_residency' => '',
+                       'passport_number' => '',
+
+                       'wordcamp_name' => '',
+                       'wordcamp_location' => '',
+                       'wordcamp_date_start' => '',
+                       'wordcamp_date_end' => '',
+
+                       'organizer_name' => '',
+                       'organizer_contacts' => '',
+               ) );
+               ?>
+               <style>
+               .wcorg-docs-form label {
+                       display: block;
+                       clear: both;
+                       margin-top: 12px;
+               }
+
+               .wcorg-docs-form input,
+               .wcorg-docs-form textarea,
+               .wcorg-docs-form select {
+                       width: 240px;
+               }
+
+               .wcorg-docs-form textarea {
+                       height: 120px;
+               }
+
+               .wcorg-docs-form .description {
+                       display: block;
+                       clear: both;
+               }
+               </style>
+
+               <div class="wcorg-docs-form">
+                       <label><?php _e( 'Attendee First Name:', 'wordcamporg' ); ?></label>
+                       <input name="attendee_first_name" value="<?php echo esc_attr( $data['attendee_first_name'] ); ?>" />
+
+                       <label><?php _e( 'Attendee Last Name:', 'wordcamporg' ); ?></label>
+                       <input name="attendee_last_name" value="<?php echo esc_attr( $data['attendee_last_name'] ); ?>" />
+
+                       <label><?php _e( 'Country of Residency:', 'wordcamporg' ); ?></label>
+                       <input name="country_of_residency" value="<?php echo esc_attr( $data['country_of_residency'] ); ?>" />
+
+                       <label><?php _e( 'Passport Number:', 'wordcamporg' ); ?></label>
+                       <input name="passport_number" value="<?php echo esc_attr( $data['passport_number'] ); ?>" />
+
+                       <label><?php _e( 'WordCamp Name:', 'wordcamporg' ); ?></label>
+                       <input name="wordcamp_name" value="<?php echo esc_attr( $data['wordcamp_name'] ); ?>" />
+
+                       <label><?php _e( 'WordCamp Location:', 'wordcamporg' ); ?></label>
+                       <input name="wordcamp_location" value="<?php echo esc_attr( $data['wordcamp_location'] ); ?>" />
+
+                       <label><?php _e( 'WordCamp Date Start:', 'wordcamporg' ); ?></label>
+                       <input name="wordcamp_date_start" value="<?php echo esc_attr( $data['wordcamp_date_start'] ); ?>" />
+
+                       <label><?php _e( 'WordCamp Date End:', 'wordcamporg' ); ?></label>
+                       <input name="wordcamp_date_end" value="<?php echo esc_attr( $data['wordcamp_date_end'] ); ?>" />
+
+                       <label><?php _e( 'Organizer Name:', 'wordcamporg' ); ?></label>
+                       <input name="organizer_name" value="<?php echo esc_attr( $data['organizer_name'] ); ?>" />
+
+                       <label><?php _e( 'Organizer Contacts:', 'wordcamporg' ); ?></label>
+                       <textarea name="organizer_contacts"><?php echo esc_textarea( $data['organizer_contacts'] ); ?></textarea>
+                       <span class="description"><?php _e( 'Use multiple lines.', 'wordcamporg' ); ?></span>
+               </div>
+
+               <?php
+       }
+
+       public function render( $data ) {
+               ob_start();
+               ?>
+<html>
+<head>
+<meta charset="UTF-8">
+<link href="http://fonts.googleapis.com/css?family=Open+Sans:300,600,700" rel="stylesheet" type="text/css" />
+<style type="text/css">
+body {
+       margin: 0;
+       padding: 0;
+       font-family: 'Open Sans', sans-serif;
+       font-size: 15px;
+       line-height: 1.5;
+       font-weight: 300;
+       color: #444;
+}
+
+p {
+       margin: 0 0 1.5em;
+}
+
+h1, h2, h3, h4, div, p, span, table {
+       font-family: 'Open Sans', sans-serif;
+}
+
+strong {
+       font-weight: 600;
+}
+
+table {
+       table-layout: fixed;
+       width: 100%;
+       margin: 0;
+       padding: 0;
+       border: none;
+       border-collapse: collapse;
+
+       font-family: 'Open Sans', sans-serif;
+       font-size: 15px;
+       line-height: 1.5;
+       font-weight: 300;
+       color: #444;
+}
+
+h2 {
+       font-size: 18px;
+}
+
+.wrap {
+       clear: both;
+       margin: 40px 20px;
+}
+
+.main {
+       float: left;
+       width: 100%;
+       margin-top: 40px;
+}
+
+.logo-wrapper {
+       text-align: center;
+       margin-bottom: 40px;
+}
+
+.logo {
+       width: 400px;
+       height: auto;
+}
+</style>
+</head>
+
+<body>
+
+<div class="wrap">
+       <div class="main">
+
+               <div class="logo-wrapper">
+                       <img class="logo" src="wpcs-logo.png" alt="WordPress Community Support, PBC">
+               </div>
+
+               <p><?php echo date( 'F j, Y' ); ?></p>
+
+               <p>To Whom It May Concern:</p>
+
+               <p>This letter is to confirm that <?php echo esc_html( $data['attendee_first_name'] ); ?> <?php echo esc_html( $data['attendee_last_name'] ); ?>
+               <?php echo esc_html( $data['country_of_residency'] ); ?> passport number <?php echo esc_html( $data['passport_number'] ); ?>,
+               has been invited to speak at <?php echo esc_html( $data['wordcamp_name'] ); ?>, a community-organized event focusing on WordPress
+               development and technology.</p>
+
+               <p>WordPress is a web software you can use to create a beautiful website or blog. The core software is built by hundreds of community
+               volunteers. The mission of the WordPress open source project is to democratize publishing through Open Source, GPL software.</p>
+
+               <p>To fulfill speaking duties at <?php echo esc_html( $data['wordcamp_name'] ); ?>, <?php echo esc_html( $data['attendee_first_name'] ); ?>
+               will need to be in <?php echo esc_html( $data['wordcamp_location'] ); ?> from <?php echo esc_html( $data['wordcamp_date_start'] ); ?>
+               through <?php echo esc_html( $data['wordcamp_date_end'] ); ?>.
+
+               <p>I would be happy to provide any further information you may require.</p>
+
+               <p>Sincerely,<br />
+               <?php echo esc_html( $data['organizer_name'] ); ?><br />
+               Organizer<br />
+               <?php echo esc_html( $data['wordcamp_name'] ); ?></p>
+
+               <p><?php echo nl2br( esc_html( $data['organizer_contacts'] ) ); ?></p>
+
+       </div>
+
+</div>
+</body>
+</html>
+               <?php
+               return ob_get_clean();
+       }
+
+       public function sanitize( $input ) {
+               $output = array();
+               foreach ( array(
+                       'attendee_first_name',
+                       'attendee_last_name',
+                       'country_of_residency',
+                       'passport_number',
+                       'wordcamp_name',
+                       'wordcamp_location',
+                       'wordcamp_date_start',
+                       'wordcamp_date_end',
+                       'organizer_name',
+               ) as $field )
+                       $output[ $field ] = sanitize_text_field( wp_strip_all_tags( $input[ $field ] ) );
+
+               $output['organizer_contacts'] = wp_strip_all_tags( $input['organizer_contacts'] );
+               return $output;
+       }
+
+       public function get_name() {
+               return __( 'Speaker Visa Letter', 'wordcamporg' );
+       }
+
+       public function get_filename() {
+               return 'speaker-visa.pdf';
+       }
+
+       public function get_assets() {
+               return array(
+                       dirname( __FILE__ ) . '/assets/wpcs-logo.png',
+               );
+       }
+}
</ins></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcampdocstemplatessponsorshipagreementphp"></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/wordcamp-docs/templates/sponsorship-agreement.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/wordcamp-docs/templates/sponsorship-agreement.php 2016-10-01 21:15:34 UTC (rev 4176)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-docs/templates/sponsorship-agreement.php   2016-10-02 17:38:29 UTC (rev 4177)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -259,20 +259,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        public function sanitize( $input ) {
</span><span class="cx" style="display: block; padding: 0 10px">                $output = array();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $data = wp_parse_args( $data, array(
-                       'sponsor_name' => '',
-                       'sponsor_rep_name' => '',
-                       'sponsor_rep_title' => '',
-
-                       'agreement_date' => '',
-                       'wordcamp_location' => '',
-                       'wordcamp_date' => '',
-
-                       'sponsorship_amount' => '',
-                       'sponsorship_amount_num' => '',
-                       'sponsorship_benefits' => '',
-               ) );
-
</del><span class="cx" style="display: block; padding: 0 10px">                 foreach ( array(
</span><span class="cx" style="display: block; padding: 0 10px">                        'sponsor_name',
</span><span class="cx" style="display: block; padding: 0 10px">                        'sponsor_rep_name',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -298,8 +284,6 @@
</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">        public function get_assets() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                return array(
-                       dirname( __FILE__ ) . '/assets/logo.png',
-               );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         return array();
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-}
</del><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+}
</ins></span></pre>
</div>
</div>

</body>
</html>