<!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>[7855] sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/wcorg-misc.php: WordCamp Misc: Setup external for `Slack\Send()`.</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="http://meta.trac.wordpress.org/changeset/7855">7855</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/7855","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>iandunn</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2018-11-16 18:38:39 +0000 (Fri, 16 Nov 2018)</dd>
</dl>

<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>WordCamp Misc: Setup external for `Slack\Send()`.

The API role doesn't exist on the production server, so we need a local copy of the Slack includes.

The logger was moved to load after Slack, so that any errors in the logger would trigger Slack notifications instead of failing silently.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentmupluginswcorgmiscphp">sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/wcorg-misc.php</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentmuplugins0slackphp">sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/0-slack.php</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentmuplugins1loggerphp">sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/1-logger.php</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentmuplugins0loggerphp">sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/0-logger.php</a></li>
</ul>

<h3>Property Changed</h3>
<ul>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentmupluginsincludes">sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/includes/</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentmuplugins0loggerphp"></a>
<div class="delfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Deleted: sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/0-logger.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/0-logger.php   2018-11-16 10:36:12 UTC (rev 7854)
+++ sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/0-logger.php     2018-11-16 18:38:39 UTC (rev 7855)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,176 +0,0 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-<?php
-
-namespace WordCamp\Logger;
-defined( 'WPINC' ) or die();
-
-/**
- * Log an event, with optional additional data
- *
- * SECURITY WARNING: You must redact any sensitive info before it's written to the log file. The best way to do
- * that is to add entries to redact_keys(), so that the caller remain clean. You can also do it before
- * passing the data to this function, though.
- *
- * @todo add a $type param with 'error' and 'info' values. errors continue to go to std error log. info is logged
- *       to separate file, so they don't clutter error log. need to rotate that file. then update callers to use
- *       new param.
- *
- * @param string $error_code
- * @param array  $data
- */
-function log( $error_code, $data = array() ) {
-       $backtrace = debug_backtrace( DEBUG_BACKTRACE_PROVIDE_OBJECT, 2 );
-       $meta_information = array();
-
-       if ( 'cli' === php_sapi_name() ) {
-               $meta_information['command'] = sprintf( '%s %s', $_SERVER['_'] ?? '', implode( ' ', $_SERVER['argv'] ) );
-       } else {
-               $meta_information['request_url'] = sprintf(
-                       '%s://%s%s',
-                       $_SERVER['HTTPS'] ? 'https' : 'http',
-                       $_SERVER['SERVER_NAME'],
-                       $_SERVER['REQUEST_URI']
-               );
-
-               // Fall back to IP address if it's too early to detect the user
-               if ( did_action( 'after_setup_theme' ) > 0 ) {
-                       $meta_information['current_user'] = get_current_user_id();
-               } else {
-                       $meta_information['remote_ip'] = $_SERVER['REMOTE_ADDR'];
-               }
-       }
-       $data['logger_meta'] = $meta_information;
-
-       redact_keys( $data );
-       $data = str_replace( "\n", '[newline]', wp_json_encode( $data ) );
-
-       $log_entry = sprintf(
-               '[%s] %s:%s - %s:%s%s',
-               get_unique_request_id(),
-               basename( $backtrace[0]['file'] ),
-               $backtrace[0]['line'],
-               $backtrace[1]['function'],
-               $error_code,
-               $data ? ' -- ' . $data : ''
-       );
-
-       error_log( $log_entry );
-}
-
-/**
- * Redact sensitive values from log entries
- *
- * Right now this only redacts array keys, but it can be made more sophisticated in the future to handle
- * additional cases.
- *
- * In the future, it may be helpful to decode JSON values and search them for redactable values, and to allow
- * the caller to pass an array of strings that are sensitive and should be redacted. The latter would allow for
- * redacting values that aren't known until runtime, and could be helpful in other cases too.
- *
- * @param array $data
- *
- * @return array
- */
-function redact_keys( & $data ) {
-       $redacted_keys = array( 'Authorization', 'password', 'user_pass', 'key', 'apikey', 'api_key', 'client_secret' );
-       $redacted_keys = array_map( 'strtolower', $redacted_keys ); // to avoid human error
-
-       foreach ( $data as $key => $value ) {
-               /*
-                * If an object is cast to an array, the array key for the object's private/protected members will contain
-                * whitespace, which causes json_decode() to ignore it. So instead, just make a simple array.
-                *
-                * The normal backtrace will often be very large, and contain recursive elements, which could lead to a
-                * script timeout. WP's summary is enough for this purpose.
-                */
-               if ( is_a( $value, 'Exception' ) ) {
-                       $value = array(
-                               'message' => $value->getMessage(),
-                               'code'    => $value->getCode(),
-                               'file'    => $value->getFile(),
-                               'line'    => $value->getLine(),
-                               'trace'   => wp_debug_backtrace_summary()
-                       );
-               }
-
-               if ( is_object( $value ) ) {
-                       $value = (array) $value;
-               }
-
-               if ( false !== filter_var( $value, FILTER_VALIDATE_URL ) ) {
-                       $url_parts = parse_url( $value );
-
-                       if ( ! empty( $url_parts['query'] ) ) {
-                               parse_str( $url_parts['query'], $query );
-                               $url_parts['query'] = redact_keys( $query );
-                               $value              = $url_parts;
-                       }
-               }
-
-               if ( in_array( strtolower( $key ), $redacted_keys, true ) ) {
-                        $data[ $key ] = '[redacted]';
-               }
-
-               if ( is_array( $value ) ) {
-                       $data[ $key ] = redact_keys( $value );
-               }
-       }
-
-       return $data;
-}
-
-/**
- * Generate a unique ID for the current request
- *
- * This is useful when debugging race conditions, etc, so that you can identify which log entries belong to each thread.
- *
- * Based on https://stackoverflow.com/a/22508709/450127
- *
- * @return string
- */
-function get_unique_request_id() {
-       if ( 'cli' === php_sapi_name() ) {
-               $caller = $_SERVER['USER'] . ( $_SERVER['SSH_CONNECTION'] ?? '' );
-       } else {
-               $caller = $_SERVER['REMOTE_ADDR'] . $_SERVER['REMOTE_PORT'];
-       }
-
-       return hash( 'crc32b', $caller . $_SERVER['REQUEST_TIME_FLOAT'] );
-}
-
-/**
- * Format entries created with log()
- *
- * See WordCamp_CLI_Miscellaneous::format_log() for usage instructions.
- *
- * @param string $raw_log
- * @param string $foreign_entries `ignore` or `include` entries that weren't created with log()
- *
- * @return string
- */
-function format_log( $raw_log, $foreign_entries = 'include' ) {
-       $formatted_log        = '';
-       $raw_entries          = explode( "\n", $raw_log );
-       $native_entry_pattern = '/(\[.*?\]) (\[\w+\]) (.*?:.*?) - (.*?) -- (\{.*\})/';
-
-       foreach ( $raw_entries as $entry ) {
-               $is_native_entry = 1 === preg_match( $native_entry_pattern, $entry, $entry_parts );
-               // todo bug: this should be recognized as native -- [18-Jan-2017 00:33:04 UTC] [b1955769] source-site-id-setting.php:29 - preview:post_val -- [null]
-
-               if ( $is_native_entry ) {
-                       $formatted_log .= sprintf(
-                               "\n%s %s %s - %s\n%s",
-                               $entry_parts[1],
-                               $entry_parts[2],
-                               $entry_parts[3],
-                               $entry_parts[4],
-                               print_r( json_decode( $entry_parts[5], true ), true )
-                       );
-               } else {
-                       if ( 'ignore' !== $foreign_entries ) {
-                               $formatted_log .= $entry . "\n";
-                       }
-               }
-       }
-
-       return $formatted_log;
-}
</del></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentmuplugins0slackphp"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/0-slack.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/0-slack.php                            (rev 0)
+++ sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/0-slack.php      2018-11-16 18:38:39 UTC (rev 7855)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,9 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+
+/*
+ * Load the Slack includes early so they'll be available to send fatal errors.
+ */
+
+defined( 'WPINC' ) or die();
+
+require_once( __DIR__ . '/includes/slack/send.php' );
</ins><span class="cx" style="display: block; padding: 0 10px">Property changes on: sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/0-slack.php
</span><span class="cx" style="display: block; padding: 0 10px">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: svn:eol-style</h4></div>
<ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+native
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of property
</span><a id="sitestrunkwordcamporgpublic_htmlwpcontentmuplugins1loggerphpfromrev7854sitestrunkwordcamporgpublic_htmlwpcontentmuplugins0loggerphp"></a>
<div class="copfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Copied: sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/1-logger.php (from rev 7854, sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/0-logger.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/1-logger.php                           (rev 0)
+++ sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/1-logger.php     2018-11-16 18:38:39 UTC (rev 7855)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,176 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+
+namespace WordCamp\Logger;
+defined( 'WPINC' ) or die();
+
+/**
+ * Log an event, with optional additional data
+ *
+ * SECURITY WARNING: You must redact any sensitive info before it's written to the log file. The best way to do
+ * that is to add entries to redact_keys(), so that the caller remain clean. You can also do it before
+ * passing the data to this function, though.
+ *
+ * @todo add a $type param with 'error' and 'info' values. errors continue to go to std error log. info is logged
+ *       to separate file, so they don't clutter error log. need to rotate that file. then update callers to use
+ *       new param.
+ *
+ * @param string $error_code
+ * @param array  $data
+ */
+function log( $error_code, $data = array() ) {
+       $backtrace = debug_backtrace( DEBUG_BACKTRACE_PROVIDE_OBJECT, 2 );
+       $meta_information = array();
+
+       if ( 'cli' === php_sapi_name() ) {
+               $meta_information['command'] = sprintf( '%s %s', $_SERVER['_'] ?? '', implode( ' ', $_SERVER['argv'] ) );
+       } else {
+               $meta_information['request_url'] = sprintf(
+                       '%s://%s%s',
+                       $_SERVER['HTTPS'] ? 'https' : 'http',
+                       $_SERVER['SERVER_NAME'],
+                       $_SERVER['REQUEST_URI']
+               );
+
+               // Fall back to IP address if it's too early to detect the user
+               if ( did_action( 'after_setup_theme' ) > 0 ) {
+                       $meta_information['current_user'] = get_current_user_id();
+               } else {
+                       $meta_information['remote_ip'] = $_SERVER['REMOTE_ADDR'];
+               }
+       }
+       $data['logger_meta'] = $meta_information;
+
+       redact_keys( $data );
+       $data = str_replace( "\n", '[newline]', wp_json_encode( $data ) );
+
+       $log_entry = sprintf(
+               '[%s] %s:%s - %s:%s%s',
+               get_unique_request_id(),
+               basename( $backtrace[0]['file'] ),
+               $backtrace[0]['line'],
+               $backtrace[1]['function'],
+               $error_code,
+               $data ? ' -- ' . $data : ''
+       );
+
+       error_log( $log_entry );
+}
+
+/**
+ * Redact sensitive values from log entries
+ *
+ * Right now this only redacts array keys, but it can be made more sophisticated in the future to handle
+ * additional cases.
+ *
+ * In the future, it may be helpful to decode JSON values and search them for redactable values, and to allow
+ * the caller to pass an array of strings that are sensitive and should be redacted. The latter would allow for
+ * redacting values that aren't known until runtime, and could be helpful in other cases too.
+ *
+ * @param array $data
+ *
+ * @return array
+ */
+function redact_keys( & $data ) {
+       $redacted_keys = array( 'Authorization', 'password', 'user_pass', 'key', 'apikey', 'api_key', 'client_secret' );
+       $redacted_keys = array_map( 'strtolower', $redacted_keys ); // to avoid human error
+
+       foreach ( $data as $key => $value ) {
+               /*
+                * If an object is cast to an array, the array key for the object's private/protected members will contain
+                * whitespace, which causes json_decode() to ignore it. So instead, just make a simple array.
+                *
+                * The normal backtrace will often be very large, and contain recursive elements, which could lead to a
+                * script timeout. WP's summary is enough for this purpose.
+                */
+               if ( is_a( $value, 'Exception' ) ) {
+                       $value = array(
+                               'message' => $value->getMessage(),
+                               'code'    => $value->getCode(),
+                               'file'    => $value->getFile(),
+                               'line'    => $value->getLine(),
+                               'trace'   => wp_debug_backtrace_summary()
+                       );
+               }
+
+               if ( is_object( $value ) ) {
+                       $value = (array) $value;
+               }
+
+               if ( false !== filter_var( $value, FILTER_VALIDATE_URL ) ) {
+                       $url_parts = parse_url( $value );
+
+                       if ( ! empty( $url_parts['query'] ) ) {
+                               parse_str( $url_parts['query'], $query );
+                               $url_parts['query'] = redact_keys( $query );
+                               $value              = $url_parts;
+                       }
+               }
+
+               if ( in_array( strtolower( $key ), $redacted_keys, true ) ) {
+                        $data[ $key ] = '[redacted]';
+               }
+
+               if ( is_array( $value ) ) {
+                       $data[ $key ] = redact_keys( $value );
+               }
+       }
+
+       return $data;
+}
+
+/**
+ * Generate a unique ID for the current request
+ *
+ * This is useful when debugging race conditions, etc, so that you can identify which log entries belong to each thread.
+ *
+ * Based on https://stackoverflow.com/a/22508709/450127
+ *
+ * @return string
+ */
+function get_unique_request_id() {
+       if ( 'cli' === php_sapi_name() ) {
+               $caller = $_SERVER['USER'] . ( $_SERVER['SSH_CONNECTION'] ?? '' );
+       } else {
+               $caller = $_SERVER['REMOTE_ADDR'] . $_SERVER['REMOTE_PORT'];
+       }
+
+       return hash( 'crc32b', $caller . $_SERVER['REQUEST_TIME_FLOAT'] );
+}
+
+/**
+ * Format entries created with log()
+ *
+ * See WordCamp_CLI_Miscellaneous::format_log() for usage instructions.
+ *
+ * @param string $raw_log
+ * @param string $foreign_entries `ignore` or `include` entries that weren't created with log()
+ *
+ * @return string
+ */
+function format_log( $raw_log, $foreign_entries = 'include' ) {
+       $formatted_log        = '';
+       $raw_entries          = explode( "\n", $raw_log );
+       $native_entry_pattern = '/(\[.*?\]) (\[\w+\]) (.*?:.*?) - (.*?) -- (\{.*\})/';
+
+       foreach ( $raw_entries as $entry ) {
+               $is_native_entry = 1 === preg_match( $native_entry_pattern, $entry, $entry_parts );
+               // todo bug: this should be recognized as native -- [18-Jan-2017 00:33:04 UTC] [b1955769] source-site-id-setting.php:29 - preview:post_val -- [null]
+
+               if ( $is_native_entry ) {
+                       $formatted_log .= sprintf(
+                               "\n%s %s %s - %s\n%s",
+                               $entry_parts[1],
+                               $entry_parts[2],
+                               $entry_parts[3],
+                               $entry_parts[4],
+                               print_r( json_decode( $entry_parts[5], true ), true )
+                       );
+               } else {
+                       if ( 'ignore' !== $foreign_entries ) {
+                               $formatted_log .= $entry . "\n";
+                       }
+               }
+       }
+
+       return $formatted_log;
+}
</ins><span class="cx" style="display: block; padding: 0 10px">Index: sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/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">--- sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/includes  2018-11-16 10:36:12 UTC (rev 7854)
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+++ sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/includes   2018-11-16 18:38:39 UTC (rev 7855)
</ins></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentmupluginsincludes"></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/mu-plugins/includes</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svnexternals"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: svn:externals</h4></div>
<ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+slack        https://meta.svn.wordpress.org/sites/trunk/common/includes/slack/
</ins><a id="sitestrunkwordcamporgpublic_htmlwpcontentmupluginswcorgmiscphp"></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-misc.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-misc.php 2018-11-16 10:36:12 UTC (rev 7854)
+++ sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/wcorg-misc.php   2018-11-16 18:38:39 UTC (rev 7855)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -507,12 +507,12 @@
</span><span class="cx" style="display: block; padding: 0 10px">                "author_name" => $domain,
</span><span class="cx" style="display: block; padding: 0 10px">                "text" => $text,
</span><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 '/home/api/public_html/includes/slack-config.php';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px">         $send = new \Dotorg\Slack\Send( SLACK_ERROR_REPORT_URL );
</span><span class="cx" style="display: block; padding: 0 10px">        $send->add_attachment( $message );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        // For now
-       $send->send( 'vedanshu' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // @todo change to WORDCAMP_LOGS_SLACK_CHANNEL when ready
+       $send->send( '@vedanshu' );
</ins><span class="cx" style="display: block; padding: 0 10px">         return false;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span></span></pre>
</div>
</div>

</body>
</html>