Skip to content

Commit 33dcfa8

Browse files
author
Kaspars Dambis
authored
Version 3.4.3 (#1058)
1 parent d3c596e commit 33dcfa8

13 files changed

+1653
-639
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
/.vagrant/
77
/console.log
88
/phpcs.xml
9+
/stream.zip
10+
/stream-*.zip
911
npm-debug.log
1012
package.lock
1113

.travis.yml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
dist: xenial
22

3-
language:
4-
- php
5-
- node_js
3+
language: php
64

75
php:
86
- "5.6"
@@ -21,6 +19,12 @@ env:
2119
- WP_VERSION=trunk WP_MULTISITE=0
2220
- WP_VERSION=trunk WP_MULTISITE=1
2321

22+
jobs:
23+
include:
24+
- name: Release Package
25+
php: "7.3"
26+
env: WP_VERSION=latest WP_MULTISITE=0 WP_RELEASE=1
27+
2428
services:
2529
- mysql
2630

@@ -38,22 +42,21 @@ after_script:
3842
- source $DEV_LIB_PATH/travis.after_script.sh
3943

4044
before_deploy:
41-
- npm run build
45+
- npm run release
4246

4347
deploy:
4448
provider: releases
49+
api_key:
50+
secure: HheYiv6c8ipHzMZBTH7xcKrOwCllvJTtfiTffAPK6XubWe3Kudn6IJUv0p1gmRhWXxZ5ciJQ/sgiCRGTRm/bubHs4tS7JOmpmoTdkrXajTxyyDCKpxhtT43nie0vNF+pWqVu2yOjhDR4pwtWjpQdzEKOz0kn0XSMT+vGsKQD50w=
4551
overwrite: true
4652
skip_cleanup: true
4753
file_glob: true
48-
file: build/**/*
54+
file:
55+
- stream.zip
56+
- stream-$TRAVIS_TAG.zip
4957
on:
5058
tags: true
51-
52-
# Pull requests are built by default.
53-
branches:
54-
only:
55-
- master
56-
- develop
59+
condition: "$WP_RELEASE = 1"
5760

5861
notifications:
5962
email: false

Gruntfile.js

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* eslint-env node */
1+
/* eslint-env node, es6 */
22

33
module.exports = function( grunt ) {
44
'use strict';
@@ -73,6 +73,25 @@ module.exports = function( grunt ) {
7373
},
7474
},
7575

76+
compress: {
77+
release: {
78+
options: {
79+
archive: function() {
80+
if ( process.env.TRAVIS_TAG ) {
81+
return `stream-${process.env.TRAVIS_TAG}.zip`;
82+
}
83+
84+
return 'stream.zip';
85+
},
86+
},
87+
cwd: 'build',
88+
dest: 'stream',
89+
src: [
90+
'**/*',
91+
],
92+
},
93+
},
94+
7695
// Clean up the build
7796
clean: {
7897
build: {
@@ -97,11 +116,13 @@ module.exports = function( grunt ) {
97116
grunt.loadNpmTasks( 'grunt-contrib-clean' );
98117
grunt.loadNpmTasks( 'grunt-contrib-copy' );
99118
grunt.loadNpmTasks( 'grunt-contrib-cssmin' );
119+
grunt.loadNpmTasks( 'grunt-contrib-compress' );
100120
grunt.loadNpmTasks( 'grunt-contrib-uglify' );
101121
grunt.loadNpmTasks( 'grunt-wp-deploy' );
102122

103123
// Register tasks
104-
grunt.registerTask( 'default', [ 'uglify', 'cssmin' ] );
124+
grunt.registerTask( 'default', [ 'clean', 'uglify', 'cssmin' ] );
105125
grunt.registerTask( 'build', [ 'default', 'copy' ] );
126+
grunt.registerTask( 'release', [ 'build', 'compress' ] );
106127
grunt.registerTask( 'deploy', [ 'build', 'wp_deploy', 'clean' ] );
107128
};

classes/class-list-table.php

Lines changed: 37 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -718,55 +718,46 @@ public function filters_form() {
718718
}
719719

720720
public function filter_select( $name, $title, $items, $ajax = false ) {
721-
if ( $ajax ) {
722-
$out = sprintf(
723-
'<input type="hidden" name="%s" class="chosen-select" value="%s" data-placeholder="%s" />',
724-
esc_attr( $name ),
725-
esc_attr( wp_stream_filter_input( INPUT_GET, $name ) ),
726-
esc_attr( $title )
721+
$options = array( '<option value=""></option>' );
722+
$selected = wp_stream_filter_input( INPUT_GET, $name );
723+
724+
foreach ( $items as $key => $item ) {
725+
$value = isset( $item['children'] ) ? 'group-' . $key : $key;
726+
$option_args = array(
727+
'value' => $value,
728+
'selected' => selected( $value, $selected, false ),
729+
'disabled' => isset( $item['disabled'] ) ? $item['disabled'] : null,
730+
'icon' => isset( $item['icon'] ) ? $item['icon'] : null,
731+
'group' => isset( $item['children'] ) ? $key : null,
732+
'tooltip' => isset( $item['tooltip'] ) ? $item['tooltip'] : null,
733+
'class' => isset( $item['children'] ) ? 'level-1' : null,
734+
'label' => isset( $item['label'] ) ? $item['label'] : null,
727735
);
728-
} else {
729-
$options = array( '<option value=""></option>' );
730-
$selected = wp_stream_filter_input( INPUT_GET, $name );
731-
732-
foreach ( $items as $key => $item ) {
733-
$value = isset( $item['children'] ) ? 'group-' . $key : $key;
734-
$option_args = array(
735-
'value' => $value,
736-
'selected' => selected( $value, $selected, false ),
737-
'disabled' => isset( $item['disabled'] ) ? $item['disabled'] : null,
738-
'icon' => isset( $item['icon'] ) ? $item['icon'] : null,
739-
'group' => isset( $item['children'] ) ? $key : null,
740-
'tooltip' => isset( $item['tooltip'] ) ? $item['tooltip'] : null,
741-
'class' => isset( $item['children'] ) ? 'level-1' : null,
742-
'label' => isset( $item['label'] ) ? $item['label'] : null,
743-
);
744-
$options[] = $this->filter_option( $option_args );
745-
746-
if ( isset( $item['children'] ) ) {
747-
foreach ( $item['children'] as $child_value => $child_item ) {
748-
$option_args = array(
749-
'value' => $child_value,
750-
'selected' => selected( $child_value, $selected, false ),
751-
'disabled' => isset( $child_item['disabled'] ) ? $child_item['disabled'] : null,
752-
'icon' => isset( $child_item['icon'] ) ? $child_item['icon'] : null,
753-
'group' => $key,
754-
'tooltip' => isset( $child_item['tooltip'] ) ? $child_item['tooltip'] : null,
755-
'class' => 'level-2',
756-
'label' => isset( $child_item['label'] ) ? '- ' . $child_item['label'] : null,
757-
);
758-
$options[] = $this->filter_option( $option_args );
759-
}
736+
$options[] = $this->filter_option( $option_args );
737+
738+
if ( isset( $item['children'] ) ) {
739+
foreach ( $item['children'] as $child_value => $child_item ) {
740+
$option_args = array(
741+
'value' => $child_value,
742+
'selected' => selected( $child_value, $selected, false ),
743+
'disabled' => isset( $child_item['disabled'] ) ? $child_item['disabled'] : null,
744+
'icon' => isset( $child_item['icon'] ) ? $child_item['icon'] : null,
745+
'group' => $key,
746+
'tooltip' => isset( $child_item['tooltip'] ) ? $child_item['tooltip'] : null,
747+
'class' => 'level-2',
748+
'label' => isset( $child_item['label'] ) ? '- ' . $child_item['label'] : null,
749+
);
750+
$options[] = $this->filter_option( $option_args );
760751
}
761752
}
762-
$out = sprintf(
763-
'<select name="%s" class="chosen-select" data-placeholder="%s">%s</select>',
764-
esc_attr( $name ),
765-
// translators: Placeholder refers to the title of the dropdown menu (e.g. "users")
766-
sprintf( esc_attr__( 'Show all %s', 'stream' ), $title ),
767-
implode( '', $options )
768-
);
769753
}
754+
$out = sprintf(
755+
'<select name="%s" class="chosen-select" data-placeholder="%s">%s</select>',
756+
esc_attr( $name ),
757+
// translators: Placeholder refers to the title of the dropdown menu (e.g. "users")
758+
sprintf( esc_attr__( 'Show all %s', 'stream' ), $title ),
759+
implode( '', $options )
760+
);
770761

771762
return $out;
772763
}
@@ -895,6 +886,7 @@ public function record_actions_form() {
895886
}
896887
echo '</select></div>';
897888
wp_nonce_field( 'stream_record_actions_nonce', 'stream_record_actions_nonce' );
889+
wp_nonce_field( 'stream_filters_user_search_nonce', 'stream_filters_user_search_nonce' );
898890

899891
printf( '<input type="hidden" name="page" value="%s">', esc_attr( wp_stream_filter_input( INPUT_GET, 'page' ) ) );
900892
printf( '<input type="hidden" name="date_predefined" value="%s">', esc_attr( wp_stream_filter_input( INPUT_GET, 'date_predefined' ) ) );

classes/class-plugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class Plugin {
99
*
1010
* @const string
1111
*/
12-
const VERSION = '3.4.2';
12+
const VERSION = '3.4.3';
1313

1414
/**
1515
* WP-CLI command

0 commit comments

Comments
 (0)