Changeset 4314
- Timestamp:
- 11/01/2016 07:08:47 PM (8 years ago)
- Location:
- sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/0-logger.php
r4252 r4314 8 8 * 9 9 * SECURITY WARNING: You must redact any sensitive info before it's written to the log file. The best way to do 10 * that is to add entries to wcorg_log_redact_keys(), so that the caller remain clean. You can also do it before 11 * passing the data to this function, though. Right now this only redacts array keys, but it can be made more 12 * sophisticated in the future to handle additional cases. 10 * that is to add entries to redact_keys(), so that the caller remain clean. You can also do it before 11 * passing the data to this function, though. 13 12 * 14 * In the future, it may be helpful to decode JSON values and search them for redactable values, and to allow 15 * the caller to pass an array of strings that are sensitive and should be redacted. The latter would allow for 16 * redacting values that aren't known until runtime, and could be helpful in other cases too. 13 * @todo add current username to every entry, and update wp-cli command parsing regex to match 17 14 * 18 15 * @param string $error_code … … 43 40 /** 44 41 * Redact sensitive values from log entries 42 * 43 * Right now this only redacts array keys, but it can be made more sophisticated in the future to handle 44 * additional cases. 45 * 46 * In the future, it may be helpful to decode JSON values and search them for redactable values, and to allow 47 * the caller to pass an array of strings that are sensitive and should be redacted. The latter would allow for 48 * redacting values that aren't known until runtime, and could be helpful in other cases too. 45 49 * 46 50 * @param array $data -
sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/camptix-tweaks/camptix-tweaks.php
r3803 r4314 22 22 add_filter( 'camptix_default_options', __NAMESPACE__ . '\modify_default_options' ); 23 23 add_filter( 'camptix_html_message', __NAMESPACE__ . '\render_html_emails', 10, 2 ); 24 add_action( 'camptix_tshirt_report_intro', __NAMESPACE__ . '\tshirt_report_intro_message', 10, 3 ); 24 25 25 26 … … 396 397 return $html_message; 397 398 } 399 400 /** 401 * Extend the introduction message for each camp in the tshirt report 402 * 403 * @param string $message 404 * @param int $site_id 405 * @param array $sizes 406 * 407 * @return string 408 */ 409 function tshirt_report_intro_message( $message, $site_id, $sizes ) { 410 switch_to_blog( $site_id ); 411 412 $wordcamp = get_wordcamp_post(); 413 414 if ( ! empty( $wordcamp->meta['Number of Anticipated Attendees'][0] ) ) { 415 $message = sprintf( 416 "<p>This camp is expecting %d attendees.</p>", 417 $wordcamp->meta['Number of Anticipated Attendees'][0] 418 ); 419 } 420 421 restore_current_blog(); 422 return $message; 423 } -
sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/wp-cli-commands/miscellaneous.php
r4252 r4314 114 114 * wp wc-misc format-log "$(grep 'bar' /var/log/php-errors.log)" --foreign=ignore 115 115 * 116 * @todo Sometimes example passing entries as command line param fails because it passes the length limit. 117 * Add an example of a good workaround for that. 118 * 116 119 * @subcommand format-log 117 120 *
Note: See TracChangeset
for help on using the changeset viewer.