<!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>[381] sites/trunk/wordcamp.org/public_html/wp-content/plugins: Coming Soon: 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">
<dt>Revision</dt> <dd><a href="http://meta.trac.wordpress.org/changeset/381">381</a></dd>
<dt>Author</dt> <dd>iandunn</dd>
<dt>Date</dt> <dd>2014-02-06 05:28:11 +0000 (Thu, 06 Feb 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Coming Soon: Initial commit</pre>

<h3>Added Paths</h3>
<ul>
<li>sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/</li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcampcomingsoonpageTODOtxt">sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/TODO.txt</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcampcomingsoonpagebootstrapphp">sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/bootstrap.php</a></li>
<li>sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/classes/</li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcampcomingsoonpageclasseswccspsettingsphp">sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/classes/wccsp-settings.php</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcampcomingsoonpageclasseswordcampcomingsoonpagephp">sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/classes/wordcamp-coming-soon-page.php</a></li>
<li>sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/css/</li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcampcomingsoonpagecsstemplatecomingsooncss">sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/css/template-coming-soon.css</a></li>
<li>sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/javascript/</li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcampcomingsoonpagejavascriptwccspsettingsjs">sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/javascript/wccsp-settings.js</a></li>
<li>sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/views/</li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcampcomingsoonpageviewssettingsadminnoticesphp">sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/views/settings-admin-notices.php</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcampcomingsoonpageviewssettingsfieldsphp">sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/views/settings-fields.php</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcampcomingsoonpageviewssettingsscreenphp">sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/views/settings-screen.php</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcampcomingsoonpageviewssettingssectionheadersphp">sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/views/settings-section-headers.php</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcampcomingsoonpageviewstemplatecomingsoonphp">sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/views/template-coming-soon.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcampcomingsoonpageTODOtxt"></a>
<div class="addfile"><h4>Added: sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/TODO.txt (0 => 381)</h4>
<pre class="diff"><span>
<span class="info">--- sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/TODO.txt                               (rev 0)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/TODO.txt  2014-02-06 05:28:11 UTC (rev 381)
</span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+High priority:
+       finish styles
+               make responsive & mobile-first
+               make contact box align w/ right edge of intro text
+               make work consistently with any theme
+       display dates
+       add color pickers
+       
+Medium priority:
+       update image preview after they pick new but before they save/refresh
+       customize image size in template
+       contact form shortcode - lookup email from wordcamp cpt instead of admin email?
+       internationalize
+       any other TODOs in code
+       
+                       
+Low priority:
+       contact form submitted to latest post url instead of current page (if on home page)
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcampcomingsoonpagebootstrapphp"></a>
<div class="addfile"><h4>Added: sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/bootstrap.php (0 => 381)</h4>
<pre class="diff"><span>
<span class="info">--- sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/bootstrap.php                          (rev 0)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/bootstrap.php     2014-02-06 05:28:11 UTC (rev 381)
</span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+<?php
+/*
+Plugin Name: WordCamp Coming Soon Page
+Description: Creates a Coming Soon landing page for new WordCamp sites
+Version:     0.1
+Author:      WordCamp Central
+Author URI:  http://wordcamp.org
+*/
+
+if ( ! defined( 'ABSPATH' ) ) {
+       die( 'Access denied.' );
+}
+
+require_once( __DIR__ . '/classes/wordcamp-coming-soon-page.php' );
+require_once( __DIR__ . '/classes/wccsp-settings.php' );
+
+$GLOBALS['WordCamp_Coming_Soon_Page'] = new WordCamp_Coming_Soon_Page();
+$GLOBALS['WCCSP_Settings']            = new WCCSP_Settings();
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcampcomingsoonpageclasseswccspsettingsphp"></a>
<div class="addfile"><h4>Added: sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/classes/wccsp-settings.php (0 => 381)</h4>
<pre class="diff"><span>
<span class="info">--- sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/classes/wccsp-settings.php                             (rev 0)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/classes/wccsp-settings.php        2014-02-06 05:28:11 UTC (rev 381)
</span><span class="lines">@@ -0,0 +1,231 @@
</span><ins>+<?php
+
+class WCCSP_Settings {
+       protected $settings;
+       const REQUIRED_CAPABILITY = 'administrator';
+
+       /**
+        * Constructor
+        */
+       public function __construct() {
+               add_action( 'admin_menu',            array( $this, 'register_settings_pages' ) );
+               add_action( 'init',                  array( $this, 'init' ) );
+               add_action( 'admin_init',            array( $this, 'register_settings' ) );
+               add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
+               add_action( 'admin_notices',         array( $this, 'render_admin_notices' ) );
+       }
+
+       /**
+        * Initializes variables
+        */
+       public function init() {
+               $this->settings = $this->get_settings();
+       }
+
+       /**
+        * Retrieves all of the settings from the database  
+        * 
+        * @return array
+        */
+       public function get_settings() {
+               $defaults = array(
+                       'enabled'                    => 'off',        // so that sites created before the plugin was deployed won't display the home page when the plugin is activated
+                       'body_background_color'      => '#666666',
+                       'container_background_color' => '#FFFFFF',
+                       'text_color'                 => '#000000',
+                       'image_id'                   => 0,
+               );
+                       
+               $settings = shortcode_atts(
+                       $defaults,
+                       get_option( 'wccsp_settings', array() )
+               );
+
+               return $settings;
+       }
+
+       /**
+        * Register and enqueue the JavaScript we need for the Settings screen
+        * 
+        * @param string $screen
+        */
+       public function enqueue_scripts( $hook_suffix ) {
+               if ( 'settings_page_wccsp_settings' != $hook_suffix ) {
+                       return;
+               }
+               
+               wp_register_script(
+                       'wccsp-settings',
+                       plugins_url( '/javascript/wccsp-settings.js', __DIR__ ),
+                       array( 'jquery', 'media-upload', 'media-views' ),
+                       WordCamp_Coming_Soon_Page::VERSION
+               );
+
+               wp_enqueue_media();
+               wp_enqueue_script( 'wccsp-settings' );
+       }
+
+       /**
+        * Adds pages to the Admin Panel menu
+        */
+       public function register_settings_pages() {
+               add_submenu_page(
+                       'options-general.php',
+                       'Coming Soon',
+                       'Coming Soon',
+                       self::REQUIRED_CAPABILITY,
+                       'wccsp_settings',
+                       array( $this, 'markup_settings_page' )
+               );
+       }
+
+       /**
+        * Creates the markup for the Settings page
+        */
+       public function markup_settings_page() {
+               if ( current_user_can( self::REQUIRED_CAPABILITY ) ) {
+                       require_once( dirname( __DIR__ ) . '/views/settings-screen.php' );
+               } else {
+                       wp_die( 'Access denied.' );
+               }
+       }
+
+       /**
+        * Registers settings sections, fields and settings
+        */
+       public function register_settings() {
+               add_settings_section(
+                       'wccsp_default',
+                       '', 
+                       array( $this, 'markup_section_headers' ),
+                       'wccsp_settings'
+               );
+               
+
+               add_settings_field(
+                       'wccsp_enabled',
+                       'Enabled',
+                       array( $this, 'markup_fields' ),
+                       'wccsp_settings',
+                       'wccsp_default',
+                       array( 'label_for' => 'wccsp_enabled_true' )
+               );
+
+               add_settings_field(
+                       'wccsp_body_background_color',
+                       'Body Background Color',
+                       array( $this, 'markup_fields' ),
+                       'wccsp_settings',
+                       'wccsp_default',
+                       array( 'label_for' => 'wccsp_body_background_color' )
+               );
+
+               add_settings_field(
+                       'wccsp_container_background_color',
+                       'Container Background Color',
+                       array( $this, 'markup_fields' ),
+                       'wccsp_settings',
+                       'wccsp_default',
+                       array( 'label_for' => 'wccsp_container_background_color' )
+               );
+
+               add_settings_field(
+                       'wccsp_text_color',
+                       'Text Color',
+                       array( $this, 'markup_fields' ),
+                       'wccsp_settings',
+                       'wccsp_default',
+                       array( 'label_for' => 'wccsp_text_color' )
+               );
+
+               add_settings_field(
+                       'wccsp_image_id',
+                       'Image',
+                       array( $this, 'markup_fields' ),
+                       'wccsp_settings',
+                       'wccsp_default',
+                       array( 'label_for' => 'wccsp_image_id' )
+               );
+               
+
+               register_setting(
+                       'wccsp_settings',
+                       'wccsp_settings',
+                       array( $this, 'validate_settings' )
+               );
+       }
+
+       /**
+        * Adds the section introduction text to the Settings page
+        *
+        * @param array $section
+        */
+       public function markup_section_headers( $section ) {
+               require( dirname( __DIR__ ) . '/views/settings-section-headers.php' );
+       }
+
+       /**
+        * Delivers the markup for settings fields
+        *
+        * @param array $field
+        */
+       public function markup_fields( $field ) {
+               switch ( $field['label_for'] ) {
+                       case 'wccsp_image_id':
+                               $image = wp_get_attachment_image_src( $this->settings['image_id'], 'medium' );
+                       break;
+               }
+
+               require( dirname( __DIR__ ) . '/views/settings-fields.php' );
+       }
+
+       /**
+        * Validates submitted setting values before they get saved to the database.
+        *
+        * @param array $new_settings
+        * @return array
+        */
+       public function validate_settings( $new_settings ) {
+               $new_settings = shortcode_atts( $this->settings, $new_settings );
+
+               if ( 'on' != $new_settings['enabled'] ) {
+                       $new_settings['enabled'] = 'off';
+               }
+               
+               $new_settings['body_background_color']      = sanitize_text_field( $new_settings['body_background_color'] );
+               $new_settings['container_background_color'] = sanitize_text_field( $new_settings['container_background_color'] );
+               $new_settings['text_color']                 = sanitize_text_field( $new_settings['text_color'] );
+               
+               $new_settings['image_id'] = absint( $new_settings['image_id'] );
+               
+               return $new_settings;
+       }
+
+       /**
+        * Renders notices for the administrator when problems are detected
+        */
+       public function render_admin_notices() {
+               $current_screen = get_current_screen();
+               
+               if ( 'settings_page_wccsp_settings' != $current_screen->id ) {
+                       return;
+               }
+
+               $active_modules            = Jetpack::$instance->get_active_modules();
+               $inactive_required_modules = array();
+               $required_modules          = array(
+                       'subscriptions' => 'Subscriptions',
+                       'contact-form'  => 'Contact Form',
+               );
+               
+               foreach ( $required_modules as $module_id => $module_name ) {
+                       if ( ! in_array( $module_id, $active_modules ) ) {
+                               $inactive_required_modules[] = $module_name;
+                       }
+               }
+
+               if ( $inactive_required_modules ) {
+                       require_once( dirname( __DIR__ ) . '/views/settings-admin-notices.php' );
+               }
+       }
+} // end WCCSP_Settings
</ins></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcampcomingsoonpageclasseswordcampcomingsoonpagephp"></a>
<div class="addfile"><h4>Added: sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/classes/wordcamp-coming-soon-page.php (0 => 381)</h4>
<pre class="diff"><span>
<span class="info">--- sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/classes/wordcamp-coming-soon-page.php                          (rev 0)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/classes/wordcamp-coming-soon-page.php     2014-02-06 05:28:11 UTC (rev 381)
</span><span class="lines">@@ -0,0 +1,156 @@
</span><ins>+<?php
+
+class WordCamp_Coming_Soon_Page {
+       protected $override_theme_template;
+       const VERSION = '0.1';
+       
+       /**
+        * Constructor
+        */
+       public function __construct() {
+               add_action( 'init',               array( $this, 'init' ), 11 );                               // after WCCSP_Settings::init()
+               add_action( 'wp_enqueue_scripts', array( $this, 'manage_plugin_theme_stylesheets' ), 99 );    // (hopefully) after all plugins/themes have enqueued their styles
+               add_action( 'wp_head',            array( $this, 'render_dynamic_styles' ) );
+               add_filter( 'template_include',   array( $this, 'override_theme_template' ) );
+       }
+
+       /**
+        * Initialize variables
+        */
+       public function init() {
+               $settings                      = $GLOBALS['WCCSP_Settings']->get_settings();
+               $this->override_theme_template = 'on' == $settings['enabled'] && ! is_user_logged_in();
+       }
+
+       /**
+        * Ensure the template has a consistent base of CSS rules, regardless of the current theme or Custom CSS
+        * Dequeue irrelevant stylesheets and use TwentyThirteen as the base style
+        */
+       public function manage_plugin_theme_stylesheets() {
+               // todo maybe need to exempt jetpack styles also - $exempt_stylesheets = array(  );
+               if ( $this->override_theme_template ) {
+                       foreach( $GLOBALS['wp_styles']->queue as $stylesheet ) {
+                               // todo removing fonts that we want - wp_dequeue_style( $stylesheet );
+                       }
+               }
+
+               $twenty_thirteen_stylesheet = '/twentythirteen/style.css';
+               foreach( $GLOBALS['wp_theme_directories'] as $directory ) {
+                       if ( is_file( $directory . $twenty_thirteen_stylesheet ) ) {
+                               wp_register_style( 'twentythirteen-style-css', $directory . $twenty_thirteen_stylesheet );
+                               wp_register_style( 'twentythirteen-fonts-css', '//fonts.googleapis.com/css?family=Source+Sans+Pro%3A300%2C400%2C700%2C300italic%2C400italic%2C700italic%7CBitter%3A400%2C700&#038;subset=latin%2Clatin-ext' );
+                               
+                               // todo still isn't consistent between local and remote sandboxes
+                       }
+               }
+               
+               wp_register_style(
+                       'wccsp-template',
+                       plugins_url( '/css/template-coming-soon.css', __DIR__ ),
+                       array( 'twentythirteen-style-css', 'twentythirteen-fonts-css' ),
+                       self::VERSION
+               );
+               
+               wp_enqueue_style( 'wccsp-template' );
+       }
+
+       /**
+        * Render dynamic CSS styles
+        */
+       public function render_dynamic_styles() {
+               if ( ! $this->override_theme_template ) {
+                       return;
+               }
+               
+               $settings = $GLOBALS['WCCSP_Settings']->get_settings();
+               ?>
+               
+               <style type="text/css">
+                       html, body {
+                               background-color: <?php echo esc_html( $settings['body_background_color'] ); ?>;
+                               color: <?php echo esc_html( $settings['text_color'] ); ?>;
+                       }
+
+                       #wccsp-container {
+                               background-color: <?php echo esc_html( $settings['container_background_color'] ); ?>;
+                       }
+               </style>
+
+               <?php
+       }
+
+       /**
+        * Load the Coming Soon template instead of a theme template
+        * 
+        * @param string $template
+        * @return string
+        */
+       public function override_theme_template( $template ) {
+               if ( $this->override_theme_template ) {
+                       $template = dirname( __DIR__ ) . '/views/template-coming-soon.php';
+               }
+               
+               return $template;
+       }
+
+       /**
+        * Collect all of the variables the Coming Soon template will need
+        * Doing this here keeps the template less cluttered and more of a pure view
+        * 
+        * @return array
+        */
+       function get_template_variables() {
+               $variables = array(
+                       'image_url'              => $this->get_image_url(),
+                       'dates'                  => $this->get_dates(),
+                       'active_modules'         => Jetpack::$instance->get_active_modules(),
+                       'contact_form_shortcode' => $this->get_contact_form_shortcode(),
+               );
+
+               return $variables;
+       }
+
+       /**
+        * Retrieve the URL of the image displayed in the template
+        * 
+        * @return string|false
+        */
+       public function get_image_url() {
+               $settings = $GLOBALS['WCCSP_Settings']->get_settings();
+               $image    = wp_get_attachment_image_src( $settings['image_id'], 'full' );
+               
+               return $image ? $image[0] : false;
+       }
+
+       /**
+        * Retrieve the dates of the WordCamp
+        * 
+        * @return string|false
+        */
+       public function get_dates() {
+               $dates = false;
+               
+               // todo - switch to blog, lookup based on url or blog id?
+               
+               return $dates;
+       }
+
+       /**
+        * Generate the contact form shortcode string 
+        * 
+        * @return string
+        */
+       public function get_contact_form_shortcode() {
+               $shortcode = sprintf(
+                       "[contact-form to='%s' subject='%s contact request']
+                               [contact-field label='Name' type='name' required='1' /]
+                               [contact-field label='Email' type='email' required='1' /]
+                               [contact-field label='Comment' type='textarea' required='1' /]
+                       [/contact-form]",
+                       get_bloginfo( 'name' ),
+                       get_option( 'admin_email' )
+               );
+               
+               return $shortcode;
+       }
+} // end WordCamp_Coming_Soon_Page
</ins></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcampcomingsoonpagecsstemplatecomingsooncss"></a>
<div class="addfile"><h4>Added: sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/css/template-coming-soon.css (0 => 381)</h4>
<pre class="diff"><span>
<span class="info">--- sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/css/template-coming-soon.css                           (rev 0)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/css/template-coming-soon.css      2014-02-06 05:28:11 UTC (rev 381)
</span><span class="lines">@@ -0,0 +1,82 @@
</span><ins>+h1, h2 {
+       margin-top: 0;
+       margin-bottom: 1em;
+       text-align: center;
+}
+
+#wccsp-container {
+       max-width: 700px;
+       margin: 50px auto;
+       padding: 40px;
+       overflow: auto;
+
+       border: 1px solid black; /* todo box shadow */
+}
+       
+       #wccsp-logo {
+               display: block;
+               margin: 0 auto 40px auto;
+       }
+       
+       #wccsp-introduction {
+               margin-bottom: 0;
+       }
+       
+       .wccsp-box {
+               width: 46%;             /* todo temp workaround */
+               min-height: 150px;
+               float: left;
+               overflow: auto;
+               margin: 40px 40px 0 0;
+               padding: 15px;
+       
+               border: 1px solid black;        /* todo box shadow */
+       }
+       
+               #wccsp-container .wccsp-box:last-child {
+                       margin-right: 0;
+               }
+       
+               .wccsp-box h2 {
+                       margin-top: 0;
+               }
+               
+               .wccsp-box p:last-child {
+                       margin-bottom: 0;
+               }
+               
+               .wccsp-box input[type="text"],
+               .wccsp-box textarea {
+                       width: 100%;
+                       margin-bottom: 1em;
+                       padding: 2px 3px;
+                       
+                       /* todo not working */
+               }
+               
+               .wccsp-box input[type="text"]:last-child {
+                       margin-bottom: 0;
+               }
+               
+               .wccsp-box input[type="submit"] {
+                       margin: 0 auto;                         /*todo not working */
+                       text-align: center;
+               }
+               
+               .wccsp-box textarea {
+                       height: 8em;
+               }
+       
+               .jetpack_subscription_widget {
+                       background-color: inherit;      /* todo some of this unnecessary if leave jetpack dequeued */
+                       margin-bottom: 0;
+                       padding: 0;
+               }
+               
+               .grunion-field-label span {
+                       padding-left: 5px;                      /* todo some of this unnecessary if leave jetpack dequeued */
+               }
+               
+               p.contact-submit {
+                       margin-top: 1em;                        /* todo some of this unnecessary if leave jetpack dequeued */
+               }
</ins></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcampcomingsoonpagejavascriptwccspsettingsjs"></a>
<div class="addfile"><h4>Added: sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/javascript/wccsp-settings.js (0 => 381)</h4>
<pre class="diff"><span>
<span class="info">--- sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/javascript/wccsp-settings.js                           (rev 0)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/javascript/wccsp-settings.js      2014-02-06 05:28:11 UTC (rev 381)
</span><span class="lines">@@ -0,0 +1,37 @@
</span><ins>+jQuery( document ).ready( function( $ ) {
+       
+       var WCCSP_Settings = {
+               
+               /**
+                * Constructor
+                */
+               __construct: function () {
+                       $( '#wccsp-select-image' ).click( WCCSP_Settings.uploader );
+               },
+
+               /**
+                * Injects the media modal and assigns the chosen attachment ID to corresponding input field
+                * 
+                * @param object event
+                * @returns {boolean}
+                */
+               uploader : function( event ) {
+                       var frame = wp.media( {
+                               title           : 'Select Image',
+                               multiple        : false,
+                               library         : { type : 'image' },
+                               button          : { text : 'Select Image' }
+                       } );
+
+                       frame.on( 'close', function() {
+                               var attachments = frame.state().get( 'selection' ).toJSON();
+                               $( '#wccsp_image_id' ).val( parseInt( attachments[0].id ) );
+                       } );
+
+                       frame.open();
+                       return false;
+               }
+       }; // end WCCSP_Settings
+
+       WCCSP_Settings.__construct();
+} );
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcampcomingsoonpageviewssettingsadminnoticesphp"></a>
<div class="addfile"><h4>Added: sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/views/settings-admin-notices.php (0 => 381)</h4>
<pre class="diff"><span>
<span class="info">--- sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/views/settings-admin-notices.php                               (rev 0)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/views/settings-admin-notices.php  2014-02-06 05:28:11 UTC (rev 381)
</span><span class="lines">@@ -0,0 +1,7 @@
</span><ins>+<div class="error">
+       <ul>
+               <?php foreach ( $inactive_required_modules as $module ) : ?>
+                       <li>Please activate Jetpack's <?php echo esc_html( $module ); ?> module.</li>
+               <?php endforeach; ?>
+       </ul>
+</div>
</ins></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcampcomingsoonpageviewssettingsfieldsphp"></a>
<div class="addfile"><h4>Added: sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/views/settings-fields.php (0 => 381)</h4>
<pre class="diff"><span>
<span class="info">--- sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/views/settings-fields.php                              (rev 0)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/views/settings-fields.php 2014-02-06 05:28:11 UTC (rev 381)
</span><span class="lines">@@ -0,0 +1,37 @@
</span><ins>+<?php if ( 'wccsp_enabled_true' == $field['label_for'] ) : ?>
+       <input id="wccsp_enabled_true" name="wccsp_settings[enabled]" type="radio" value="on" <?php checked( $this->settings['enabled'], 'on' ); ?> />
+       <span class="example"> On</span><br />
+       
+       <input id="wccsp_enabled_false" name="wccsp_settings[enabled]" type="radio" value="off" <?php checked( $this->settings['enabled'], 'off' ); ?> />
+       <span class="example"> Off</span>
+<?php endif; ?>
+
+
+<?php if ( 'wccsp_body_background_color' == $field['label_for'] ) : ?>
+       <input id="wccsp_body_background_color" name="wccsp_settings[body_background_color]" type="text" class="short-text" value="<?php echo esc_attr( $this->settings['body_background_color'] ); ?>" />
+<?php endif; ?>
+
+
+<?php if ( 'wccsp_container_background_color' == $field['label_for'] ) : ?>
+       <input id="wccsp_container_background_color" name="wccsp_settings[container_background_color]" type="text" class="short-text" value="<?php echo esc_attr( $this->settings['container_background_color'] ); ?>" />
+<?php endif; ?>
+
+
+<?php if ( 'wccsp_text_color' == $field['label_for'] ) : ?>
+       <input id="wccsp_text_color" name="wccsp_settings[text_color]" type="text" class="short-text" value="<?php echo esc_attr( $this->settings['text_color'] ); ?>" />
+<?php endif; ?>
+
+
+<?php if ( 'wccsp_image_id' == $field['label_for'] ) : ?>
+       <p>
+               <input type="hidden" id="wccsp_image_id" name="wccsp_settings[image_id]" value="<?php echo esc_attr( $this->settings['image_id'] ); ?>" />
+               <a href="javascript:;" id="wccsp-select-image" class="button insert-media add_media" title="Select Image">Select Image</a>
+       </p>
+       
+       <?php if( $image ) : ?>
+               <p>
+                       Current image preview:<br />
+                       <img id="wccsp-logo-preview" src="<?php echo esc_attr( $image[0] ); ?>" alt="Image Preview" />
+               </p>
+       <?php endif; ?>
+<?php endif; ?>
</ins></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcampcomingsoonpageviewssettingsscreenphp"></a>
<div class="addfile"><h4>Added: sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/views/settings-screen.php (0 => 381)</h4>
<pre class="diff"><span>
<span class="info">--- sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/views/settings-screen.php                              (rev 0)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/views/settings-screen.php 2014-02-06 05:28:11 UTC (rev 381)
</span><span class="lines">@@ -0,0 +1,13 @@
</span><ins>+<div class="wrap">
+       <div id="icon-options-general" class="icon32"><br /></div>
+       <h2>Coming Soon</h2>
+
+       <form method="post" action="options.php">
+               <?php settings_fields( 'wccsp_settings' ); ?>
+               <?php do_settings_sections( 'wccsp_settings' ); ?>
+
+               <p class="submit">
+                       <input type="submit" name="submit" id="submit" class="button-primary" value="<?php echo __( 'Save Changes' ); ?>" />
+               </p>
+       </form>
+</div> <!-- .wrap -->
</ins></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcampcomingsoonpageviewssettingssectionheadersphp"></a>
<div class="addfile"><h4>Added: sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/views/settings-section-headers.php (0 => 381)</h4>
<pre class="diff"><span>
<span class="info">--- sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/views/settings-section-headers.php                             (rev 0)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/views/settings-section-headers.php        2014-02-06 05:28:11 UTC (rev 381)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<p>When enabled, the Coming Soon page will be displayed to logged-out users, giving you a chance to setup all of your content before your site is visible to the world. To preview the page, just open your site in a Ignognito/Private tab, or log out of your account.</p>
</ins></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcampcomingsoonpageviewstemplatecomingsoonphp"></a>
<div class="addfile"><h4>Added: sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/views/template-coming-soon.php (0 => 381)</h4>
<pre class="diff"><span>
<span class="info">--- sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/views/template-coming-soon.php                         (rev 0)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/views/template-coming-soon.php    2014-02-06 05:28:11 UTC (rev 381)
</span><span class="lines">@@ -0,0 +1,47 @@
</span><ins>+<!DOCTYPE html>
+<html <?php language_attributes(); ?>>
+<head>
+       <meta charset="<?php bloginfo( 'charset' ); ?>">
+       <meta name="viewport" content="width=device-width">
+       <title><?php echo esc_html( get_bloginfo( 'name' ) ); ?></title>
+       
+       <?php wp_head(); ?>
+       <?php extract( $GLOBALS['WordCamp_Coming_Soon_Page']->get_template_variables() ); ?>
+</head>
+
+<body <?php body_class(); ?>>
+       <div id="wccsp-container">
+               
+               <h1><?php echo esc_attr( get_bloginfo( 'name' ) ); ?></h1>
+               
+               <?php if ( $image_url ) : ?>
+                       <img id="wccsp-logo" src="<?php echo esc_attr( $image_url ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name' ) ); ?>" />
+               <?php endif; ?>
+
+               <?php if ( $dates ) : ?>
+                       <h2><?php echo esc_html( $dates ); ?></h2>
+               <?php endif; ?>
+               
+               <p id="wccsp-introduction">
+                       <?php echo esc_attr( get_bloginfo( 'name' ) ); ?> is in the early planing stages. In the mean time, you can subscribe to be notified when the site goes live, or contact the organizers to get involved.
+               </p>
+
+               <?php if ( in_array( 'subscriptions', $active_modules ) ) : ?>
+                       <div class="wccsp-box">
+                               <?php echo do_shortcode( '[jetpack_subscription_form title="Subscribe for Updates"]' ); ?>
+                       </div>
+               <?php endif; ?>
+
+               <?php if ( in_array( 'contact-form', $active_modules ) ) : ?>
+                       <div class="wccsp-box">
+                               <h2>Contact the Organizers</h2>
+                               
+                               <?php echo do_shortcode( $contact_form_shortcode ); ?>    
+                       </div>
+               <?php endif; ?>
+               
+       </div><!-- #wccsp_container -->
+       
+       <?php wp_footer(); ?>
+</body>
+</html>
</ins></span></pre>
</div>
</div>

</body>
</html>