Skip to content

Commit 29ad0f7

Browse files
authored
Merge pull request #1234 from xwp/release/3.7.0
Release 3.7.0
2 parents a8b5f46 + dea5ff4 commit 29ad0f7

20 files changed

+1981
-1874
lines changed

.travis.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ services:
6464
- docker
6565

6666
before_install:
67-
- docker-compose pull wordpress
67+
- echo "$DOCKER_TOKEN" | docker login -u "$DOCKER_USERNAME" --password-stdin
68+
- docker-compose pull
6869
- nvm install
6970
- nvm use
7071
# Lock to Composer version 1 for now.

alerts/class-alert-type-highlight.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,10 @@ public function save_fields( $alert ) {
217217
* @return array New list of classes.
218218
*/
219219
public function post_class( $classes, $record ) {
220-
if ( ! empty( $record->meta['wp_stream_alerts_triggered']['highlight']['highlight_color'] ) ) {
221-
$color = $record->meta['wp_stream_alerts_triggered']['highlight']['highlight_color'];
220+
$record = new Record( $record );
221+
$alerts_triggered = $record->get_meta( Alerts::ALERTS_TRIGGERED_META_KEY, true );
222+
if ( ! empty( $alerts_triggered[ $this->slug ]['highlight_color'] ) ) {
223+
$color = $alerts_triggered[ $this->slug ]['highlight_color'];
222224
}
223225

224226
if ( empty( $color ) || ! is_string( $color ) ) {

classes/class-alerts-list.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function __construct( $plugin ) {
5656
* @return array
5757
*/
5858
public function parse_request( $query_vars ) {
59-
$screen = get_current_screen();
59+
$screen = \get_current_screen();
6060
if ( 'edit-wp_stream_alerts' === $screen->id && Alerts::POST_TYPE === $query_vars['post_type'] && empty( $query_vars['post_status'] ) ) {
6161
$query_vars['post_status'] = array( 'wp_stream_enabled', 'wp_stream_disabled' );
6262
}

classes/class-log.php

+6-4
Original file line numberDiff line numberDiff line change
@@ -242,23 +242,25 @@ public function is_record_excluded( $connector, $context, $action, $user = null,
242242
* @return boolean
243243
*/
244244
public function record_matches_rules( $record, $exclude_rules ) {
245+
$matches_needed = count( $exclude_rules );
246+
$matches_found = 0;
245247
foreach ( $exclude_rules as $exclude_key => $exclude_value ) {
246-
if ( ! isset( $record[ $exclude_key ] ) ) {
248+
if ( ! isset( $record[ $exclude_key ] ) || is_null( $exclude_value ) ) {
247249
continue;
248250
}
249251

250252
if ( 'ip_address' === $exclude_key ) {
251253
$ip_addresses = explode( ',', $exclude_value );
252254

253255
if ( in_array( $record['ip_address'], $ip_addresses, true ) ) {
254-
return true;
256+
$matches_found++;
255257
}
256258
} elseif ( $record[ $exclude_key ] === $exclude_value ) {
257-
return true;
259+
$matches_found++;
258260
}
259261
}
260262

261-
return false;
263+
return $matches_found === $matches_needed;
262264
}
263265

264266
/**

classes/class-plugin.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class Plugin {
1818
*
1919
* @const string
2020
*/
21-
const VERSION = '3.6.2';
21+
const VERSION = '3.7.0';
2222

2323
/**
2424
* WP-CLI command

composer.json

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"wp-phpunit/wp-phpunit": "^5.4",
2525
"wpackagist-plugin/advanced-custom-fields": "5.8.12",
2626
"wpackagist-plugin/easy-digital-downloads": "^2.9.23",
27+
"wpackagist-plugin/jetpack": "^8.7",
2728
"wpackagist-plugin/user-switching": "^1.5.5",
2829
"wpsh/local": "^0.2.3"
2930
},

composer.lock

+69-44
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)