Skip to content

Commit

Permalink
Version 3.4.3 (#1058)
Browse files Browse the repository at this point in the history
  • Loading branch information
kasparsd authored Mar 19, 2020
1 parent d3c596e commit 33dcfa8
Show file tree
Hide file tree
Showing 13 changed files with 1,653 additions and 639 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
/.vagrant/
/console.log
/phpcs.xml
/stream.zip
/stream-*.zip
npm-debug.log
package.lock

Expand Down
25 changes: 14 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
dist: xenial

language:
- php
- node_js
language: php

php:
- "5.6"
Expand All @@ -21,6 +19,12 @@ env:
- WP_VERSION=trunk WP_MULTISITE=0
- WP_VERSION=trunk WP_MULTISITE=1

jobs:
include:
- name: Release Package
php: "7.3"
env: WP_VERSION=latest WP_MULTISITE=0 WP_RELEASE=1

services:
- mysql

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

before_deploy:
- npm run build
- npm run release

deploy:
provider: releases
api_key:
secure: HheYiv6c8ipHzMZBTH7xcKrOwCllvJTtfiTffAPK6XubWe3Kudn6IJUv0p1gmRhWXxZ5ciJQ/sgiCRGTRm/bubHs4tS7JOmpmoTdkrXajTxyyDCKpxhtT43nie0vNF+pWqVu2yOjhDR4pwtWjpQdzEKOz0kn0XSMT+vGsKQD50w=
overwrite: true
skip_cleanup: true
file_glob: true
file: build/**/*
file:
- stream.zip
- stream-$TRAVIS_TAG.zip
on:
tags: true

# Pull requests are built by default.
branches:
only:
- master
- develop
condition: "$WP_RELEASE = 1"

notifications:
email: false
Expand Down
25 changes: 23 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-env node */
/* eslint-env node, es6 */

module.exports = function( grunt ) {
'use strict';
Expand Down Expand Up @@ -73,6 +73,25 @@ module.exports = function( grunt ) {
},
},

compress: {
release: {
options: {
archive: function() {
if ( process.env.TRAVIS_TAG ) {
return `stream-${process.env.TRAVIS_TAG}.zip`;
}

return 'stream.zip';
},
},
cwd: 'build',
dest: 'stream',
src: [
'**/*',
],
},
},

// Clean up the build
clean: {
build: {
Expand All @@ -97,11 +116,13 @@ module.exports = function( grunt ) {
grunt.loadNpmTasks( 'grunt-contrib-clean' );
grunt.loadNpmTasks( 'grunt-contrib-copy' );
grunt.loadNpmTasks( 'grunt-contrib-cssmin' );
grunt.loadNpmTasks( 'grunt-contrib-compress' );
grunt.loadNpmTasks( 'grunt-contrib-uglify' );
grunt.loadNpmTasks( 'grunt-wp-deploy' );

// Register tasks
grunt.registerTask( 'default', [ 'uglify', 'cssmin' ] );
grunt.registerTask( 'default', [ 'clean', 'uglify', 'cssmin' ] );
grunt.registerTask( 'build', [ 'default', 'copy' ] );
grunt.registerTask( 'release', [ 'build', 'compress' ] );
grunt.registerTask( 'deploy', [ 'build', 'wp_deploy', 'clean' ] );
};
82 changes: 37 additions & 45 deletions classes/class-list-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -718,55 +718,46 @@ public function filters_form() {
}

public function filter_select( $name, $title, $items, $ajax = false ) {
if ( $ajax ) {
$out = sprintf(
'<input type="hidden" name="%s" class="chosen-select" value="%s" data-placeholder="%s" />',
esc_attr( $name ),
esc_attr( wp_stream_filter_input( INPUT_GET, $name ) ),
esc_attr( $title )
$options = array( '<option value=""></option>' );
$selected = wp_stream_filter_input( INPUT_GET, $name );

foreach ( $items as $key => $item ) {
$value = isset( $item['children'] ) ? 'group-' . $key : $key;
$option_args = array(
'value' => $value,
'selected' => selected( $value, $selected, false ),
'disabled' => isset( $item['disabled'] ) ? $item['disabled'] : null,
'icon' => isset( $item['icon'] ) ? $item['icon'] : null,
'group' => isset( $item['children'] ) ? $key : null,
'tooltip' => isset( $item['tooltip'] ) ? $item['tooltip'] : null,
'class' => isset( $item['children'] ) ? 'level-1' : null,
'label' => isset( $item['label'] ) ? $item['label'] : null,
);
} else {
$options = array( '<option value=""></option>' );
$selected = wp_stream_filter_input( INPUT_GET, $name );

foreach ( $items as $key => $item ) {
$value = isset( $item['children'] ) ? 'group-' . $key : $key;
$option_args = array(
'value' => $value,
'selected' => selected( $value, $selected, false ),
'disabled' => isset( $item['disabled'] ) ? $item['disabled'] : null,
'icon' => isset( $item['icon'] ) ? $item['icon'] : null,
'group' => isset( $item['children'] ) ? $key : null,
'tooltip' => isset( $item['tooltip'] ) ? $item['tooltip'] : null,
'class' => isset( $item['children'] ) ? 'level-1' : null,
'label' => isset( $item['label'] ) ? $item['label'] : null,
);
$options[] = $this->filter_option( $option_args );

if ( isset( $item['children'] ) ) {
foreach ( $item['children'] as $child_value => $child_item ) {
$option_args = array(
'value' => $child_value,
'selected' => selected( $child_value, $selected, false ),
'disabled' => isset( $child_item['disabled'] ) ? $child_item['disabled'] : null,
'icon' => isset( $child_item['icon'] ) ? $child_item['icon'] : null,
'group' => $key,
'tooltip' => isset( $child_item['tooltip'] ) ? $child_item['tooltip'] : null,
'class' => 'level-2',
'label' => isset( $child_item['label'] ) ? '- ' . $child_item['label'] : null,
);
$options[] = $this->filter_option( $option_args );
}
$options[] = $this->filter_option( $option_args );

if ( isset( $item['children'] ) ) {
foreach ( $item['children'] as $child_value => $child_item ) {
$option_args = array(
'value' => $child_value,
'selected' => selected( $child_value, $selected, false ),
'disabled' => isset( $child_item['disabled'] ) ? $child_item['disabled'] : null,
'icon' => isset( $child_item['icon'] ) ? $child_item['icon'] : null,
'group' => $key,
'tooltip' => isset( $child_item['tooltip'] ) ? $child_item['tooltip'] : null,
'class' => 'level-2',
'label' => isset( $child_item['label'] ) ? '- ' . $child_item['label'] : null,
);
$options[] = $this->filter_option( $option_args );
}
}
$out = sprintf(
'<select name="%s" class="chosen-select" data-placeholder="%s">%s</select>',
esc_attr( $name ),
// translators: Placeholder refers to the title of the dropdown menu (e.g. "users")
sprintf( esc_attr__( 'Show all %s', 'stream' ), $title ),
implode( '', $options )
);
}
$out = sprintf(
'<select name="%s" class="chosen-select" data-placeholder="%s">%s</select>',
esc_attr( $name ),
// translators: Placeholder refers to the title of the dropdown menu (e.g. "users")
sprintf( esc_attr__( 'Show all %s', 'stream' ), $title ),
implode( '', $options )
);

return $out;
}
Expand Down Expand Up @@ -895,6 +886,7 @@ public function record_actions_form() {
}
echo '</select></div>';
wp_nonce_field( 'stream_record_actions_nonce', 'stream_record_actions_nonce' );
wp_nonce_field( 'stream_filters_user_search_nonce', 'stream_filters_user_search_nonce' );

printf( '<input type="hidden" name="page" value="%s">', esc_attr( wp_stream_filter_input( INPUT_GET, 'page' ) ) );
printf( '<input type="hidden" name="date_predefined" value="%s">', esc_attr( wp_stream_filter_input( INPUT_GET, 'date_predefined' ) ) );
Expand Down
2 changes: 1 addition & 1 deletion classes/class-plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Plugin {
*
* @const string
*/
const VERSION = '3.4.2';
const VERSION = '3.4.3';

/**
* WP-CLI command
Expand Down
Loading

0 comments on commit 33dcfa8

Please sign in to comment.