<!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>[2898] sites/trunk/wordcamp.org: WordCamp.org: Reintegrate application-tracking branch into trunk.</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/2898">2898</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/2898","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-04-05 16:05:02 +0000 (Tue, 05 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'>WordCamp.org: Reintegrate application-tracking branch into trunk.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentmupluginswcorgjsonapiphp">sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/wcorg-json-api.php</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginswcptwcptadminphp">sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-admin.php</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginswcptwcptfunctionsphp">sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-functions.php</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginswcptwcptloaderphp">sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-loader.php</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginswcptwcptwordcampwordcampadminphp">sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-admin.php</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginswcptwcptwordcampwordcamploaderphp">sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-loader.php</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginswcptwcptwordcampwordcampnewsitephp">sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-new-site.php</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginswcptwcptwordcampwordcamptemplatephp">sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-template.php</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcampapiclassesicsphp">sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-api/classes/ics.php</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcamporganizerreminderswcormailerphp">sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-organizer-reminders/wcor-mailer.php</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcamporganizerreminderswcorreminderphp">sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-organizer-reminders/wcor-reminder.php</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcampsiteclonerwordcampsiteclonerphp">sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-site-cloner/wordcamp-site-cloner.php</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentthemeswordcampcentral2012functionsphp">sites/trunk/wordcamp.org/public_html/wp-content/themes/wordcamp-central-2012/functions.php</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentthemeswordcampcentral2012sidebarschedulephp">sites/trunk/wordcamp.org/public_html/wp-content/themes/wordcamp-central-2012/sidebar-schedule.php</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentthemeswordcampcentral2012singlewordcampphp">sites/trunk/wordcamp.org/public_html/wp-content/themes/wordcamp-central-2012/single-wordcamp.php</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentthemeswordcampcentral2012templatehomephp">sites/trunk/wordcamp.org/public_html/wp-content/themes/wordcamp-central-2012/template-home.php</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentthemeswordcampcentral2012templatepastwordcampsphp">sites/trunk/wordcamp.org/public_html/wp-content/themes/wordcamp-central-2012/template-past-wordcamps.php</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentthemeswordcampcentral2012templateschedulephp">sites/trunk/wordcamp.org/public_html/wp-content/themes/wordcamp-central-2012/template-schedule.php</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li>sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/applications/</li>
<li>sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/css/</li>
<li>sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/javascript/</li>
<li>sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/views/</li>
</ul>
<h3>Property Changed</h3>
<ul>
<li><a href="#sitestrunkwordcamporg">sites/trunk/wordcamp.org/</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcamppayments">sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcamppaymentsnetwork">sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments-network/</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<span class="cx" style="display: block; padding: 0 10px">Index: sites/trunk/wordcamp.org
</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 2016-04-05 15:55:25 UTC (rev 2897)
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+++ sites/trunk/wordcamp.org 2016-04-05 16:05:02 UTC (rev 2898)
</ins><a id="sitestrunkwordcamporg"></a>
<div class="propset"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Property changes: sites/trunk/wordcamp.org</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svnmergeinfo"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: svn:mergeinfo</h4></div>
<ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/sites/branches/application-tracking/wordcamp.org:2783-2897
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of property
</span><a id="sitestrunkwordcamporgpublic_htmlwpcontentmupluginswcorgjsonapiphp"></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/mu-plugins/wcorg-json-api.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/mu-plugins/wcorg-json-api.php 2016-04-05 15:55:25 UTC (rev 2897)
+++ sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/wcorg-json-api.php 2016-04-05 16:05:02 UTC (rev 2898)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,5 +1,4 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <?php
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><span class="cx" style="display: block; padding: 0 10px"> /*
</span><span class="cx" style="display: block; padding: 0 10px"> * Customizations to the JSON REST API
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -23,6 +22,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // Allow some routes to skip the JSON REST API v1 plugin.
</span><span class="cx" style="display: block; padding: 0 10px"> add_action( 'parse_request', 'wcorg_json_v2_compat', 9 );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+// Allow users to read new post statuses.
+add_filter( 'json_check_post_read_permission', 'wcorg_json_check_post_read_permission', 10, 2 );
+
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Unhook any endpoints that aren't whitelisted
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -371,3 +373,15 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> return;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+function wcorg_json_check_post_read_permission( $permission, $post ) {
+ if ( $permission || ! defined( 'WCPT_POST_TYPE_ID' ) ) {
+ return $permission;
+ }
+
+ if ( $post['post_type'] != WCPT_POST_TYPE_ID ) {
+ return $permission;
+ }
+
+ return in_array( $post['post_status'], WordCamp_Loader::get_public_post_statuses() );
+}
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginswcptwcptadminphp"></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/wcpt/wcpt-admin.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/wcpt/wcpt-admin.php 2016-04-05 15:55:25 UTC (rev 2897)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-admin.php 2016-04-05 16:05:02 UTC (rev 2898)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -84,17 +84,18 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Add some general styling to the admin area
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function admin_head () {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ ?>
+
</ins><span class="cx" style="display: block; padding: 0 10px"> <style type="text/css" media="screen">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- /*<![CDATA[*/
-<?php
- // Add extra actions to WordCamp Post Type admin header area
- do_action( 'wcpt_admin_head' );
-?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*<![CDATA[*/
+ <?php
+ // Add extra actions to WordCamp Post Type admin header area
+ do_action( 'wcpt_admin_head' );
+ ?>
+ /*]]>*/
+ </style>
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- /*]]>*/
- </style>
-<?php
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <?php
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -124,18 +125,19 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( !wcpt_has_access() )
</span><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-?>
- <h3><?php _e( 'WordCamps', 'wcpt' ); ?></h3>
- <table class="form-table">
- <tr valign="top">
- <th scope="row"><?php _e( 'WordCamps', 'wcpt' ); ?></th>
- <td>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ ?>
+ <h3><?php _e( 'WordCamps', 'wcpt' ); ?></h3>
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- </td>
- </tr>
- </table>
-<?php
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <table class="form-table">
+ <tr valign="top">
+ <th scope="row"><?php _e( 'WordCamps', 'wcpt' ); ?></th>
+ <td>
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ </td>
+ </tr>
+ </table>
+ <?php
+
</ins><span class="cx" style="display: block; padding: 0 10px"> // Add extra actions to WordCamp Post Type profile update
</span><span class="cx" style="display: block; padding: 0 10px"> do_action( 'wcpt_user_profile_wordcamps' );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -170,7 +172,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Loop through menu order and do some rearranging
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $menu_order as $index => $item ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><span class="cx" style="display: block; padding: 0 10px"> // Current item is our forum CPT, so set our separator here
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ( ( 'edit.php?post_type=' . WCPT_POST_TYPE_ID ) == $item ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $wcpt_menu_order[] = 'separator-wcpt';
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -180,7 +181,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // Skip our separator
</span><span class="cx" style="display: block; padding: 0 10px"> if ( !in_array( $item, array( 'separator-wcpt' ) ) )
</span><span class="cx" style="display: block; padding: 0 10px"> $wcpt_menu_order[] = $item;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><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"> // Return our custom order
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginswcptwcptfunctionsphp"></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/wcpt/wcpt-functions.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/wcpt/wcpt-functions.php 2016-04-05 15:55:25 UTC (rev 2897)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-functions.php 2016-04-05 16:05:02 UTC (rev 2898)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -43,7 +43,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return bool $has_access
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wcpt_has_access () {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><span class="cx" style="display: block; padding: 0 10px"> if ( is_super_admin () )
</span><span class="cx" style="display: block; padding: 0 10px"> $has_access = true;
</span><span class="cx" style="display: block; padding: 0 10px"> else
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -85,4 +84,69 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return $prefix . str_replace( array( ' ', '.' ), '_', strtolower( $key ) );
</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">-?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/**
+ * Render the Log metabox
+ *
+ * @param WP_Post $post
+ */
+function wcpt_log_metabox( $post ) {
+ $entries = wcpt_get_log_entries( $post->ID );
+
+ require_once( __DIR__ . '/views/common/metabox-log.php' );
+}
+
+/**
+ * Get all the the entries
+ *
+ * @param int $wordcamp_id
+ *
+ * @return array
+ */
+function wcpt_get_log_entries( $wordcamp_id ) {
+ $entries = array();
+ $notes = get_post_meta( $wordcamp_id, '_note' );
+ $status_changes = get_post_meta( $wordcamp_id, '_status_change' );
+
+ foreach ( array( 'note' => $notes, 'status_change' => $status_changes ) as $entry_type => $raw_entries ) {
+ foreach ( $raw_entries as $entry ) {
+ $user = get_user_by( 'id', $entry['user_id'] );
+
+ $entry['type'] = $entry_type;
+ $entry['user_display_name'] = $user->display_name;
+
+ $entries[] = $entry;
+ }
+ }
+
+ usort( $entries, 'wcpt_sort_log_entries' );
+
+ return $entries;
+}
+
+/**
+ * Sort the log entries in reverse-chronological order
+ *
+ * @param array $a
+ * @param array $b
+ *
+ * @return int
+ */
+function wcpt_sort_log_entries( $a, $b ) {
+ // If a status change and a note occur at the same time, show the change before the note
+ if ( $a['timestamp'] == $b['timestamp'] ) {
+ return ( 'status_change' == $a['type'] ) ? 1 : -1;
+ }
+
+ return ( $a['timestamp'] > $b['timestamp'] ) ? -1 : 1;
+}
+
+/**
+ * Render the Notes metabox
+ *
+ * @param WP_Post $post
+ */
+function wcpt_add_note_metabox( $post ) {
+ wp_nonce_field( 'wcpt_notes', 'wcpt_notes_nonce' );
+
+ require_once( __DIR__ . '/views/common/metabox-notes.php' );
+}
</ins></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginswcptwcptloaderphp"></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/wcpt/wcpt-loader.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/wcpt/wcpt-loader.php 2016-04-05 15:55:25 UTC (rev 2897)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-loader.php 2016-04-05 16:05:02 UTC (rev 2898)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -14,6 +14,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Note: Loaded does NOT mean initialized
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> define( 'WCPT_VERSION', '0.1' );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+define( 'WCPT_DIR', plugin_dir_path( __FILE__ ) );
+define( 'WCPT_URL', plugins_url( '/', __FILE__ ) );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( !class_exists( 'WCPT_Loader' ) ) :
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -29,100 +31,39 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * The main WordCamp Post Type loader
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function wcpt_loader () {
- /** COMPONENT HOOKS ***************************************************/
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ function __construct() {
+ add_action( 'plugins_loaded', array( $this, 'core_admin' ) );
+ add_action( 'init', array( $this, 'core_text_domain' ) );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Attach the wcpt_loaded action to the WordPress plugins_loaded action.
- add_action( 'plugins_loaded', array ( $this, 'component_loaded' ) );
-
- // Attach the wcpt_init to the WordPress init action.
- add_action( 'init', array ( $this, 'component_init' ) );
-
- // Attach constants to wcpt_loaded.
- add_action( 'wcpt_loaded', array ( $this, 'component_constants' ) );
-
- // Attach includes to wcpt_loaded.
- add_action( 'wcpt_loaded', array ( $this, 'component_includes' ) );
-
- // Attach post type registration to wcpt_init.
- add_action( 'wcpt_init', array ( $this, 'component_post_types' ) );
-
- // Attach tag registration wcpt_init.
- add_action( 'wcpt_init', array ( $this, 'component_taxonomies' ) );
-
- /** CORE HOOKS ********************************************************/
-
- // Core Constants
- add_action( 'wcpt_started', array ( $this, 'core_constants' ) );
-
- // Core Includes
- add_action( 'wcpt_started', array ( $this, 'core_includes' ) );
-
- // Core Admin
- add_action( 'wcpt_loaded', array ( $this, 'core_admin' ) );
-
- // Attach theme directory wcpt_loaded.
- add_action( 'wcpt_loaded', array ( $this, 'core_theme_directory' ) );
-
- // Attach textdomain to wcpt_init.
- add_action( 'wcpt_init', array ( $this, 'core_text_domain' ) );
-
- // Register WordCamp Post Type activation sequence
- register_activation_hook( __FILE__, array( $this, 'activation' ) );
-
- // Register WordCamp Post Type deactivation sequence
- register_deactivation_hook( __FILE__, array( $this, 'deactivation' ) );
-
- // Get this party started
- do_action( 'wcpt_started' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->includes();
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * core_constants ()
- *
- * WordCamp Core Constants
- */
- function core_constants () {
- // Turn debugging on/off
- if ( !defined( 'WCPT_DEBUG' ) )
- define( 'WCPT_DEBUG', WP_DEBUG );
-
- // Default slug for post type
- if ( !defined( 'WCPT_THEMES_DIR' ) )
- define( 'WCPT_THEMES_DIR', apply_filters( 'wcpt_themes_dir', WP_PLUGIN_DIR . '/wcpt-themes' ) );
-
- // WordCamp Post Type root directory
- define( 'WCPT_DIR', WP_PLUGIN_DIR . '/wcpt' );
- define( 'WCPT_URL', plugins_url( $path = '/wcpt' ) );
-
- // Images URL
- define( 'WCPT_IMAGES_URL', WCPT_URL . '/wcpt-images' );
- }
-
- /**
- * core_includes ()
- *
</del><span class="cx" style="display: block; padding: 0 10px"> * WordCamp Core File Includes
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function core_includes () {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ function includes() {
</ins><span class="cx" style="display: block; padding: 0 10px"> // Load the files
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- require_once ( WCPT_DIR . '/wcpt-functions.php' );
- require_once ( WCPT_DIR . '/wcpt-wordcamp/wordcamp-loader.php' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ require_once ( WCPT_DIR . 'wcpt-functions.php' );
+ require_once ( WCPT_DIR . 'wcpt-wordcamp/wordcamp-loader.php' );
+ require_once ( WCPT_DIR . 'applications/common.php' );
+ require_once ( WCPT_DIR . 'applications/tracker.php' );
+ require_once ( WCPT_DIR . 'applications/wordcamp.php' );
+
</ins><span class="cx" style="display: block; padding: 0 10px"> // Require admin files.
</span><span class="cx" style="display: block; padding: 0 10px"> if ( is_admin() ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- require_once ( WCPT_DIR . '/wcpt-admin.php' );
- require_once ( WCPT_DIR . '/wcpt-wordcamp/wordcamp-admin.php' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ require_once ( WCPT_DIR . 'wcpt-admin.php' );
+ require_once ( WCPT_DIR . 'wcpt-wordcamp/wordcamp-admin.php' );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function core_admin () {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ function core_admin() {
</ins><span class="cx" style="display: block; padding: 0 10px"> // Quick admin check
</span><span class="cx" style="display: block; padding: 0 10px"> if ( !is_admin() )
</span><span class="cx" style="display: block; padding: 0 10px"> return;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Create admin
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $GLOBALS['wcpt_admin'] = new WCPT_Admin();
- $GLOBALS['wordcamp_admin'] = new WordCamp_Admin();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $GLOBALS['wcpt_admin'] = new WCPT_Admin;
+ $GLOBALS['wordcamp_admin'] = new WordCamp_Admin;
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -130,145 +71,16 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * Load the translation file for current language
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function core_text_domain () {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ function core_text_domain() {
</ins><span class="cx" style="display: block; padding: 0 10px"> $locale = apply_filters( 'wcpt_textdomain', get_locale() );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $mofile = WCPT_DIR . "wcpt-languages/wcpt-$locale.mo";
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $mofile = WCPT_DIR . "/wcpt-languages/wcpt-$locale.mo";
-
</del><span class="cx" style="display: block; padding: 0 10px"> load_textdomain( 'wcpt', $mofile );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
- /**
- * Text domain has been loaded
- */
- do_action( 'wcpt_load_textdomain' );
</del><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
- /**
- * core_theme_directory ()
- *
- * Sets up the WordCamp Post Type theme directory to use in WordPress
- *
- * @since WordCamp Post Type (0.1)
- * @uses register_theme_directory
- */
- function core_theme_directory () {
- register_theme_directory( WCPT_THEMES_DIR );
-
- /**
- * Theme directory has been registered
- */
- do_action( 'wcpt_register_theme_directory' );
- }
-
- /**
- * activation ()
- *
- * Runs on WordCamp Post Type activation
- *
- * @since WordCamp Post Type (0.1)
- */
- function activation () {
- register_uninstall_hook( __FILE__, array( $this, 'uninstall' ) );
-
- /**
- * WordCamp Post Type has been activated
- */
- do_action( 'wcpt_activation' );
- }
-
- /**
- * deactivation ()
- *
- * Runs on WordCamp Post Type deactivation
- *
- * @since WordCamp Post Type (0.1)
- */
- function deactivation () {
- do_action( 'wcpt_deactivation' );
- }
-
- /**
- * uninstall ()
- *
- * Runs when uninstalling WordCamp Post Type
- *
- * @since WordCamp Post Type (0.1)
- */
- function uninstall () {
- do_action( 'wcpt_uninstall' );
- }
-
- /**
- * component_constants ()
- *
- * Default component constants that can be overridden or filtered
- */
- function component_constants () {
- do_action( 'wcpt_constants' );
- }
-
- /**
- * component_includes ()
- *
- * Include required files
- *
- */
- function component_includes () {
- do_action( 'wcpt_includes' );
- }
-
- /**
- * component_loaded ()
- *
- * A WordCamp Post Type specific action to say that it has started its
- * boot strapping sequence. It's attached to the existing WordPress
- * action 'plugins_loaded' because that's when all plugins have loaded.
- *
- * @uses is_admin If in WordPress admin, load additional file
- * @uses do_action()
- */
- function component_loaded () {
- do_action( 'wcpt_loaded' );
- }
-
- /**
- * component_init ()
- *
- * Initialize WordCamp Post Type as part of the WordPress initilization process
- *
- * @uses do_action Calls custom action to allow external enhancement
- */
- function component_init () {
- do_action ( 'wcpt_init' );
- }
-
- /**
- * component_post_type ()
- *
- * Setup the post types and taxonomies
- */
- function component_post_types () {
- do_action ( 'wcpt_register_post_types' );
- }
-
- /**
- * component_taxonomies ()
- *
- * Register the built in WordCamp Post Type taxonomies
- *
- * @since WordCamp Post Type (0.1)
- *
- * @uses register_taxonomy()
- * @uses apply_filters()
- */
- function component_taxonomies () {
- do_action ( 'wcpt_register_taxonomies' );
- }
</del><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"> endif; // class_exists check
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Load everything up
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-$wcpt_loader = new WCPT_Loader();
-$wordcamp_loader = new WordCamp_Loader();
-?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+$wcpt_loader = new WCPT_Loader;
+$wordcamp_loader = new WordCamp_Loader;
</ins></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginswcptwcptwordcampwordcampadminphp"></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/wcpt/wcpt-wordcamp/wordcamp-admin.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/wcpt/wcpt-wordcamp/wordcamp-admin.php 2016-04-05 15:55:25 UTC (rev 2897)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-admin.php 2016-04-05 16:05:02 UTC (rev 2898)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -14,11 +14,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> protected $active_admin_notices;
</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">- * wcpt_admin ()
- *
</del><span class="cx" style="display: block; padding: 0 10px"> * Initialize WCPT Admin
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function WordCamp_Admin () {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ function __construct() {
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->active_admin_notices = array();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Add some general styling to the admin area
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -26,14 +24,15 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Forum column headers.
</span><span class="cx" style="display: block; padding: 0 10px"> add_filter( 'manage_' . WCPT_POST_TYPE_ID . '_posts_columns', array( $this, 'column_headers' ) );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ add_filter( 'display_post_states', array( $this, 'display_post_states' ) );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Forum columns (in page row)
</span><span class="cx" style="display: block; padding: 0 10px"> add_action( 'manage_posts_custom_column', array( $this, 'column_data' ), 10, 2 );
</span><span class="cx" style="display: block; padding: 0 10px"> add_filter( 'post_row_actions', array( $this, 'post_row_actions' ), 10, 2 );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Topic metabox actions
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- add_action( 'admin_menu', array( $this, 'metabox' ) );
- add_action( 'save_post', array( $this, 'metabox_save' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ add_action( 'add_meta_boxes', array( $this, 'metabox' ) );
+ add_action( 'save_post', array( $this, 'metabox_save' ), 10, 2 );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Scripts and CSS
</span><span class="cx" style="display: block; padding: 0 10px"> add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts' ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -42,10 +41,11 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Post status transitions
</span><span class="cx" style="display: block; padding: 0 10px"> add_action( 'transition_post_status', array( $this, 'trigger_schedule_actions' ), 10, 3 );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ add_action( 'transition_post_status', array( $this, 'log_status_changes' ), 10, 3 );
</ins><span class="cx" style="display: block; padding: 0 10px"> add_action( 'wcpt_added_to_planning_schedule', array( $this, 'add_organizer_to_central' ), 10 );
</span><span class="cx" style="display: block; padding: 0 10px"> add_action( 'wcpt_added_to_planning_schedule', array( $this, 'mark_date_added_to_planning_schedule' ), 10 );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- add_filter( 'wp_insert_post_data', array( $this, 'enforce_post_status_progression' ), 10, 2 );
- add_filter( 'wp_insert_post_data', array( $this, 'require_complete_meta_to_publish_wordcamp' ), 10, 2 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ add_filter( 'wp_insert_post_data', array( $this, 'enforce_post_status' ), 10, 2 );
+ add_filter( 'wp_insert_post_data', array( $this, 'require_complete_meta_to_publish_wordcamp' ), 11, 2 ); // after enforce_post_status
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Admin notices
</span><span class="cx" style="display: block; padding: 0 10px"> add_action( 'admin_notices', array( $this, 'print_admin_notices' ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -86,6 +86,50 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'advanced',
</span><span class="cx" style="display: block; padding: 0 10px"> 'high'
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ add_meta_box(
+ 'wcpt_original_application',
+ 'Original Application',
+ array( $this, 'original_application_metabox' ),
+ WCPT_POST_TYPE_ID,
+ 'advanced',
+ 'low'
+ );
+
+ // Notes are private, so only show them to network admins
+ if ( current_user_can( 'manage_network' ) ) {
+ add_meta_box(
+ 'wcpt_notes',
+ __( 'Add a Note', 'wordcamporg' ),
+ 'wcpt_add_note_metabox',
+ WCPT_POST_TYPE_ID,
+ 'side',
+ 'low'
+ );
+
+ add_meta_box(
+ 'wcpt_log',
+ 'Log',
+ 'wcpt_log_metabox',
+ WCPT_POST_TYPE_ID,
+ 'advanced',
+ 'low'
+ );
+ }
+
+ // Remove core's submitdiv.
+ remove_meta_box( 'submitdiv', WCPT_POST_TYPE_ID, 'side' );
+
+ $statuses = WordCamp_Loader::get_post_statuses();
+
+ add_meta_box(
+ 'submitdiv',
+ __( 'Status', 'wordcamporg' ),
+ array( $this, 'metabox_status' ),
+ WCPT_POST_TYPE_ID,
+ 'side',
+ 'high'
+ );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -96,8 +140,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $post_id
</span><span class="cx" style="display: block; padding: 0 10px"> * @return int
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function metabox_save( $post_id ) {
-
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ function metabox_save( $post_id, $post ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> // Don't add/remove meta on revisions and auto-saves
</span><span class="cx" style="display: block; padding: 0 10px"> if ( wp_is_post_autosave( $post_id ) || wp_is_post_revision( $post_id ) )
</span><span class="cx" style="display: block; padding: 0 10px"> return;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -112,6 +155,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // Make sure the requset came from the edit post screen.
+ if ( empty( $_POST['_wpnonce'] ) || ! wp_verify_nonce( $_POST['_wpnonce'], 'update-post_' . $post_id ) ) {
+ return;
+ }
+
</ins><span class="cx" style="display: block; padding: 0 10px"> // If the venue address was changed, update its coordinates
</span><span class="cx" style="display: block; padding: 0 10px"> $new_address = $_POST[ wcpt_key_to_str( 'Physical Address', 'wcpt_' ) ];
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $new_address != get_post_meta( $post_id, 'Physical Address', true ) ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -127,7 +175,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Loop through meta keys and update
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $wcpt_meta_keys as $key => $value ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><span class="cx" style="display: block; padding: 0 10px"> // Get post value
</span><span class="cx" style="display: block; padding: 0 10px"> $post_value = wcpt_key_to_str( $key, 'wcpt_' );
</span><span class="cx" style="display: block; padding: 0 10px"> $values[ $key ] = isset( $_POST[ $post_value ] ) ? esc_attr( $_POST[ $post_value ] ) : '';
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -158,9 +205,32 @@
</span><span class="cx" style="display: block; padding: 0 10px"> break;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ $this->validate_and_add_note( $post_id );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Validate and add a new note
+ *
+ * @param int $post_id
+ */
+ protected function validate_and_add_note( $post_id ) {
+ check_admin_referer( 'wcpt_notes', 'wcpt_notes_nonce' );
+
+ $new_note_message = sanitize_text_field( wp_unslash( $_POST['wcpt_new_note'] ) );
+
+ if ( empty( $new_note_message ) ) {
+ return;
+ }
+
+ add_post_meta( $post_id, '_note', array(
+ 'timestamp' => time(),
+ 'user_id' => get_current_user_id(),
+ 'message' => $new_note_message,
+ ) );
+ }
+
+ /**
</ins><span class="cx" style="display: block; padding: 0 10px"> * Geocode the given address into a latitude and longitude pair.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $address
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -196,7 +266,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return array
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function meta_keys( $meta_group = '' ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><span class="cx" style="display: block; padding: 0 10px"> /*
</span><span class="cx" style="display: block; padding: 0 10px"> * Warning: These keys are used for both the input field label and the postmeta key, so if you want to
</span><span class="cx" style="display: block; padding: 0 10px"> * modify an existing label then you'll also need to migrate any rows in the database to use the new key.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -211,43 +280,43 @@
</span><span class="cx" style="display: block; padding: 0 10px"> switch ( $meta_group ) {
</span><span class="cx" style="display: block; padding: 0 10px"> case 'organizer':
</span><span class="cx" style="display: block; padding: 0 10px"> $retval = array (
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'Organizer Name' => 'text',
- 'WordPress.org Username' => 'text',
- 'Email Address' => 'text', // Note: This is the lead organizer's e-mail address, which is different than the "E-mail Address" field
- 'Telephone' => 'text',
- 'Mailing Address' => 'textarea',
- 'Sponsor Wrangler Name' => 'text',
- 'Sponsor Wrangler E-mail Address' => 'text',
- 'Budget Wrangler Name' => 'text',
- 'Budget Wrangler E-mail Address' => 'text',
- 'Venue Wrangler Name' => 'text',
- 'Venue Wrangler E-mail Address' => 'text',
- 'Speaker Wrangler Name' => 'text',
- 'Speaker Wrangler E-mail Address' => 'text',
- 'Food/Beverage Wrangler Name' => 'text',
- 'Food/Beverage Wrangler E-mail Address' => 'text',
- 'Swag Wrangler Name' => 'text',
- 'Swag Wrangler E-mail Address' => 'text',
- 'Volunteer Wrangler Name' => 'text',
- 'Volunteer Wrangler E-mail Address' => 'text',
- 'Printing Wrangler Name' => 'text',
- 'Printing Wrangler E-mail Address' => 'text',
- 'Design Wrangler Name' => 'text',
- 'Design Wrangler E-mail Address' => 'text',
- 'Website Wrangler Name' => 'text',
- 'Website Wrangler E-mail Address' => 'text',
- 'Social Media/Publicity Wrangler Name' => 'text',
- 'Social Media/Publicity Wrangler E-mail Address' => 'text',
- 'A/V Wrangler Name' => 'text',
- 'A/V Wrangler E-mail Address' => 'text',
- 'Party Wrangler Name' => 'text',
- 'Party Wrangler E-mail Address' => 'text',
- 'Travel Wrangler Name' => 'text',
- 'Travel Wrangler E-mail Address' => 'text',
- 'Safety Wrangler Name' => 'text',
- 'Safety Wrangler E-mail Address' => 'text',
- 'Mentor Name' => 'text',
- 'Mentor E-mail Address' => 'text',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'Organizer Name' => 'text',
+ 'WordPress.org Username' => 'text',
+ 'Email Address' => 'text', // Note: This is the lead organizer's e-mail address, which is different than the "E-mail Address" field
+ 'Telephone' => 'text',
+ 'Mailing Address' => 'textarea',
+ 'Sponsor Wrangler Name' => 'text',
+ 'Sponsor Wrangler E-mail Address' => 'text',
+ 'Budget Wrangler Name' => 'text',
+ 'Budget Wrangler E-mail Address' => 'text',
+ 'Venue Wrangler Name' => 'text',
+ 'Venue Wrangler E-mail Address' => 'text',
+ 'Speaker Wrangler Name' => 'text',
+ 'Speaker Wrangler E-mail Address' => 'text',
+ 'Food/Beverage Wrangler Name' => 'text',
+ 'Food/Beverage Wrangler E-mail Address' => 'text',
+ 'Swag Wrangler Name' => 'text',
+ 'Swag Wrangler E-mail Address' => 'text',
+ 'Volunteer Wrangler Name' => 'text',
+ 'Volunteer Wrangler E-mail Address' => 'text',
+ 'Printing Wrangler Name' => 'text',
+ 'Printing Wrangler E-mail Address' => 'text',
+ 'Design Wrangler Name' => 'text',
+ 'Design Wrangler E-mail Address' => 'text',
+ 'Website Wrangler Name' => 'text',
+ 'Website Wrangler E-mail Address' => 'text',
+ 'Social Media/Publicity Wrangler Name' => 'text',
+ 'Social Media/Publicity Wrangler E-mail Address' => 'text',
+ 'A/V Wrangler Name' => 'text',
+ 'A/V Wrangler E-mail Address' => 'text',
+ 'Party Wrangler Name' => 'text',
+ 'Party Wrangler E-mail Address' => 'text',
+ 'Travel Wrangler Name' => 'text',
+ 'Travel Wrangler E-mail Address' => 'text',
+ 'Safety Wrangler Name' => 'text',
+ 'Safety Wrangler E-mail Address' => 'text',
+ 'Mentor Name' => 'text',
+ 'Mentor E-mail Address' => 'text',
</ins><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> break;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -291,43 +360,43 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'Number of Anticipated Attendees' => 'text',
</span><span class="cx" style="display: block; padding: 0 10px"> 'Multi-Event Sponsor Region' => 'mes-dropdown',
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'Organizer Name' => 'text',
- 'WordPress.org Username' => 'text',
- 'Email Address' => 'text',
- 'Telephone' => 'text',
- 'Mailing Address' => 'textarea',
- 'Sponsor Wrangler Name' => 'text',
- 'Sponsor Wrangler E-mail Address' => 'text',
- 'Budget Wrangler Name' => 'text',
- 'Budget Wrangler E-mail Address' => 'text',
- 'Venue Wrangler Name' => 'text',
- 'Venue Wrangler E-mail Address' => 'text',
- 'Speaker Wrangler Name' => 'text',
- 'Speaker Wrangler E-mail Address' => 'text',
- 'Food/Beverage Wrangler Name' => 'text',
- 'Food/Beverage Wrangler E-mail Address' => 'text',
- 'Swag Wrangler Name' => 'text',
- 'Swag Wrangler E-mail Address' => 'text',
- 'Volunteer Wrangler Name' => 'text',
- 'Volunteer Wrangler E-mail Address' => 'text',
- 'Printing Wrangler Name' => 'text',
- 'Printing Wrangler E-mail Address' => 'text',
- 'Design Wrangler Name' => 'text',
- 'Design Wrangler E-mail Address' => 'text',
- 'Website Wrangler Name' => 'text',
- 'Website Wrangler E-mail Address' => 'text',
- 'Social Media/Publicity Wrangler Name' => 'text',
- 'Social Media/Publicity Wrangler E-mail Address' => 'text',
- 'A/V Wrangler Name' => 'text',
- 'A/V Wrangler E-mail Address' => 'text',
- 'Party Wrangler Name' => 'text',
- 'Party Wrangler E-mail Address' => 'text',
- 'Travel Wrangler Name' => 'text',
- 'Travel Wrangler E-mail Address' => 'text',
- 'Safety Wrangler Name' => 'text',
- 'Safety Wrangler E-mail Address' => 'text',
- 'Mentor Name' => 'text',
- 'Mentor E-mail Address' => 'text',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'Organizer Name' => 'text',
+ 'WordPress.org Username' => 'text',
+ 'Email Address' => 'text',
+ 'Telephone' => 'text',
+ 'Mailing Address' => 'textarea',
+ 'Sponsor Wrangler Name' => 'text',
+ 'Sponsor Wrangler E-mail Address' => 'text',
+ 'Budget Wrangler Name' => 'text',
+ 'Budget Wrangler E-mail Address' => 'text',
+ 'Venue Wrangler Name' => 'text',
+ 'Venue Wrangler E-mail Address' => 'text',
+ 'Speaker Wrangler Name' => 'text',
+ 'Speaker Wrangler E-mail Address' => 'text',
+ 'Food/Beverage Wrangler Name' => 'text',
+ 'Food/Beverage Wrangler E-mail Address' => 'text',
+ 'Swag Wrangler Name' => 'text',
+ 'Swag Wrangler E-mail Address' => 'text',
+ 'Volunteer Wrangler Name' => 'text',
+ 'Volunteer Wrangler E-mail Address' => 'text',
+ 'Printing Wrangler Name' => 'text',
+ 'Printing Wrangler E-mail Address' => 'text',
+ 'Design Wrangler Name' => 'text',
+ 'Design Wrangler E-mail Address' => 'text',
+ 'Website Wrangler Name' => 'text',
+ 'Website Wrangler E-mail Address' => 'text',
+ 'Social Media/Publicity Wrangler Name' => 'text',
+ 'Social Media/Publicity Wrangler E-mail Address' => 'text',
+ 'A/V Wrangler Name' => 'text',
+ 'A/V Wrangler E-mail Address' => 'text',
+ 'Party Wrangler Name' => 'text',
+ 'Party Wrangler E-mail Address' => 'text',
+ 'Travel Wrangler Name' => 'text',
+ 'Travel Wrangler E-mail Address' => 'text',
+ 'Safety Wrangler Name' => 'text',
+ 'Safety Wrangler E-mail Address' => 'text',
+ 'Mentor Name' => 'text',
+ 'Mentor E-mail Address' => 'text',
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> 'Venue Name' => 'text',
</span><span class="cx" style="display: block; padding: 0 10px"> 'Physical Address' => 'textarea',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -355,6 +424,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> function admin_print_scripts() {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( get_post_type() == WCPT_POST_TYPE_ID ) :
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> ?>
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> <script>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -402,7 +472,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> function user_profile_update( $user_id ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( !wcpt_has_access() )
</span><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -413,18 +482,17 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @todo Everything
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function user_profile_wordcamp( $profileuser ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><span class="cx" style="display: block; padding: 0 10px"> if ( !wcpt_has_access() )
</span><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><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"> <h3><?php _e( 'WordCamps', 'wcpt' ); ?></h3>
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> <table class="form-table">
</span><span class="cx" style="display: block; padding: 0 10px"> <tr valign="top">
</span><span class="cx" style="display: block; padding: 0 10px"> <th scope="row"><?php _e( 'WordCamps', 'wcpt' ); ?></th>
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> <td>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><span class="cx" style="display: block; padding: 0 10px"> </td>
</span><span class="cx" style="display: block; padding: 0 10px"> </tr>
</span><span class="cx" style="display: block; padding: 0 10px"> </table>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -454,6 +522,28 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Display the status of a WordCamp post
+ *
+ * @param array $states
+ *
+ * @return array
+ */
+ public function display_post_states( $states ) {
+ global $post;
+
+ if ( $post->post_type != WCPT_POST_TYPE_ID ) {
+ return $states;
+ }
+
+ $status = get_post_status_object( $post->post_status );
+ if ( get_query_var( 'post_status' ) != $post->post_status ) {
+ $states[ $status->name ] = $status->label;
+ }
+
+ return $states;
+ }
+
+ /**
</ins><span class="cx" style="display: block; padding: 0 10px"> * column_data ( $column, $post_id )
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * Print extra columns
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -471,7 +561,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> break;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> case 'wcpt_date' :
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><span class="cx" style="display: block; padding: 0 10px"> // Has a start date
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $start = wcpt_get_wordcamp_start_date() ) {
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -525,16 +614,13 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> echo implode( ' - ', (array) $wc );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> return $actions;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Trigger actions related to WordCamps being scheduled.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * When an application is submitted, a `wordcamp` post is created with a `draft` status. When it's accepted
- * to the planning schedule the status changes to `pending`, and when it's accepted for the final schedule
- * the status changes to 'publish'.
- *
</del><span class="cx" style="display: block; padding: 0 10px"> * @param string $new_status
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $old_status
</span><span class="cx" style="display: block; padding: 0 10px"> * @param WP_Post $post
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -544,14 +630,53 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( $new_status == $old_status ) {
+ return;
+ }
+
+ if ( $old_status == 'wcpt-pre-planning' && $new_status == 'wcpt-pre-planning' ) {
+ do_action( 'wcpt_added_to_planning_schedule', $post );
+ } elseif ( $old_status == 'wcpt-needs-schedule' && $new_status == 'wcpt-scheduled' ) {
+ do_action( 'wcpt_added_to_final_schedule', $post );
+ }
+
+ // back-compat for old statuses
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( 'draft' == $old_status && 'pending' == $new_status ) {
</span><span class="cx" style="display: block; padding: 0 10px"> do_action( 'wcpt_added_to_planning_schedule', $post );
</span><span class="cx" style="display: block; padding: 0 10px"> } elseif ( 'pending' == $old_status && 'publish' == $new_status ) {
</span><span class="cx" style="display: block; padding: 0 10px"> do_action( 'wcpt_added_to_final_schedule', $post );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ // todo add new triggers - which ones?
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Log when the post status changes
+ *
+ * @param string $new_status
+ * @param string $old_status
+ * @param WP_Post $post
+ */
+ public function log_status_changes( $new_status, $old_status, $post ) {
+ if ( $new_status === $old_status || $new_status == 'auto-draft' ) {
+ return;
+ }
+
+ if ( empty( $post->post_type ) || WCPT_POST_TYPE_ID != $post->post_type ) {
+ return;
+ }
+
+ $old_status = get_post_status_object( $old_status );
+ $new_status = get_post_status_object( $new_status );
+
+ add_post_meta( $post->ID, '_status_change', array(
+ 'timestamp' => time(),
+ 'user_id' => get_current_user_id(),
+ 'message' => sprintf( '%s → %s', $old_status->label, $new_status->label ),
+ ) );
+ }
+
+ /**
</ins><span class="cx" style="display: block; padding: 0 10px"> * Add the lead organizer to Central when a WordCamp application is accepted.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * Adding the lead organizer to Central allows them to enter all the `wordcamp`
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -580,31 +705,34 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Force WordCamp posts to go through the expected status progression.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Enforce a valid post status for WordCamps.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * They should start as drafts, then move to pending, and then be published. This is necessary because
- * many automated processes (e.g., Organizer Reminder emails) are triggered when the post moves from
- * one status to another, and deviations from the expected progression can cause bugs.
- *
- * Posts should still be allowed to move backwards in the progression, though.
- *
</del><span class="cx" style="display: block; padding: 0 10px"> * @param array $post_data
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $post_data_raw
</span><span class="cx" style="display: block; padding: 0 10px"> * @return array
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- public function enforce_post_status_progression( $post_data, $post_data_raw ) {
- if ( WCPT_POST_TYPE_ID == $post_data['post_type'] && ! empty( $_POST ) ) {
- $previous_post_status = get_post( absint( $_POST['post_ID'] ) );
- $previous_post_status = $previous_post_status->post_status;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function enforce_post_status( $post_data, $post_data_raw ) {
+ if ( $post_data['post_type'] != WCPT_POST_TYPE_ID || empty( $_POST['post_ID'] ) ) {
+ return $post_data;
+ }
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 'pending' == $post_data['post_status'] && ! in_array( $previous_post_status, array( 'draft', 'pending', 'publish' ) ) ) {
- $this->active_admin_notices[] = 2;
- $post_data['post_status'] = $previous_post_status;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $post = get_post( $_POST['post_ID'] );
+ if ( ! $post ) {
+ return $post_data;
+ }
+
+ if ( ! empty( $post_data['post_status'] ) ) {
+ // Only network admins can change WordCamp statuses.
+ if ( ! current_user_can( 'network_admin' ) ) {
+ $post_data['post_status'] = $post->post_status;
</ins><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">- if ( 'publish' == $post_data['post_status'] && ! in_array( $previous_post_status, array( 'pending', 'publish' ) ) ) {
- $this->active_admin_notices[] = 2;
- $post_data['post_status'] = $previous_post_status;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // Enforce a valid status.
+ $statuses = array_keys( WordCamp_Loader::get_post_statuses() );
+ $statuses = array_merge( $statuses, array( 'trash' ) );
+
+ if ( ! in_array( $post_data['post_status'], $statuses ) ) {
+ $post_data['post_status'] = $statuses[0];
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -626,30 +754,30 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // The ID of the last site that was created before this rule went into effect, so that we don't apply the rule retroactively.
</span><span class="cx" style="display: block; padding: 0 10px"> $min_site_id = apply_filters( 'wcpt_require_complete_meta_min_site_id', '2416297' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $required_pending_fields = $this->get_required_fields( 'pending' );
- $required_publish_fields = $this->get_required_fields( 'publish' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $required_pre_planning_fields = $this->get_required_fields( 'pre-planning' );
+ $required_scheduled_fields = $this->get_required_fields( 'scheduled' );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Check pending posts
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 'pending' == $post_data['post_status'] && absint( $_POST['post_ID'] ) > $min_site_id ) {
- foreach( $required_pending_fields as $field ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( 'wcpt-approved-pre-pl' == $post_data['post_status'] && absint( $_POST['post_ID'] ) > $min_site_id ) {
+ foreach( $required_pre_planning_fields as $field ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $value = $_POST[ wcpt_key_to_str( $field, 'wcpt_' ) ];
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( empty( $value ) || 'null' == $value ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $post_data['post_status'] = 'draft';
- $this->active_admin_notices[] = 3;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $post_data['post_status'] = 'wcpt-interview-sched';
+ $this->active_admin_notices[] = 1;
</ins><span class="cx" style="display: block; padding: 0 10px"> break;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Check published posts
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 'publish' == $post_data['post_status'] && isset( $_POST['post_ID'] ) && absint( $_POST['post_ID'] ) > $min_site_id ) {
- foreach( $required_publish_fields as $field ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( 'wcpt-scheduled' == $post_data['post_status'] && isset( $_POST['post_ID'] ) && absint( $_POST['post_ID'] ) > $min_site_id ) {
+ foreach( $required_scheduled_fields as $field ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $value = $_POST[ wcpt_key_to_str( $field, 'wcpt_' ) ];
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( empty( $value ) || 'null' == $value ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $post_data['post_status'] = 'pending';
- $this->active_admin_notices[] = 1;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $post_data['post_status'] = 'wcpt-needs-schedule';
+ $this->active_admin_notices[] = 3;
</ins><span class="cx" style="display: block; padding: 0 10px"> break;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -661,14 +789,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Get a list of fields required to move to a certain post status
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param string $status 'pending' | 'publish' | 'any'
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param string $status 'pre-planning' | 'scheduled' | 'any'
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @return array
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public static function get_required_fields( $status ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $pending = array( 'E-mail Address' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $pre_planning = array( 'E-mail Address' );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $publish = array(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $scheduled = array(
</ins><span class="cx" style="display: block; padding: 0 10px"> // WordCamp
</span><span class="cx" style="display: block; padding: 0 10px"> 'Start Date (YYYY-mm-dd)',
</span><span class="cx" style="display: block; padding: 0 10px"> 'Location',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -690,17 +818,17 @@
</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"> switch ( $status ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- case 'pending':
- $required_fields = $pending;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ case 'pre-planning':
+ $required_fields = $pre_planning;
</ins><span class="cx" style="display: block; padding: 0 10px"> break;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- case 'publish':
- $required_fields = $publish;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ case 'scheduled':
+ $required_fields = $scheduled;
</ins><span class="cx" style="display: block; padding: 0 10px"> break;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> case 'any':
</span><span class="cx" style="display: block; padding: 0 10px"> default:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $required_fields = array_merge( $pending, $publish );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $required_fields = array_merge( $pre_planning, $scheduled );
</ins><span class="cx" style="display: block; padding: 0 10px"> break;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -750,23 +878,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $notices = array(
</span><span class="cx" style="display: block; padding: 0 10px"> 1 => array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'type' => 'error',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'notice' => __( 'This WordCamp cannot be published until all of its required metadata is filled in.', 'wordcamporg' ),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'notice' => __( 'This WordCamp cannot be approved for pre-planning until all of its required metadata is filled in.', 'wordcamporg' ),
</ins><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">- 2 => array(
- 'type' => 'error',
- 'notice' => sprintf(
- __(
- 'WordCamps must start as drafts, then be set as pending, and then be published. The post status has been reset to <strong>%s</strong>.', // todo improve language
- 'wordcamporg'
- ),
- $post->post_status
- )
- ),
-
</del><span class="cx" style="display: block; padding: 0 10px"> 3 => array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'type' => 'error',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'notice' => __( 'This WordCamp cannot be set to pending until all of its required metadata is filled in.', 'wordcamporg' ),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'notice' => __( 'This WordCamp cannot be added to the schedule until all of its required metadata is filled in.', 'wordcamporg' ),
</ins><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -786,6 +903,21 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ /**
+ * Render the WordCamp status meta box.
+ */
+ public function metabox_status( $post ) {
+ require_once( WCPT_DIR . 'views/wordcamp/metabox-status.php' );
+ }
+
+ /**
+ * Render the WordCamp status meta box.
+ */
+ public function original_application_metabox( $post ) {
+ $application_data = get_post_meta( $post->ID, '_application_data', true );
+ require_once( WCPT_DIR . 'views/wordcamp/metabox-original-application.php' );
+ }
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> endif; // class_exists check
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -884,7 +1016,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> <?php if ( ! empty( $messages[ $key ] ) ) : ?>
</span><span class="cx" style="display: block; padding: 0 10px"> <?php if ( 'textarea' == $value ) { echo '<br />'; } ?>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> <span class="description"><?php echo esc_html( $messages[ $key ] ); ?></span>
</span><span class="cx" style="display: block; padding: 0 10px"> <?php endif; ?>
</span><span class="cx" style="display: block; padding: 0 10px"> </p>
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginswcptwcptwordcampwordcamploaderphp"></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/wcpt/wcpt-wordcamp/wordcamp-loader.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/wcpt/wcpt-wordcamp/wordcamp-loader.php 2016-04-05 15:55:25 UTC (rev 2897)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-loader.php 2016-04-05 16:05:02 UTC (rev 2898)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,6 +1,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <?php
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-if ( !class_exists( 'WordCamp_Loader' ) ) :
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+define( 'WCPT_POST_TYPE_ID', 'wordcamp' );
+define( 'WCPT_YEAR_ID', 'wordcamp_year' );
+define( 'WCPT_SLUG', 'wordcamps' );
+define( 'WCPT_DEFAULT_STATUS', 'wcpt-needs-vetting' );
+define( 'WCPT_FINAL_STATUS', 'wcpt-closed' );
+
+if ( ! class_exists( 'WordCamp_Loader' ) ) :
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * WordCamp_Loader
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -14,42 +20,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * The main WordCamp Post Type loader
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function wordcamp_loader () {
-
- // Attach constants to wcpt_loaded.
- add_action( 'wcpt_constants', array ( $this, 'constants' ) );
-
- // Attach includes to wcpt_includes.
- add_action( 'wcpt_includes', array ( $this, 'includes' ) );
-
- // Attach post type registration to wcpt_register_post_types.
- add_action( 'wcpt_register_post_types', array ( $this, 'register_post_types' ) );
-
- // Attach tag registration wcpt_register_taxonomies.
- //add_action( 'wcpt_register_taxonomies', array ( $this, 'register_taxonomies' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ function __construct() {
+ add_action( 'plugins_loaded', array( $this, 'includes' ) );
+ add_action( 'init', array( $this, 'register_post_types' ) );
+ add_action( 'init', array( $this, 'register_post_statuses' ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * constants ()
- *
- * Default component constants that can be overridden or filtered
- */
- function constants () {
-
- // The default post type ID
- if ( !defined( 'WCPT_POST_TYPE_ID' ) )
- define( 'WCPT_POST_TYPE_ID', apply_filters( 'wcpt_post_type_id', 'wordcamp' ) );
-
- // The default year ID
- if ( !defined( 'WCPT_YEAR_ID' ) )
- define( 'WCPT_YEAR_ID', apply_filters( 'wcpt_tag_id', 'wordcamp_year' ) );
-
- // Default slug for post type
- if ( !defined( 'WCPT_SLUG' ) )
- define( 'WCPT_SLUG', apply_filters( 'wcpt_slug', 'wordcamps' ) );
- }
-
- /**
</del><span class="cx" style="display: block; padding: 0 10px"> * includes ()
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * Include required files
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -57,16 +34,16 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @uses is_admin If in WordPress admin, load additional file
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function includes () {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><span class="cx" style="display: block; padding: 0 10px"> // Load the files
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- require_once ( WCPT_DIR . '/wcpt-wordcamp/wordcamp-template.php' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ require_once ( WCPT_DIR . 'wcpt-wordcamp/wordcamp-template.php' );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Quick admin check and load if needed
</span><span class="cx" style="display: block; padding: 0 10px"> if ( is_admin() )
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- require_once ( WCPT_DIR . '/wcpt-wordcamp/wordcamp-admin.php' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ require_once ( WCPT_DIR . 'wcpt-wordcamp/wordcamp-admin.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">- require_once( WCPT_DIR . '/wcpt-wordcamp/wordcamp-new-site.php' );
- $GLOBALS['wordcamp_new_site'] = new WordCamp_New_Site();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ require_once( WCPT_DIR . 'wcpt-wordcamp/wordcamp-new-site.php' );
+
+ $GLOBALS['wordcamp_new_site'] = new WordCamp_New_Site;
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -76,23 +53,22 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @todo Finish up the post type admin area with messages, columns, etc...*
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function register_post_types () {
-
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ function register_post_types() {
</ins><span class="cx" style="display: block; padding: 0 10px"> // WordCamp post type labels
</span><span class="cx" style="display: block; padding: 0 10px"> $wcpt_labels = array (
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'name' => __( 'WordCamps', 'wcpt' ),
- 'singular_name' => __( 'WordCamp', 'wcpt' ),
- 'add_new' => __( 'Add New', 'wcpt' ),
- 'add_new_item' => __( 'Create New WordCamp', 'wcpt' ),
- 'edit' => __( 'Edit', 'wcpt' ),
- 'edit_item' => __( 'Edit WordCamp', 'wcpt' ),
- 'new_item' => __( 'New WordCamp', 'wcpt' ),
- 'view' => __( 'View WordCamp', 'wcpt' ),
- 'view_item' => __( 'View WordCamp', 'wcpt' ),
- 'search_items' => __( 'Search WordCamps', 'wcpt' ),
- 'not_found' => __( 'No WordCamps found', 'wcpt' ),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'name' => __( 'WordCamps', 'wcpt' ),
+ 'singular_name' => __( 'WordCamp', 'wcpt' ),
+ 'add_new' => __( 'Add New', 'wcpt' ),
+ 'add_new_item' => __( 'Create New WordCamp', 'wcpt' ),
+ 'edit' => __( 'Edit', 'wcpt' ),
+ 'edit_item' => __( 'Edit WordCamp', 'wcpt' ),
+ 'new_item' => __( 'New WordCamp', 'wcpt' ),
+ 'view' => __( 'View WordCamp', 'wcpt' ),
+ 'view_item' => __( 'View WordCamp', 'wcpt' ),
+ 'search_items' => __( 'Search WordCamps', 'wcpt' ),
+ 'not_found' => __( 'No WordCamps found', 'wcpt' ),
</ins><span class="cx" style="display: block; padding: 0 10px"> 'not_found_in_trash' => __( 'No WordCamps found in Trash', 'wcpt' ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'parent_item_colon' => __( 'Parent WordCamp:', 'wcpt' )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'parent_item_colon' => __( 'Parent WordCamp:', 'wcpt' )
</ins><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // WordCamp post type rewrite
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -111,73 +87,189 @@
</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"> // Register WordCamp post type
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- register_post_type (
- WCPT_POST_TYPE_ID,
- apply_filters( 'wcpt_register_post_type',
- array (
- 'labels' => $wcpt_labels,
- 'rewrite' => $wcpt_rewrite,
- 'supports' => $wcpt_supports,
- 'menu_position' => '100',
- 'public' => true,
- 'show_ui' => true,
- 'can_export' => true,
- 'capability_type' => 'post',
- 'hierarchical' => false,
- 'has_archive' => true,
- 'query_var' => true,
- 'menu_icon' => 'dashicons-wordpress',
- )
- )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ register_post_type( WCPT_POST_TYPE_ID, array(
+ 'labels' => $wcpt_labels,
+ 'rewrite' => $wcpt_rewrite,
+ 'supports' => $wcpt_supports,
+ 'menu_position' => '100',
+ 'public' => true,
+ 'show_ui' => true,
+ 'can_export' => true,
+ 'capability_type' => 'post',
+ 'hierarchical' => false,
+ 'has_archive' => true,
+ 'query_var' => true,
+ 'menu_icon' => 'dashicons-wordpress',
+ ) );
+ }
+
+ public function register_post_statuses() {
+ foreach ( self::get_post_statuses() as $key => $label ) {
+ register_post_status( $key, array(
+ 'label' => $label,
+ 'public' => true,
+ 'label_count' => _nx_noop(
+ sprintf( '%s <span class="count">(%s)</span>', $label, '%s' ),
+ sprintf( '%s <span class="count">(%s)</span>', $label, '%s' ),
+ 'wordcamporg'
+ ),
+ ) );
+ }
+ }
+
+ /**
+ * Get WordCamp post statuses.
+ *
+ * @return array
+ */
+ public static function get_post_statuses() {
+ return array(
+ 'wcpt-needs-vetting' => _x( 'Needs Vetting', 'wordcamp status', 'wordcamporg' ),
+ 'wcpt-needs-orientati' => _x( 'Needs Orientation/Interview', 'wordcamp status', 'wordcamporg' ),
+ 'wcpt-more-info-reque' => _x( 'More Info Requested', 'wordcamp status', 'wordcamporg' ),
+ 'wcpt-needs-rejection' => _x( 'Needs Rejection E-mail', 'wordcamp status', 'wordcamporg' ),
+ 'wcpt-interview-sched' => _x( 'Interview/Orientation Scheduled', 'wordcamp status', 'wordcamporg' ),
+ 'wcpt-rejected' => _x( 'Rejected', 'wordcamp status', 'wordcamporg' ),
+ 'wcpt-cancelled' => _x( 'Cancelled', 'wordcamp status', 'wordcamporg' ),
+ 'wcpt-approved-pre-pl' => _x( 'Approved for Pre-Planning Pending Agreement', 'wordcamp status', 'wordcamporg' ),
+ 'wcpt-needs-email' => _x( 'Needs E-mail Address', 'wordcamp status', 'wordcamporg' ),
+ 'wcpt-needs-site' => _x( 'Needs Site', 'wordcamp status', 'wordcamporg' ),
+ 'wcpt-needs-polldaddy' => _x( 'Needs Polldaddy Account', 'wordcamp status', 'wordcamporg' ),
+ 'wcpt-needs-mentor' => _x( 'Needs Mentor', 'wordcamp status', 'wordcamporg' ),
+ 'wcpt-needs-pre-plann' => _x( 'Needs to be Added to Pre-Planning Schedule', 'wordcamp status', 'wordcamporg' ),
+ 'wcpt-pre-planning' => _x( 'In Pre-Planning', 'wordcamp status', 'wordcamporg' ),
+ 'wcpt-needs-budget-re' => _x( 'Needs Budget Review', 'wordcamp status', 'wordcamporg' ),
+ 'wcpt-budget-rev-sche' => _x( 'Budget Review Scheduled', 'wordcamp status', 'wordcamporg' ),
+ 'wcpt-needs-contract' => _x( 'Needs Contract to be Signed', 'wordcamp status', 'wordcamporg' ),
+ 'wcpt-needs-fill-list' => _x( 'Needs to Fill Out WordCamp Listing', 'wordcamp status', 'wordcamporg' ),
+ 'wcpt-needs-schedule' => _x( 'Needs to be Added to Official Schedule', 'wordcamp status', 'wordcamporg' ),
+ 'wcpt-scheduled' => _x( 'WordCamp Scheduled', 'wordcamp status', 'wordcamporg' ),
+ 'wcpt-needs-debrief' => _x( 'Needs Debrief', 'wordcamp status', 'wordcamporg' ),
+ 'wcpt-debrief-schedul' => _x( 'Debrief Scheduled', 'wordcamp status', 'wordcamporg' ),
+ 'wcpt-closed' => _x( 'WordCamp Closed', 'wordcamp status', 'wordcamporg' ),
</ins><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * register_taxonomies ()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Get post statuses for WordCamps on schedule.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Register the built in WordCamp Post Type taxonomies
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return array Post status names.
+ */
+ public static function get_public_post_statuses() {
+ return array(
+ 'wcpt-scheduled',
+ 'wcpt-needs-debrief',
+ 'wcpt-debrief-schedul',
+ 'wcpt-closed',
+
+ // back-compat
+ 'public',
+ );
+ }
+
+ /**
+ * Get post statuses for WordCamps on pre-planning schedule.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since WordCamp Post Type (0.1)
- *
- * @uses register_taxonomy()
- * @uses apply_filters()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return array Post status names.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function register_taxonomies () {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public static function get_pre_planning_post_statuses() {
+ return array(
+ 'wcpt-pre-planning',
+ 'wcpt-needs-budget-re',
+ 'wcpt-budget-rev-sche',
+ 'wcpt-needs-contract',
+ 'wcpt-needs-fill-list',
+ 'wcpt-needs-schedule',
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Tag labels
- $tag_labels = array (
- 'name' => __( 'Years', 'wcpt' ),
- 'singular_name' => __( 'Year', 'wcpt' ),
- 'search_items' => __( 'Search Years', 'wcpt' ),
- 'popular_items' => __( 'Popular Years', 'wcpt' ),
- 'all_items' => __( 'All Years', 'wcpt' ),
- 'edit_item' => __( 'Edit Year', 'wcpt' ),
- 'update_item' => __( 'Update Year', 'wcpt' ),
- 'add_new_item' => __( 'Add Year', 'wcpt' ),
- 'new_item_name' => __( 'New Year', 'wcpt' ),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // back-compat
+ 'pending',
</ins><span class="cx" style="display: block; padding: 0 10px"> );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ }
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Tag rewrite
- $tag_rewrite = array (
- 'slug' => 'year'
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /**
+ * Get the milestones that correspond to each status
+ *
+ * @return array
+ */
+ public static function map_statuses_to_milestones() {
+ $milestones = array(
+ 'wcpt-needs-vetting' => 'Application received',
+ 'wcpt-needs-orientati' => 'Application vetted',
+ 'wcpt-more-info-reque' => 'Application vetted',
+ 'wcpt-needs-rejection' => 'Application vetted',
+ 'wcpt-interview-sched' => 'Interview scheduled',
+ 'wcpt-rejected' => 'Sent rejection email',
+ 'wcpt-cancelled' => 'WordCamp cancelled',
+ 'wcpt-approved-pre-pl' => 'Orientation/interview held',
+ 'wcpt-needs-email' => 'Organizer agreement signed',
+ 'wcpt-needs-site' => 'Email address/fwd set up',
+ 'wcpt-needs-polldaddy' => 'Site created',
+ 'wcpt-needs-mentor' => 'Polldaddy account created',
+ 'wcpt-needs-pre-plann' => 'Mentor assigned',
+ 'wcpt-pre-planning' => 'Added to pre-planning schedule',
+ 'wcpt-needs-budget-re' => 'Budget review requested',
+ 'wcpt-budget-rev-sche' => 'Budget review scheduled',
+ 'wcpt-needs-contract' => 'Budget approved',
+ 'wcpt-needs-fill-list' => 'Contract signed',
+ 'wcpt-needs-schedule' => 'WordCamp listing filled out',
+ 'wcpt-scheduled' => 'WordCamp added to official schedule',
+ 'wcpt-needs-debrief' => 'WordCamp held',
+ 'wcpt-debrief-schedul' => 'Debrief scheduled',
+ 'wcpt-closed' => 'Debrief held',
</ins><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">- // Register the tag taxonomy
- register_taxonomy (
- WCPT_TAG_ID, // The tag ID
- WCPT_POST_TYPE_ID, // The post type ID
- apply_filters( 'wcpt_register_year',
- array (
- 'labels' => $tag_labels,
- 'rewrite' => $tag_rewrite,
- //'update_count_callback' => '_update_post_term_count',
- 'query_var' => 'wc-year',
- 'hierarchical' => false,
- 'public' => true,
- 'show_ui' => true,
- )
- )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ return $milestones;
+ }
+
+ /**
+ * Return valid transitions given a post status.
+ *
+ * @param string $status Current status.
+ *
+ * @return array Valid transitions.
+ */
+ public static function get_valid_status_transitions( $status ) {
+ $transitions = array(
+ 'wcpt-needs-vetting' => array( 'wcpt-needs-orientati', 'wcpt-more-info-reque', 'wcpt-needs-rejection' ),
+ 'wcpt-needs-orientati' => array( 'wcpt-needs-vetting', 'wcpt-interview-sched' ),
+ 'wcpt-more-info-reque' => array(), // Allowed from any status, see below
+ 'wcpt-needs-rejection' => array( 'wcpt-needs-vetting', 'wcpt-rejected' ),
+ 'wcpt-interview-sched' => array( 'wcpt-needs-orientati', 'wcpt-approved-pre-pl' ),
+ 'wcpt-rejected' => array( 'wcpt-needs-rejection' ),
+ 'wcpt-cancelled' => array(), // Allowed from any status, see below
+ 'wcpt-approved-pre-pl' => array( 'wcpt-interview-sched', 'wcpt-needs-email' ),
+ 'wcpt-needs-email' => array( 'wcpt-approved-pre-pl', 'wcpt-needs-site' ),
+ 'wcpt-needs-site' => array( 'wcpt-needs-email', 'wcpt-needs-polldaddy' ),
+ 'wcpt-needs-polldaddy' => array( 'wcpt-needs-site', 'wcpt-needs-mentor' ),
+ 'wcpt-needs-mentor' => array( 'wcpt-needs-polldaddy', 'wcpt-needs-pre-plann' ),
+ 'wcpt-needs-pre-plann' => array( 'wcpt-needs-mentor', 'wcpt-pre-planning' ),
+ 'wcpt-pre-planning' => array( 'wcpt-needs-pre-plann', 'wcpt-needs-budget-re' ),
+ 'wcpt-needs-budget-re' => array( 'wcpt-pre-planning', 'wcpt-budget-rev-sche' ),
+ 'wcpt-budget-rev-sche' => array( 'wcpt-needs-budget-re', 'wcpt-needs-contract' ),
+ 'wcpt-needs-contract' => array( 'wcpt-budget-rev-sche', 'wcpt-needs-fill-list' ),
+ 'wcpt-needs-fill-list' => array( 'wcpt-needs-contract', 'wcpt-needs-schedule' ),
+ 'wcpt-needs-schedule' => array( 'wcpt-needs-fill-list', 'wcpt-scheduled' ),
+ 'wcpt-scheduled' => array( 'wcpt-needs-schedule', 'wcpt-needs-debrief' ),
+ 'wcpt-needs-debrief' => array( 'wcpt-scheduled', 'wcpt-debrief-schedul' ),
+ 'wcpt-debrief-schedul' => array( 'wcpt-needs-debrief', 'wcpt-closed' ),
+ 'wcpt-closed' => array( 'wcpt-debrief-schedul' ),
</ins><span class="cx" style="display: block; padding: 0 10px"> );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ // Cancelled and More Info Requested can be switched to from any status.
+ foreach ( array_keys( $transitions ) as $key ) {
+ $transitions[ $key ][] = 'wcpt-more-info-reque';
+ $transitions[ $key ][] = 'wcpt-cancelled';
+ }
+
+ // Any status can be switched to from More Info Requested and Cancelled.
+ foreach ( array( 'wcpt-more-info-reque', 'wcpt-cancelled' ) as $key ) {
+ $transitions[ $key ] = array_keys( $transitions );
+ }
+
+ if ( empty( $transitions[ $status ] ) )
+ return array( 'wcpt-needs-vetting' );
+
+ return $transitions[ $status ];
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginswcptwcptwordcampwordcampnewsitephp"></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/wcpt/wcpt-wordcamp/wordcamp-new-site.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/wcpt/wcpt-wordcamp/wordcamp-new-site.php 2016-04-05 15:55:25 UTC (rev 2897)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-new-site.php 2016-04-05 16:05:02 UTC (rev 2898)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -99,16 +99,16 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $url = parse_url( $url );
- if ( ! $url || empty( $url['scheme'] ) || empty( $url['host'] ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $url_components = parse_url( $url );
+ if ( ! $url_components || empty( $url_components['scheme'] ) || empty( $url_components['host'] ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $path = isset( $url['path'] ) ? $url['path'] : '';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $path = isset( $url_components['path'] ) ? $url_components['path'] : '';
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $wordcamp_meta = get_post_custom( $wordcamp_id );
</span><span class="cx" style="display: block; padding: 0 10px"> $lead_organizer = $this->get_user_or_current_user( $wordcamp_meta['WordPress.org Username'][0] );
</span><span class="cx" style="display: block; padding: 0 10px"> $site_meta = array( 'public' => 1 );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->new_site_id = wpmu_create_blog( $url['host'], $path, 'WordCamp Event', $lead_organizer->ID, $site_meta );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->new_site_id = wpmu_create_blog( $url_components['host'], $path, 'WordCamp Event', $lead_organizer->ID, $site_meta );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( is_int( $this->new_site_id ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> update_post_meta( $wordcamp_id, '_site_id', $this->new_site_id ); // this is used in other plugins to map the `wordcamp` post to it's corresponding site
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -116,6 +116,12 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Configure the new site at priority 11, after all the custom fields on the `wordcamp` post have been saved, so that we don't use outdated values
</span><span class="cx" style="display: block; padding: 0 10px"> add_action( 'save_post', array( $this, 'configure_new_site' ), 11, 2 );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ add_post_meta( $wordcamp_id, '_note', array(
+ 'timestamp' => time(),
+ 'user_id' => get_current_user_id(),
+ 'message' => sprintf( 'Created site at <a href="%s">%s</a>', $url, $url ),
+ ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -198,7 +204,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Make sure the new blog is https.
</span><span class="cx" style="display: block; padding: 0 10px"> update_option( 'siteurl', set_url_scheme( get_option( 'siteurl' ), 'https' ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- update_option( 'home', set_url_scheme( get_option( 'home' ), 'https' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ update_option( 'home', set_url_scheme( get_option( 'home' ), 'https' ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginswcptwcptwordcampwordcamptemplatephp"></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/wcpt/wcpt-wordcamp/wordcamp-template.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/wcpt/wcpt-wordcamp/wordcamp-template.php 2016-04-05 15:55:25 UTC (rev 2897)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-template.php 2016-04-05 16:05:02 UTC (rev 2898)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -13,10 +13,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $args Possible arguments to change returned WordCamps
</span><span class="cx" style="display: block; padding: 0 10px"> * @return object Multidimensional array of WordCamp information
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function wcpt_has_wordcamps ( $args = '' ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function wcpt_has_wordcamps( $args = '' ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> global $wcpt_template;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $default = array (
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $default = array(
</ins><span class="cx" style="display: block; padding: 0 10px"> // Narrow query down to WordCamp Post Type
</span><span class="cx" style="display: block; padding: 0 10px"> 'post_type' => WCPT_POST_TYPE_ID,
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -83,7 +83,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @global WP_Query $wcpt_template
</span><span class="cx" style="display: block; padding: 0 10px"> * @return object WordCamp information
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function wcpt_wordcamps () {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function wcpt_wordcamps() {
</ins><span class="cx" style="display: block; padding: 0 10px"> global $wcpt_template;
</span><span class="cx" style="display: block; padding: 0 10px"> return $wcpt_template->have_posts();
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -100,7 +100,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @global WP_Query $wcpt_template
</span><span class="cx" style="display: block; padding: 0 10px"> * @return object WordCamp information
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function wcpt_the_wordcamp () {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function wcpt_the_wordcamp() {
</ins><span class="cx" style="display: block; padding: 0 10px"> global $wcpt_template;
</span><span class="cx" style="display: block; padding: 0 10px"> return $wcpt_template->the_post();
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -116,7 +116,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @uses wcpt_get_wordcamp_id()
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function wcpt_wordcamp_id () {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function wcpt_wordcamp_id() {
</ins><span class="cx" style="display: block; padding: 0 10px"> echo wcpt_get_wordcamp_id();
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -130,7 +130,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string WordCamp id
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function wcpt_get_wordcamp_id () {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ function wcpt_get_wordcamp_id() {
</ins><span class="cx" style="display: block; padding: 0 10px"> global $wcpt_template;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( isset( $wcpt_template->post ) )
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -153,7 +153,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $wordcamp_id optional
</span><span class="cx" style="display: block; padding: 0 10px"> * @uses wcpt_get_wordcamp_permalink()
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function wcpt_wordcamp_permalink ( $wordcamp_id = 0 ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function wcpt_wordcamp_permalink( $wordcamp_id = 0 ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> echo wcpt_get_wordcamp_permalink( $wordcamp_id );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -170,7 +170,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @uses get_permalink
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string Permanent link to WordCamp
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function wcpt_get_wordcamp_permalink ( $wordcamp_id = 0 ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ function wcpt_get_wordcamp_permalink( $wordcamp_id = 0 ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( empty( $wordcamp_id ) )
</span><span class="cx" style="display: block; padding: 0 10px"> $wordcamp_id = wcpt_get_wordcamp_id();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -189,7 +189,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $wordcamp_id optional
</span><span class="cx" style="display: block; padding: 0 10px"> * @uses wcpt_get_wordcamp_title()
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function wcpt_wordcamp_title ( $wordcamp_id = 0 ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function wcpt_wordcamp_title( $wordcamp_id = 0 ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> echo wcpt_get_wordcamp_title( $wordcamp_id );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -207,7 +207,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string Title of WordCamp
</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">- function wcpt_get_wordcamp_title ( $wordcamp_id = 0 ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ function wcpt_get_wordcamp_title( $wordcamp_id = 0 ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return apply_filters( 'wcpt_get_wordcamp_title', get_the_title( $wordcamp_id ) );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -223,7 +223,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $wordcamp_id optional
</span><span class="cx" style="display: block; padding: 0 10px"> * @uses wcpt_get_wordcamp_link()
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function wcpt_wordcamp_link ( $wordcamp_id = 0 ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function wcpt_wordcamp_link( $wordcamp_id = 0 ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> echo wcpt_get_wordcamp_link( $wordcamp_id );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -241,7 +241,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string Title of WordCamp
</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">- function wcpt_get_wordcamp_link ( $wordcamp_id = 0 ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ function wcpt_get_wordcamp_link( $wordcamp_id = 0 ) {
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $title = get_the_title( $wordcamp_id );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -268,7 +268,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @uses wcpt_get_wordcamp_start_date()
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $wordcamp_id optional
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function wcpt_wordcamp_start_date ( $wordcamp_id = 0, $format = 'F j, Y' ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function wcpt_wordcamp_start_date( $wordcamp_id = 0, $format = 'F j, Y' ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> echo wcpt_get_wordcamp_start_date( $wordcamp_id, $format );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -283,7 +283,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $wordcamp_id optional
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function wcpt_get_wordcamp_start_date ( $wordcamp_id = 0, $format = 'F j, Y' ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ function wcpt_get_wordcamp_start_date( $wordcamp_id = 0, $format = 'F j, Y' ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( empty( $wordcamp_id ) )
</span><span class="cx" style="display: block; padding: 0 10px"> $wordcamp_id = wcpt_get_wordcamp_id();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -305,7 +305,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @uses wcpt_get_wordcamp_end_date()
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $wordcamp_id optional
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function wcpt_wordcamp_end_date ( $wordcamp_id = 0, $format = 'F j, Y' ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function wcpt_wordcamp_end_date( $wordcamp_id = 0, $format = 'F j, Y' ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> echo wcpt_get_wordcamp_end_date( $wordcamp_id, $format );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -320,7 +320,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $wordcamp_id optional
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function wcpt_get_wordcamp_end_date ( $wordcamp_id = 0, $format = 'F j, Y' ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ function wcpt_get_wordcamp_end_date( $wordcamp_id = 0, $format = 'F j, Y' ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( empty( $wordcamp_id ) )
</span><span class="cx" style="display: block; padding: 0 10px"> $wordcamp_id = wcpt_get_wordcamp_id();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -342,7 +342,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @uses wcpt_get_wordcamp_location()
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $wordcamp_id optional
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function wcpt_wordcamp_location ( $wordcamp_id = 0 ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function wcpt_wordcamp_location( $wordcamp_id = 0 ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> echo wcpt_get_wordcamp_location( $wordcamp_id );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -357,7 +357,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $wordcamp_id optional
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function wcpt_get_wordcamp_location ( $wordcamp_id = 0 ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ function wcpt_get_wordcamp_location( $wordcamp_id = 0 ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( empty( $wordcamp_id ) )
</span><span class="cx" style="display: block; padding: 0 10px"> $wordcamp_id = wcpt_get_wordcamp_id();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -376,7 +376,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @uses wcpt_get_wordcamp_organizer_name()
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $wordcamp_id optional
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function wcpt_wordcamp_organizer_name ( $wordcamp_id = 0 ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function wcpt_wordcamp_organizer_name( $wordcamp_id = 0 ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> echo wcpt_get_wordcamp_organizer_name( $wordcamp_id );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -391,7 +391,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $wordcamp_id optional
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function wcpt_get_wordcamp_organizer_name ( $wordcamp_id = 0 ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ function wcpt_get_wordcamp_organizer_name( $wordcamp_id = 0 ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( empty( $wordcamp_id ) )
</span><span class="cx" style="display: block; padding: 0 10px"> $wordcamp_id = wcpt_get_wordcamp_id();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -410,7 +410,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @uses wcpt_get_wordcamp_venue_name()
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $wordcamp_id optional
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function wcpt_wordcamp_venue_name ( $wordcamp_id = 0 ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function wcpt_wordcamp_venue_name( $wordcamp_id = 0 ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> echo wcpt_get_wordcamp_venue_name( $wordcamp_id );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -425,7 +425,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $wordcamp_id optional
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function wcpt_get_wordcamp_venue_name ( $wordcamp_id = 0 ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ function wcpt_get_wordcamp_venue_name( $wordcamp_id = 0 ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( empty( $wordcamp_id ) )
</span><span class="cx" style="display: block; padding: 0 10px"> $wordcamp_id = wcpt_get_wordcamp_id();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -444,7 +444,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @uses wcpt_get_wordcamp_url()
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $wordcamp_id optional
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function wcpt_wordcamp_url ( $wordcamp_id = 0 ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function wcpt_wordcamp_url( $wordcamp_id = 0 ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> echo wcpt_get_wordcamp_url( $wordcamp_id );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -459,7 +459,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $wordcamp_id optional
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function wcpt_get_wordcamp_url ( $wordcamp_id = 0 ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ function wcpt_get_wordcamp_url( $wordcamp_id = 0 ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( empty( $wordcamp_id ) )
</span><span class="cx" style="display: block; padding: 0 10px"> $wordcamp_id = wcpt_get_wordcamp_id();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -477,7 +477,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @global WP_Query $wcpt_template
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function wcpt_wordcamp_pagination_count () {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function wcpt_wordcamp_pagination_count() {
</ins><span class="cx" style="display: block; padding: 0 10px"> echo wcpt_get_wordcamp_pagination_count();
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -492,7 +492,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @global WP_Query $wcpt_template
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function wcpt_get_wordcamp_pagination_count () {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ function wcpt_get_wordcamp_pagination_count() {
</ins><span class="cx" style="display: block; padding: 0 10px"> global $wcpt_template;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Set pagination values
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -520,7 +520,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @subpackage Template Tags
</span><span class="cx" style="display: block; padding: 0 10px"> * @since WordCamp Post Type (0.1)
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function wcpt_wordcamp_pagination_links () {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function wcpt_wordcamp_pagination_links() {
</ins><span class="cx" style="display: block; padding: 0 10px"> echo wcpt_get_wordcamp_pagination_links();
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -535,7 +535,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @global WP_Query $wcpt_template
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function wcpt_get_wordcamp_pagination_links () {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ function wcpt_get_wordcamp_pagination_links() {
</ins><span class="cx" style="display: block; padding: 0 10px"> global $wcpt_template;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> return apply_filters( 'wcpt_get_wordcamp_pagination_links', $wcpt_template->pagination_links );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -546,12 +546,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Moved from WordCamp Central functions.php
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! function_exists( 'wcpt_wordcamp_physical_address' ) ) :
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function wcpt_wordcamp_physical_address( $wordcamp_id = 0 ) {
- echo wp_filter_kses( nl2br( wcpt_get_wordcamp_physical_address( $wordcamp_id ) ) );
-}
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ function wcpt_wordcamp_physical_address( $wordcamp_id = 0 ) {
+ echo wp_filter_kses( nl2br( wcpt_get_wordcamp_physical_address( $wordcamp_id ) ) );
+ }
</ins><span class="cx" style="display: block; padding: 0 10px"> endif;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! function_exists( 'wcpt_get_wordcamp_physical_address' ) ) :
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+if ( ! function_exists( 'wcpt_get_wordcamp_physical_address' ) ) :
</ins><span class="cx" style="display: block; padding: 0 10px"> function wcpt_get_wordcamp_physical_address( $wordcamp_id = 0 ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( empty( $wordcamp_id ) )
</span><span class="cx" style="display: block; padding: 0 10px"> $wordcamp_id = wcpt_get_wordcamp_id();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -559,15 +559,15 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $address = get_post_meta( $wordcamp_id, 'Physical Address', true );
</span><span class="cx" style="display: block; padding: 0 10px"> return apply_filters( 'wcpt_get_wordcamp_physical_address', $address );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- endif;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+endif;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! function_exists( 'wcpt_wordcamp_venue_url' ) ) :
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function wcpt_wordcamp_venue_url( $wordcamp_id = 0 ) {
- echo esc_url( wcpt_get_wordcamp_venue_url( $wordcamp_id ) );
-}
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ function wcpt_wordcamp_venue_url( $wordcamp_id = 0 ) {
+ echo esc_url( wcpt_get_wordcamp_venue_url( $wordcamp_id ) );
+ }
</ins><span class="cx" style="display: block; padding: 0 10px"> endif;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! function_exists( 'wcpt_get_wordcamp_venue_url' ) ) :
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+if ( ! function_exists( 'wcpt_get_wordcamp_venue_url' ) ) :
</ins><span class="cx" style="display: block; padding: 0 10px"> function wcpt_get_wordcamp_venue_url( $wordcamp_id = 0 ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( empty( $wordcamp_id ) )
</span><span class="cx" style="display: block; padding: 0 10px"> $wordcamp_id = wcpt_get_wordcamp_id();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -575,16 +575,16 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $venue_url = get_post_meta( $wordcamp_id, 'Website URL', true );
</span><span class="cx" style="display: block; padding: 0 10px"> return apply_filters( 'wcpt_get_wordcamp_venue_url', $venue_url );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- endif;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+endif;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! function_exists( 'wcpt_get_wordcamp_twitter_screen_name' ) ) :
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function wcpt_get_wordcamp_twitter_screen_name( $wordcamp_id = 0 ) {
- if ( empty( $wordcamp_id ) )
- $wordcamp_id = wcpt_get_wordcamp_id();
-
- $screen_name = get_post_meta( $wordcamp_id, 'Twitter', true );
- return apply_filters( 'wcpt_get_wordcamp_twitter_screen_name', $screen_name );
-}
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ function wcpt_get_wordcamp_twitter_screen_name( $wordcamp_id = 0 ) {
+ if ( empty( $wordcamp_id ) )
+ $wordcamp_id = wcpt_get_wordcamp_id();
+
+ $screen_name = get_post_meta( $wordcamp_id, 'Twitter', true );
+ return apply_filters( 'wcpt_get_wordcamp_twitter_screen_name', $screen_name );
+ }
</ins><span class="cx" style="display: block; padding: 0 10px"> endif;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /*
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -647,12 +647,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * This helps publicize the feed, because it will show up in feed aggregators when users enter the site URL, even if they don't know the feed exists.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function add_wordcamp_feed_link_to_head() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! is_post_type_archive( 'wordcamp' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! is_post_type_archive( WCPT_POST_TYPE_ID ) ) {
</ins><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">- <link rel="alternate" type="<?php echo esc_attr( feed_content_type() ); ?>" title="New WordCamp Announcements" href="<?php echo esc_url( get_post_type_archive_feed_link( 'wordcamp' ) ); ?>" />
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <link rel="alternate" type="<?php echo esc_attr( feed_content_type() ); ?>" title="New WordCamp Announcements" href="<?php echo esc_url( get_post_type_archive_feed_link( WCPT_POST_TYPE_ID ) ); ?>" />
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> <?php
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-add_action( 'wp_head', 'add_wordcamp_feed_link_to_head', 4 ); // after feed_links_extra()
</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( 'wp_head', 'add_wordcamp_feed_link_to_head', 4 ); // after feed_links_extra()
</ins></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcampapiclassesicsphp"></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-api/classes/ics.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-api/classes/ics.php 2016-04-05 15:55:25 UTC (rev 2897)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-api/classes/ics.php 2016-04-05 16:05:02 UTC (rev 2898)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -52,7 +52,16 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $ical .= 'PRODID:-//hacksw/handcal//NONSGML v1.0//EN' . self::CLRF;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $query = new WP_Query( array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'post_type' => WCPT_POST_TYPE_ID,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'post_type' => WCPT_POST_TYPE_ID,
+ 'post_status' => array(
+ 'wcpt-scheduled',
+ 'wcpt-needs-debrief',
+ 'wcpt-debrief-schedul',
+ 'wcpt-closed',
+
+ // back-compat
+ 'publish',
+ ),
</ins><span class="cx" style="display: block; padding: 0 10px"> 'posts_per_page' => 50,
</span><span class="cx" style="display: block; padding: 0 10px"> 'meta_key' => 'Start Date (YYYY-mm-dd)',
</span><span class="cx" style="display: block; padding: 0 10px"> 'orderby' => 'meta_value',
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcamporganizerreminderswcormailerphp"></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-organizer-reminders/wcor-mailer.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-organizer-reminders/wcor-mailer.php 2016-04-05 15:55:25 UTC (rev 2897)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-organizer-reminders/wcor-mailer.php 2016-04-05 16:05:02 UTC (rev 2898)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6,7 +6,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> class WCOR_Mailer {
</span><span class="cx" style="display: block; padding: 0 10px"> public $triggers;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Constructor
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -60,9 +60,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> add_action( 'wcor_send_timed_emails', array( $this, 'send_timed_emails' ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> foreach ( $this->triggers as $trigger_id => $trigger ) {
</span><span class="cx" style="display: block; padding: 0 10px"> foreach( $trigger['actions'] as $action ) {
</span><span class="cx" style="display: block; padding: 0 10px"> add_action( $action['name'], array( $this, $action['callback'] ), $action['priority'], $action['parameters'] );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -71,7 +71,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Schedule cron job when plugin is activated
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Schedule cron job when plugin is activated
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function activate() {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( wp_next_scheduled( 'wcor_send_timed_emails' ) === false ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -82,7 +82,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Clear cron job when plugin is deactivated
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -93,7 +93,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Wrapper for wp_mail() that customizes the subject, body and headers
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * We want to make sure that replies go to support@wordcamp.org, rather than the fake address that WordPress sends from, but
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * We want to make sure that replies go to support@wordcamp.org, rather than the fake address that WordPress sends from, but
</ins><span class="cx" style="display: block; padding: 0 10px"> * we don't want to be flagged as spam for forging the From header, so we set the Sender header.
</span><span class="cx" style="display: block; padding: 0 10px"> * @see http://stackoverflow.com/q/4728393/450127
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -212,7 +212,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> '[travel_wrangler_email]',
</span><span class="cx" style="display: block; padding: 0 10px"> '[safety_wrangler_name]',
</span><span class="cx" style="display: block; padding: 0 10px"> '[safety_wrangler_email]',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> // Venue
</span><span class="cx" style="display: block; padding: 0 10px"> '[venue_name]',
</span><span class="cx" style="display: block; padding: 0 10px"> '[venue_address]',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -286,7 +286,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // Miscellaneous
</span><span class="cx" style="display: block; padding: 0 10px"> $this->get_mes_info( $wordcamp->ID ),
</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><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> return str_replace( $search, $replace, $content );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -453,7 +453,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> return $this->mail( $recipient, $email->post_title, $email->post_content, array(), $email, $wordcamp );
</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><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Send e-mails that are scheduled to go out at a specific time (e.g., 3 days before the camp)
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -461,6 +461,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $recent_or_upcoming_wordcamps = get_posts( array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'posts_per_page' => -1,
</span><span class="cx" style="display: block; padding: 0 10px"> 'post_type' => 'wordcamp',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'post_status' => WordCamp_Loader::get_public_post_statuses(),
</ins><span class="cx" style="display: block; padding: 0 10px"> 'meta_query' => array(
</span><span class="cx" style="display: block; padding: 0 10px"> array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'key' => 'Start Date (YYYY-mm-dd)',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -473,7 +474,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $pending_wordcamps = get_posts( array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'posts_per_page' => -1,
</span><span class="cx" style="display: block; padding: 0 10px"> 'post_type' => WCPT_POST_TYPE_ID,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'post_status' => 'pending',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'post_status' => WordCamp_Loader::get_pre_planning_post_statuses(),
</ins><span class="cx" style="display: block; padding: 0 10px"> ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $wordcamps = array_merge( $recent_or_upcoming_wordcamps, $pending_wordcamps );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -489,13 +490,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> foreach ( $wordcamps as $wordcamp ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $sent_email_ids = (array) get_post_meta( $wordcamp->ID, 'wcor_sent_email_ids', true );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $reminder_emails as $email ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $recipient = $this->get_recipients( $wordcamp->ID, $email->ID );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( $this->timed_email_is_ready_to_send( $wordcamp, $email, $sent_email_ids ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $this->mail( $recipient, $email->post_title, $email->post_content, array(), $email, $wordcamp ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $sent_email_ids[] = $email->ID;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -519,7 +520,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @todo It'd be nice to have some unit tests for this function, since there are a lot of different cases, but it seems like that might be
</span><span class="cx" style="display: block; padding: 0 10px"> * hard to do because of having to mock get_post_meta(), current_time(), etc. We could pass that info in, but that doesn't seem very elegant.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- *
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ *
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param WP_Post $wordcamp
</span><span class="cx" style="display: block; padding: 0 10px"> * @param WP_Post $email
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $sent_email_ids The IDs of emails that have already been sent to the $wordcamp post
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -543,10 +544,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! in_array( $email->ID, $sent_email_ids ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 'wcor_send_before' == $send_when ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $days_before = absint( get_post_meta( $email->ID, 'wcor_send_days_before', true ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( $start_date && $days_before ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $send_date = $start_date - ( $days_before * DAY_IN_SECONDS );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( $send_date <= current_time( 'timestamp' ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $ready = true;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -556,7 +557,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $end_date && $days_after ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $send_date = $end_date + ( $days_after * DAY_IN_SECONDS );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( $send_date <= current_time( 'timestamp' ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $ready = true;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -574,7 +575,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> return $ready;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcamporganizerreminderswcorreminderphp"></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-organizer-reminders/wcor-reminder.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-organizer-reminders/wcor-reminder.php 2016-04-05 15:55:25 UTC (rev 2897)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-organizer-reminders/wcor-reminder.php 2016-04-05 16:05:02 UTC (rev 2898)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -52,7 +52,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'query_var' => false,
</span><span class="cx" style="display: block; padding: 0 10px"> 'supports' => array( 'title', 'editor', 'author', 'revisions' ),
</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><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> register_post_type( self::POST_TYPE_SLUG, $params );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -107,72 +107,72 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <th><input id="wcor_send_sponsor_wrangler" name="wcor_send_where[]" type="checkbox" value="wcor_send_sponsor_wrangler" <?php checked( in_array( 'wcor_send_sponsor_wrangler', $send_where ) ); ?>></th>
</span><span class="cx" style="display: block; padding: 0 10px"> <td colspan="2"><label for="wcor_send_sponsor_wrangler">The Sponsor Wrangler</label></td>
</span><span class="cx" style="display: block; padding: 0 10px"> </tr>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> <tr>
</span><span class="cx" style="display: block; padding: 0 10px"> <th><input id="wcor_send_budget_wrangler" name="wcor_send_where[]" type="checkbox" value="wcor_send_budget_wrangler" <?php checked( in_array( 'wcor_send_budget_wrangler', $send_where ) ); ?>></th>
</span><span class="cx" style="display: block; padding: 0 10px"> <td colspan="2"><label for="wcor_send_budget_wrangler">The Budget Wrangler</label></td>
</span><span class="cx" style="display: block; padding: 0 10px"> </tr>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> <tr>
</span><span class="cx" style="display: block; padding: 0 10px"> <th><input id="wcor_send_venue_wrangler" name="wcor_send_where[]" type="checkbox" value="wcor_send_venue_wrangler" <?php checked( in_array( 'wcor_send_venue_wrangler', $send_where ) ); ?>></th>
</span><span class="cx" style="display: block; padding: 0 10px"> <td colspan="2"><label for="wcor_send_venue_wrangler">The Venue Wrangler</label></td>
</span><span class="cx" style="display: block; padding: 0 10px"> </tr>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> <tr>
</span><span class="cx" style="display: block; padding: 0 10px"> <th><input id="wcor_send_speaker_wrangler" name="wcor_send_where[]" type="checkbox" value="wcor_send_speaker_wrangler" <?php checked( in_array( 'wcor_send_speaker_wrangler', $send_where ) ); ?>></th>
</span><span class="cx" style="display: block; padding: 0 10px"> <td colspan="2"><label for="wcor_send_speaker_wrangler">The Speaker Wrangler</label></td>
</span><span class="cx" style="display: block; padding: 0 10px"> </tr>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> <tr>
</span><span class="cx" style="display: block; padding: 0 10px"> <th><input id="wcor_send_food_wrangler" name="wcor_send_where[]" type="checkbox" value="wcor_send_food_wrangler" <?php checked( in_array( 'wcor_send_food_wrangler', $send_where ) ); ?>></th>
</span><span class="cx" style="display: block; padding: 0 10px"> <td colspan="2"><label for="wcor_send_food_wrangler">The Food/Beverage Wrangler</label></td>
</span><span class="cx" style="display: block; padding: 0 10px"> </tr>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> <tr>
</span><span class="cx" style="display: block; padding: 0 10px"> <th><input id="wcor_send_swag_wrangler" name="wcor_send_where[]" type="checkbox" value="wcor_send_swag_wrangler" <?php checked( in_array( 'wcor_send_swag_wrangler', $send_where ) ); ?>></th>
</span><span class="cx" style="display: block; padding: 0 10px"> <td colspan="2"><label for="wcor_send_swag_wrangler">The Swag Wrangler</label></td>
</span><span class="cx" style="display: block; padding: 0 10px"> </tr>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> <tr>
</span><span class="cx" style="display: block; padding: 0 10px"> <th><input id="wcor_send_volunteer_wrangler" name="wcor_send_where[]" type="checkbox" value="wcor_send_volunteer_wrangler" <?php checked( in_array( 'wcor_send_volunteer_wrangler', $send_where ) ); ?>></th>
</span><span class="cx" style="display: block; padding: 0 10px"> <td colspan="2"><label for="wcor_send_volunteer_wrangler">The Volunteer Wrangler</label></td>
</span><span class="cx" style="display: block; padding: 0 10px"> </tr>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> <tr>
</span><span class="cx" style="display: block; padding: 0 10px"> <th><input id="wcor_send_printing_wrangler" name="wcor_send_where[]" type="checkbox" value="wcor_send_printing_wrangler" <?php checked( in_array( 'wcor_send_printing_wrangler', $send_where ) ); ?>></th>
</span><span class="cx" style="display: block; padding: 0 10px"> <td colspan="2"><label for="wcor_send_printing_wrangler">The Printing Wrangler</label></td>
</span><span class="cx" style="display: block; padding: 0 10px"> </tr>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> <tr>
</span><span class="cx" style="display: block; padding: 0 10px"> <th><input id="wcor_send_design_wrangler" name="wcor_send_where[]" type="checkbox" value="wcor_send_design_wrangler" <?php checked( in_array( 'wcor_send_design_wrangler', $send_where ) ); ?>></th>
</span><span class="cx" style="display: block; padding: 0 10px"> <td colspan="2"><label for="wcor_send_design_wrangler">The Design Wrangler</label></td>
</span><span class="cx" style="display: block; padding: 0 10px"> </tr>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> <tr>
</span><span class="cx" style="display: block; padding: 0 10px"> <th><input id="wcor_send_website_wrangler" name="wcor_send_where[]" type="checkbox" value="wcor_send_website_wrangler" <?php checked( in_array( 'wcor_send_website_wrangler', $send_where ) ); ?>></th>
</span><span class="cx" style="display: block; padding: 0 10px"> <td colspan="2"><label for="wcor_send_website_wrangler">The Website Wrangler</label></td>
</span><span class="cx" style="display: block; padding: 0 10px"> </tr>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> <tr>
</span><span class="cx" style="display: block; padding: 0 10px"> <th><input id="wcor_send_social_wrangler" name="wcor_send_where[]" type="checkbox" value="wcor_send_social_wrangler" <?php checked( in_array( 'wcor_send_social_wrangler', $send_where ) ); ?>></th>
</span><span class="cx" style="display: block; padding: 0 10px"> <td colspan="2"><label for="wcor_send_social_wrangler">The Social Media/Publicity Wrangler</label></td>
</span><span class="cx" style="display: block; padding: 0 10px"> </tr>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> <tr>
</span><span class="cx" style="display: block; padding: 0 10px"> <th><input id="wcor_send_a_v_wrangler" name="wcor_send_where[]" type="checkbox" value="wcor_send_a_v_wrangler" <?php checked( in_array( 'wcor_send_a_v_wrangler', $send_where ) ); ?>></th>
</span><span class="cx" style="display: block; padding: 0 10px"> <td colspan="2"><label for="wcor_send_a_v_wrangler">The A/V Wrangler</label></td>
</span><span class="cx" style="display: block; padding: 0 10px"> </tr>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> <tr>
</span><span class="cx" style="display: block; padding: 0 10px"> <th><input id="wcor_send_party_wrangler" name="wcor_send_where[]" type="checkbox" value="wcor_send_party_wrangler" <?php checked( in_array( 'wcor_send_party_wrangler', $send_where ) ); ?>></th>
</span><span class="cx" style="display: block; padding: 0 10px"> <td colspan="2"><label for="wcor_send_party_wrangler">The Party Wrangler</label></td>
</span><span class="cx" style="display: block; padding: 0 10px"> </tr>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> <tr>
</span><span class="cx" style="display: block; padding: 0 10px"> <th><input id="wcor_send_travel_wrangler" name="wcor_send_where[]" type="checkbox" value="wcor_send_travel_wrangler" <?php checked( in_array( 'wcor_send_travel_wrangler', $send_where ) ); ?>></th>
</span><span class="cx" style="display: block; padding: 0 10px"> <td colspan="2"><label for="wcor_send_travel_wrangler">The Travel Wrangler</label></td>
</span><span class="cx" style="display: block; padding: 0 10px"> </tr>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> <tr>
</span><span class="cx" style="display: block; padding: 0 10px"> <th><input id="wcor_send_safety_wrangler" name="wcor_send_where[]" type="checkbox" value="wcor_send_safety_wrangler" <?php checked( in_array( 'wcor_send_safety_wrangler', $send_where ) ); ?>></th>
</span><span class="cx" style="display: block; padding: 0 10px"> <td colspan="2"><label for="wcor_send_safety_wrangler">The Safety Wrangler</label></td>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -195,8 +195,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> </tr>
</span><span class="cx" style="display: block; padding: 0 10px"> </tbody>
</span><span class="cx" style="display: block; padding: 0 10px"> </table>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+
</ins><span class="cx" style="display: block; padding: 0 10px"> <h4>When should this e-mail be sent?</h4>
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> <table>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -234,7 +234,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <td>
</span><span class="cx" style="display: block; padding: 0 10px"> <select name="wcor_which_trigger">
</span><span class="cx" style="display: block; padding: 0 10px"> <option value="null" <?php selected( $which_trigger, false ); ?>></option>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> <?php foreach ( $GLOBALS['WCOR_Mailer']->triggers as $trigger_id => $trigger ) : ?>
</span><span class="cx" style="display: block; padding: 0 10px"> <option value="<?php echo esc_attr( $trigger_id ); ?>" <?php selected( $which_trigger, $trigger_id ); ?>><?php echo esc_html( $trigger['name'] ); ?></option>
</span><span class="cx" style="display: block; padding: 0 10px"> <?php endforeach; ?>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -364,9 +364,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return $wordcamps;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $statuses = WordCamp_Loader::get_post_statuses();
+ $statuses = array_merge( array_keys( $statuses ), array( 'draft', 'pending', 'publish' ) );
+
</ins><span class="cx" style="display: block; padding: 0 10px"> $wordcamps = get_posts( array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'post_type' => WCPT_POST_TYPE_ID,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'post_status' => array( 'draft', 'pending', 'publish' ),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'post_status' => $statuses,
</ins><span class="cx" style="display: block; padding: 0 10px"> 'numberposts' => -1,
</span><span class="cx" style="display: block; padding: 0 10px"> ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -437,7 +440,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Checks to make sure the conditions for saving post meta are met
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- *
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ *
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param int $post_id
</span><span class="cx" style="display: block; padding: 0 10px"> * @param object $post
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -455,14 +458,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) || ! isset( $post->ID ) || $post->post_status == 'auto-draft' ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return;
</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><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->save_post_meta( $post, $_POST );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->send_manual_email( $post, $_POST );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Saves the meta data for the reminder post
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- *
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ *
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param WP_Post $post
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $new_meta
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -480,8 +483,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( isset( $new_meta['wcor_send_custom_address'] ) && is_email( $new_meta['wcor_send_custom_address'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> update_post_meta( $post->ID, 'wcor_send_custom_address', sanitize_email( $new_meta['wcor_send_custom_address'] ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- }
-
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ }
+
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( isset( $new_meta['wcor_send_when'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( in_array( $new_meta['wcor_send_when'], array( 'wcor_send_before', 'wcor_send_after', 'wcor_send_after_pending', 'wcor_send_trigger' ) ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> update_post_meta( $post->ID, 'wcor_send_when', $new_meta['wcor_send_when'] );
</span><span class="cx" style="display: block; padding: 0 10px">Index: sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments
</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-payments 2016-04-05 15:55:25 UTC (rev 2897)
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments 2016-04-05 16:05:02 UTC (rev 2898)
</ins></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcamppayments"></a>
<div class="propset"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Property changes: sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svnmergeinfo"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: svn:mergeinfo</h4></div>
<ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/sites/branches/application-tracking/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments:2783-2897
</ins><span class="cx" style="display: block; padding: 0 10px"> /sites/branches/wcb-payment-request-statuses/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments:2603-2632
</span><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of property
</span><span class="cx" style="display: block; padding: 0 10px">Index: sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments-network
</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-payments-network 2016-04-05 15:55:25 UTC (rev 2897)
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments-network 2016-04-05 16:05:02 UTC (rev 2898)
</ins><a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcamppaymentsnetwork"></a>
<div class="propset"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Property changes: sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments-network</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svnmergeinfo"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: svn:mergeinfo</h4></div>
<ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/sites/branches/application-tracking/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments-network:2783-2897
</ins><span class="cx" style="display: block; padding: 0 10px"> /sites/branches/wcb-payment-request-statuses/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments-network:2603-2631
</span><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of property
</span><a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcampsiteclonerwordcampsiteclonerphp"></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-site-cloner/wordcamp-site-cloner.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-site-cloner/wordcamp-site-cloner.php 2016-04-05 15:55:25 UTC (rev 2897)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-site-cloner/wordcamp-site-cloner.php 2016-04-05 16:05:02 UTC (rev 2898)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -119,7 +119,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $sites = array();
</span><span class="cx" style="display: block; padding: 0 10px"> $wordcamps = get_posts( array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'post_type' => 'wordcamp',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'post_status' => 'publish',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'post_status' => WordCamp_Loader::get_public_post_statuses(),
</ins><span class="cx" style="display: block; padding: 0 10px"> 'posts_per_page' => 125, // todo temporary workaround until able to add filters to make hundreds of sites manageable
</span><span class="cx" style="display: block; padding: 0 10px"> 'meta_key' => 'Start Date (YYYY-mm-dd)',
</span><span class="cx" style="display: block; padding: 0 10px"> 'orderby' => 'meta_value_num',
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentthemeswordcampcentral2012functionsphp"></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/themes/wordcamp-central-2012/functions.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/themes/wordcamp-central-2012/functions.php 2016-04-05 15:55:25 UTC (rev 2897)
+++ sites/trunk/wordcamp.org/public_html/wp-content/themes/wordcamp-central-2012/functions.php 2016-04-05 16:05:02 UTC (rev 2898)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -39,7 +39,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> add_action( 'wp_ajax_nopriv_get_latest_wordcamp_tweets', array( __CLASS__, 'get_latest_tweets' ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> add_filter( 'excerpt_more', array( __CLASS__, 'excerpt_more' ), 11 );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // add_filter( 'wcpt_register_post_type', array( __CLASS__, 'wcpt_register_post_type' ) ); // set to public in wcpt plugin
</del><span class="cx" style="display: block; padding: 0 10px"> add_filter( 'nav_menu_css_class', array( __CLASS__, 'nav_menu_css_class' ), 10, 3 );
</span><span class="cx" style="display: block; padding: 0 10px"> add_filter( 'wp_nav_menu_items', array( __CLASS__, 'add_links_to_footer_menu' ), 10, 2 );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -276,11 +275,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $parameters = array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'post_type' => 'wordcamp',
</span><span class="cx" style="display: block; padding: 0 10px"> 'posts_per_page' => -1,
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'post_status' => array_merge(
+ WordCamp_Loader::get_public_post_statuses(),
+ WordCamp_Loader::get_pre_planning_post_statuses()
+ ),
</ins><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> switch( $map_id ) {
</span><span class="cx" style="display: block; padding: 0 10px"> case 'schedule':
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $parameters['post_status'][] = array( 'publish', 'pending' );
</del><span class="cx" style="display: block; padding: 0 10px"> $parameters['meta_query'][] = array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'key' => 'Start Date (YYYY-mm-dd)',
</span><span class="cx" style="display: block; padding: 0 10px"> 'value' => strtotime( '-2 days' ),
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -331,15 +333,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"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Filters wcpt_register_post_type, sets post type to public.
- * @todo move to wcpt_register_post_types when ready.
- */
- static function wcpt_register_post_type( $args ) {
- $args['public'] = true;
- return $args;
- }
-
- /**
</del><span class="cx" style="display: block; padding: 0 10px"> * Filters nav_menu_css_class.
</span><span class="cx" style="display: block; padding: 0 10px"> * Make sure Schedule is current-menu-item when viewing WordCamps.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -703,6 +696,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> public static function get_upcoming_wordcamps_query( $count = 10 ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $query = new WP_Query( array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'post_type' => WCPT_POST_TYPE_ID,
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'post_status' => WordCamp_Loader::get_public_post_statuses(),
</ins><span class="cx" style="display: block; padding: 0 10px"> 'posts_per_page' => $count,
</span><span class="cx" style="display: block; padding: 0 10px"> 'meta_key' => 'Start Date (YYYY-mm-dd)',
</span><span class="cx" style="display: block; padding: 0 10px"> 'orderby' => 'meta_value',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -815,6 +809,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $cities = array();
</span><span class="cx" style="display: block; padding: 0 10px"> $wordcamps = new WP_Query( array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'post_type' => 'wordcamp',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'post_status' => WordCamp_Loader::get_public_post_statuses(),
</ins><span class="cx" style="display: block; padding: 0 10px"> 'posts_per_page' => -1,
</span><span class="cx" style="display: block; padding: 0 10px"> ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentthemeswordcampcentral2012sidebarschedulephp"></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/themes/wordcamp-central-2012/sidebar-schedule.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/themes/wordcamp-central-2012/sidebar-schedule.php 2016-04-05 15:55:25 UTC (rev 2897)
+++ sites/trunk/wordcamp.org/public_html/wp-content/themes/wordcamp-central-2012/sidebar-schedule.php 2016-04-05 16:05:02 UTC (rev 2898)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -10,11 +10,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <?php echo wptexturize( wpautop( "These WordCamps are in the early stages of planning, but don't have a date yet. When their dates are confirmed, they'll be added to the schedule of approved WordCamps." ) );
</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">- <?php
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <?php
</ins><span class="cx" style="display: block; padding: 0 10px"> // Get the upcoming approved (published) WordCamps *with dates*
</span><span class="cx" style="display: block; padding: 0 10px"> $args = array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'posts_per_page' => -1,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'post_status' => 'pending',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'post_status' => WordCamp_Loader::get_pre_planning_post_statuses(),
</ins><span class="cx" style="display: block; padding: 0 10px"> 'meta_key' => 'Start Date (YYYY-mm-dd)',
</span><span class="cx" style="display: block; padding: 0 10px"> 'orderby' => 'meta_value',
</span><span class="cx" style="display: block; padding: 0 10px"> 'order' => 'ASC',
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentthemeswordcampcentral2012singlewordcampphp"></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/themes/wordcamp-central-2012/single-wordcamp.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/themes/wordcamp-central-2012/single-wordcamp.php 2016-04-05 15:55:25 UTC (rev 2897)
+++ sites/trunk/wordcamp.org/public_html/wp-content/themes/wordcamp-central-2012/single-wordcamp.php 2016-04-05 16:05:02 UTC (rev 2898)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -80,7 +80,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $wordcamps = get_posts( array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'posts_per_page' => 30,
</span><span class="cx" style="display: block; padding: 0 10px"> 'post_type' => 'wordcamp',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'post_status' => 'any',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'post_status' => WordCamp_Loader::get_public_post_statuses(),
</ins><span class="cx" style="display: block; padding: 0 10px"> 'orderby' => 'ID',
</span><span class="cx" style="display: block; padding: 0 10px"> 's' => $wordcamp_title,
</span><span class="cx" style="display: block; padding: 0 10px"> ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -94,7 +94,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> wcpt_has_wordcamps( array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'posts_per_page' => 30,
</span><span class="cx" style="display: block; padding: 0 10px"> 'order' => 'ASC',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'post_status' => 'any',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'post_status' => WordCamp_Loader::get_public_post_statuses(),
</ins><span class="cx" style="display: block; padding: 0 10px"> 'post__in' => wp_list_pluck( $wordcamps, 'ID' ),
</span><span class="cx" style="display: block; padding: 0 10px"> ) )
</span><span class="cx" style="display: block; padding: 0 10px"> ) :
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentthemeswordcampcentral2012templatehomephp"></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/themes/wordcamp-central-2012/template-home.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/themes/wordcamp-central-2012/template-home.php 2016-04-05 15:55:25 UTC (rev 2897)
+++ sites/trunk/wordcamp.org/public_html/wp-content/themes/wordcamp-central-2012/template-home.php 2016-04-05 16:05:02 UTC (rev 2898)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -16,6 +16,15 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <?php // Get the upcoming WordCamps
</span><span class="cx" style="display: block; padding: 0 10px"> if ( function_exists( 'wcpt_has_wordcamps' ) &&
</span><span class="cx" style="display: block; padding: 0 10px"> wcpt_has_wordcamps( array(
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'post_status' => array(
+ 'wcpt-scheduled',
+ 'wcpt-needs-debrief',
+ 'wcpt-debrief-schedul',
+ 'wcpt-closed',
+
+ // back-compat
+ 'publish',
+ ),
</ins><span class="cx" style="display: block; padding: 0 10px"> 'posts_per_page' => 5,
</span><span class="cx" style="display: block; padding: 0 10px"> 'meta_key' => 'Start Date (YYYY-mm-dd)',
</span><span class="cx" style="display: block; padding: 0 10px"> 'orderby' => 'meta_value',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -57,8 +66,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( (array) $formats as $i => $format )
</span><span class="cx" style="display: block; padding: 0 10px"> $formats[$i] = 'post-format-' . $format;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $news = new WP_Query( array(
- 'posts_per_page' => 1,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $news = new WP_Query( array(
+ 'posts_per_page' => 1,
</ins><span class="cx" style="display: block; padding: 0 10px"> 'ignore_sticky_posts' => 1,
</span><span class="cx" style="display: block; padding: 0 10px"> 'tax_query' => array(
</span><span class="cx" style="display: block; padding: 0 10px"> array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -84,7 +93,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <?php endwhile; ?>
</span><span class="cx" style="display: block; padding: 0 10px"> <?php endif; ?>
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <a href="<?php echo home_url( '/news/' ); ?>" class="more">More News →</a>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <a href="<?php echo home_url( '/news/' ); ?>" class="more">More News →</a>
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> </div><!-- .wc-news -->
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentthemeswordcampcentral2012templatepastwordcampsphp"></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/themes/wordcamp-central-2012/template-past-wordcamps.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/themes/wordcamp-central-2012/template-past-wordcamps.php 2016-04-05 15:55:25 UTC (rev 2897)
+++ sites/trunk/wordcamp.org/public_html/wp-content/themes/wordcamp-central-2012/template-past-wordcamps.php 2016-04-05 16:05:02 UTC (rev 2898)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -10,7 +10,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> <div id="container" class="wc-schedule">
</span><span class="cx" style="display: block; padding: 0 10px"> <div id="content" role="main">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> <?php if ( have_posts() ) : the_post(); ?>
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -21,10 +21,18 @@
</span><span class="cx" style="display: block; padding: 0 10px"> </div><!-- #post-## -->
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> <?php endif; // end of the loop. ?>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> <?php // Get the upcoming approved (published) WordCamps
</span><span class="cx" style="display: block; padding: 0 10px"> if ( function_exists( 'wcpt_has_wordcamps' ) &&
</span><span class="cx" style="display: block; padding: 0 10px"> wcpt_has_wordcamps( array(
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'post_status' => array(
+ 'wcpt-needs-debrief',
+ 'wcpt-debrief-schedul',
+ 'wcpt-closed',
+
+ // back-compat
+ 'publish',
+ ),
</ins><span class="cx" style="display: block; padding: 0 10px"> 'posts_per_page' => -1,
</span><span class="cx" style="display: block; padding: 0 10px"> 'meta_key' => 'Start Date (YYYY-mm-dd)',
</span><span class="cx" style="display: block; padding: 0 10px"> 'orderby' => 'meta_value',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -75,7 +83,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> </div><!-- #content -->
</span><span class="cx" style="display: block; padding: 0 10px"> </div><!-- #container -->
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-<?php
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
</ins><span class="cx" style="display: block; padding: 0 10px"> /*get_sidebar( 'schedule' ); */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- get_footer();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ get_footer();
</ins><span class="cx" style="display: block; padding: 0 10px"> ?>
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentthemeswordcampcentral2012templateschedulephp"></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/themes/wordcamp-central-2012/template-schedule.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/themes/wordcamp-central-2012/template-schedule.php 2016-04-05 15:55:25 UTC (rev 2897)
+++ sites/trunk/wordcamp.org/public_html/wp-content/themes/wordcamp-central-2012/template-schedule.php 2016-04-05 16:05:02 UTC (rev 2898)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -10,7 +10,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> <div id="container" class="wc-schedule">
</span><span class="cx" style="display: block; padding: 0 10px"> <div id="content" role="main">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> <?php if ( have_posts() ) : the_post(); ?>
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -21,10 +21,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> </div><!-- #post-## -->
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> <?php endif; // end of the loop. ?>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> <?php // Get the upcoming approved (published) WordCamps
</span><span class="cx" style="display: block; padding: 0 10px"> if ( function_exists( 'wcpt_has_wordcamps' ) &&
</span><span class="cx" style="display: block; padding: 0 10px"> wcpt_has_wordcamps( array(
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'post_status' => WordCamp_Loader::get_public_post_statuses(),
</ins><span class="cx" style="display: block; padding: 0 10px"> 'posts_per_page' => -1,
</span><span class="cx" style="display: block; padding: 0 10px"> 'meta_key' => 'Start Date (YYYY-mm-dd)',
</span><span class="cx" style="display: block; padding: 0 10px"> 'orderby' => 'meta_value',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -34,13 +35,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'value' => strtotime( '-2 days' ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'compare' => '>'
</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><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ ) )
</ins><span class="cx" style="display: block; padding: 0 10px"> ) :
</span><span class="cx" style="display: block; padding: 0 10px"> ?>
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> <ul class="wc-schedule-list">
</span><span class="cx" style="display: block; padding: 0 10px"> <?php while ( wcpt_wordcamps() ) : wcpt_the_wordcamp(); ?>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> <li>
</span><span class="cx" style="display: block; padding: 0 10px"> <a href="<?php echo esc_url( wcpt_get_wordcamp_url() ); ?>">
</span><span class="cx" style="display: block; padding: 0 10px"> <?php if ( has_post_thumbnail() ) : ?>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -48,7 +49,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <?php else : ?>
</span><span class="cx" style="display: block; padding: 0 10px"> <div class="wc-image wp-post-image wordcamp-placeholder-thumb" title="<?php the_title(); ?>"></div>
</span><span class="cx" style="display: block; padding: 0 10px"> <?php endif; ?>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> <h2 class="wc-title"><?php wcpt_wordcamp_title(); ?></h2>
</span><span class="cx" style="display: block; padding: 0 10px"> <span class="wc-country"><?php wcpt_wordcamp_location(); ?></span>
</span><span class="cx" style="display: block; padding: 0 10px"> <span class="wc-date">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -76,6 +77,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> </div><!-- #content -->
</span><span class="cx" style="display: block; padding: 0 10px"> </div><!-- #container -->
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-<?php
- get_sidebar( 'schedule' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+ get_sidebar( 'schedule' );
</ins><span class="cx" style="display: block; padding: 0 10px"> get_footer();
</span><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span></span></pre>
</div>
</div>
</body>
</html>