Skip to content

Commit

Permalink
Merge release 1.8.3 into stable (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
stklcode authored Jul 17, 2021
2 parents 594d923 + 04167d9 commit 24f85c1
Show file tree
Hide file tree
Showing 24 changed files with 3,650 additions and 447 deletions.
6 changes: 5 additions & 1 deletion .distignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Directories
/.git
/.github
/.nyc_output
/.wordpress-org
/bin
/coverage
/node_modules
/tests
/vendor
Expand All @@ -13,11 +15,13 @@
/.gitattributes
/.gitignore
/.stylelintrc.json
/.travis.yml
/.sonarcloud.properties
/composer.json
/package.json
/package-lock.json
/composer.lock
/phpcs.xml
/phpunit.xml
/phpunit.coverage.xml
/phpunit.report.xml
/README.md
4 changes: 3 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
/.eslintrc.json export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.sonarcloud.properties export-ignore
/.stylelintrc.json export-ignore
/.travis.yml export-ignore
/composer.json export-ignore
/composer-php5.json export-ignore
/package.json export-ignore
Expand All @@ -24,4 +24,6 @@
/composer-php5.lock export-ignore
/phpcs.xml export-ignore
/phpunit.xml export-ignore
/phpunit.coverage.xml export-ignore
/phpunit.report.xml export-ignore
/README.md export-ignore
65 changes: 65 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Test
on: push
jobs:
unit:
runs-on: ubuntu-18.04
strategy:
matrix:
include:
- php: '5.6'
wordpress: '4.7'
composer: composer-php5.json
- php: '7.4'
wordpress: '5.5'
- php: '8.0'
wordpress: '5.8-RC4'
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{matrix.php}}
tools: composer
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Setup DB
run: sudo systemctl start mysql.service
- name: Install
env:
COMPOSER: ${{ matrix.composer }}
run: |
composer install --no-interaction --ignore-platform-req=php
npm ci
- name: Setup WP
run: bash bin/install-wp-tests.sh wordpress_test root root localhost "${{ matrix.wordpress }}"
- name: PHP unit tests
env:
COMPOSER: ${{ matrix.composer }}
run: composer test
- name: JS unit tests
run: npx nyc --reporter=text mocha tests/js/*.test.js
quality:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
tools: composer
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install
run: |
composer install --no-interaction
npm ci
- name: Code style checks for PHP, JS and CSS
run: composer lint-all
2 changes: 2 additions & 0 deletions .github/workflows/wordpress-plugin-asset-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: php-actions/composer@v5
with:
args: --ignore-platform-reqs
- name: WordPress.org plugin asset/readme update
uses: 10up/action-wordpress-plugin-asset-update@stable
env:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/wordpress-plugin-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: php-actions/composer@v5
with:
args: --ignore-platform-reqs
- name: WordPress Plugin Deploy
uses: 10up/action-wordpress-plugin-deploy@stable
env:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
.idea/
.nyc_output
coverage
css/*.min.css
js/*.min.js
js/*.min.js.map
phpunit.*.xml
vendor/
node_modules/
9 changes: 9 additions & 0 deletions .sonarcloud.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Path to sources.
sonar.sources=inc,js,css,statify.php
sonar.exclusions=**/*.min.css,**/*.min.js,**/*.js.map
#sonar.inclusions=

# Path to tests.
sonar.tests=tests
#sonar.test.exclusions=
#sonar.test.inclusions=
37 changes: 0 additions & 37 deletions .travis.yml

This file was deleted.

7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Changelog
All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/).

## 1.8.3
* Update documentation links (#204)
* Minor markup fix on settings page (#206)
* Dashboard widget is closeable again (#208) (#209)
* Fix static initialization on multisite with PHP 8 (#210, props @walterebert)
* Tested up to WordPress 5.8

## 1.8.2
* Minor adjustments for the dashboard widget (#197) (#199)
* Tested up to WordPress 5.7
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Statify

[![Version](https://img.shields.io/packagist/v/pluginkollektiv/statify.svg)](https://packagist.org/packages/pluginkollektiv/statify)
[![Build Status](https://travis-ci.org/pluginkollektiv/statify.svg?branch=travis-support-with-code-style-checks)](https://travis-ci.org/pluginkollektiv/statify)
[![Test](https://github.com/pluginkollektiv/statify/actions/workflows/tests.yml/badge.svg)](https://github.com/pluginkollektiv/statify/actions/workflows/tests.yml)

Visitor statistics for WordPress with focus on data protection, transparency and clarity. Perfect as a widget in your WordPress Dashboard.

Expand Down
5 changes: 4 additions & 1 deletion composer-php5.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"require": {
"php": "^5.2|^7|^8",
"npm-asset/chartist": "^0.11.4",
"npm-asset/chartist-plugin-tooltips-updated": "^0.1.3"
"npm-asset/chartist-plugin-tooltips-updated": "^0.1.4"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.7",
Expand Down Expand Up @@ -79,6 +79,9 @@
],
"test": [
"phpunit"
],
"test-js": [
"npx nyc --reporter=text mocha tests/js/*.test.js"
]
},
"extra": {
Expand Down
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"require": {
"php": "^5.2|^7|^8",
"npm-asset/chartist": "^0.11.4",
"npm-asset/chartist-plugin-tooltips-updated": "^0.1.3"
"npm-asset/chartist-plugin-tooltips-updated": "^0.1.4"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.7",
Expand Down Expand Up @@ -74,6 +74,9 @@
],
"test": [
"phpunit"
],
"test-js": [
"npx nyc --reporter=text mocha tests/js/*.test.js"
]
},
"extra": {
Expand Down
41 changes: 27 additions & 14 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions css/dashboard.css
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@
position: relative;
}

#statify_dashboard.closed .inside {
display: none;
}

#statify_dashboard .table {
padding-bottom: 12px;
}
Expand Down
2 changes: 1 addition & 1 deletion inc/class-statify-install.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static function init( $network_wide = false ) {
*
* @param int $site_id Site ID.
*/
public function init_site( $site_id ) {
public static function init_site( $site_id ) {

switch_to_blog( (int) $site_id );

Expand Down
2 changes: 1 addition & 1 deletion inc/class-statify-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public static function options_snippet() {
private static function show_snippet_option( $value, $label ) {
?>
<label>
<input name="statify[snippet]" type="radio" value="<?php echo esc_html( $value ); ?>>" <?php checked( Statify::$_options['snippet'], $value ); ?>>
<input name="statify[snippet]" type="radio" value="<?php echo esc_html( $value ); ?>" <?php checked( Statify::$_options['snippet'], $value ); ?>>
<?php echo esc_html( $label ); ?>
</label>
<?php
Expand Down
2 changes: 1 addition & 1 deletion inc/class-statify-uninstall.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public static function init() {
*
* @param int $site_id Site ID.
*/
public function init_site( $site_id ) {
public static function init_site( $site_id ) {

switch_to_blog( $site_id );

Expand Down
Loading

0 comments on commit 24f85c1

Please sign in to comment.