Skip to content

Commit 72c2ef2

Browse files
authored
Merge pull request #71 from Automattic/release/0.3.2
2 parents d2723be + 39f3376 commit 72c2ef2

File tree

10 files changed

+32
-10
lines changed

10 files changed

+32
-10
lines changed

.distignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@
99
/package.json
1010
/package-lock.json
1111
/phpunit.xml.dist
12+
/rector.php
1213
/tests

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
/.phpcs.xml.dist export-ignore
1414
/CHANGELOG.md export-ignore
1515
/phpunit.xml.dist export-ignore
16+
/rector.php export-ignore
1617

1718
# Auto detect text files and perform LF normalization
1819
# https://pablorsk.medium.com/be-a-git-ninja-the-gitattributes-file-e58c07c9e915

.github/workflows/integrations.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@ jobs:
6868
- name: Start MySQL Service
6969
run: sudo systemctl start mysql.service
7070

71+
- name: Install Subversion
72+
run: |
73+
sudo apt-get update
74+
sudo apt-get install subversion
75+
7176
- name: Prepare environment for integration tests
7277
run: composer prepare ${{ matrix.wordpress }}
7378

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.3.2] - 2025-01-27
9+
10+
### Fixed
11+
* Don't load template twice by @cfaria in https://github.com/Automattic/maintenance-mode-wp/pull/70
12+
13+
### Maintenance
14+
* Fix typos by @szepeviktor in https://github.com/Automattic/maintenance-mode-wp/pull/67
15+
* Add Rector and rector command by @GaryJones in https://github.com/Automattic/maintenance-mode-wp/pull/68
16+
* CI: Install subversion by @GaryJones in https://github.com/Automattic/maintenance-mode-wp/pull/69
17+
818
## [0.3.1] - 2024-12-14
919

1020
### Maintenance
@@ -93,6 +103,7 @@ Predominantly a maintenance release, though it does include a couple of added ch
93103
## 0.1.0 - 2017-02-16
94104
- Initial release.
95105

106+
[0.3.2]: https://github.com/automattic/maintenance-mode-wp/compare/0.3.1...0.3.2
96107
[0.3.1]: https://github.com/automattic/maintenance-mode-wp/compare/0.3.0...0.3.1
97108
[0.3.0]: https://github.com/automattic/maintenance-mode-wp/compare/0.2.2...0.3.0
98109
[0.2.2]: https://github.com/automattic/maintenance-mode-wp/compare/0.2.1...0.2.2

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Maintenance Mode
22

3-
Stable tag: 0.3.1
3+
Stable tag: 0.3.2
44
Requires at least: 5.9
55
Tested up to: 6.7
66
License: GPLv2 or later

composer.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"php-parallel-lint/php-parallel-lint": "^1.0",
2020
"phpcompatibility/phpcompatibility-wp": "^2.1",
2121
"phpunit/phpunit": "^9",
22+
"rector/rector": "^1",
2223
"wp-coding-standards/wpcs": "^3",
2324
"yoast/phpunit-polyfills": "^1.1"
2425
},
@@ -38,6 +39,9 @@
3839
"prepare": [
3940
"bash bin/install-wp-tests.sh wordpress_test root root localhost"
4041
],
42+
"rector": [
43+
"@php ./vendor/bin/rector"
44+
],
4145
"test": [
4246
"@php ./vendor/bin/phpunit --testsuite WP_Tests"
4347
],

maintenance-mode.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Plugin Name: Maintenance Mode
1212
* Plugin URI: https://github.com/Automattic/maintenance-mode-wp
1313
* Description: Shut down your site for a little while and do some maintenance on it!
14-
* Version: 0.3.1
14+
* Version: 0.3.2
1515
* Requires at least: 5.9
1616
* Requires PHP: 7.4
1717
* Author: WordPress VIP, Automattic
@@ -120,7 +120,7 @@ function vip_maintenance_mode_template_redirect(): void {
120120
*/
121121
$defaults = apply_filters( 'vip_maintenance_mode_template_args', $defaults );
122122

123-
if ( ! get_template_part( $defaults['slug'], $defaults['name'], $defaults['args'] ) ) {
123+
if ( false === get_template_part( $defaults['slug'], $defaults['name'], $defaults['args'] ) ) {
124124
include __DIR__ . '/template-maintenance-mode.php';
125125
}
126126

@@ -146,8 +146,8 @@ function vip_maintenance_mode_restrict_rest_api( $result ) {
146146
return $result;
147147
}
148148

149-
$error_message = apply_filters( 'vip_maintenance_mode_rest_api_error_message', __( 'REST API access is currently restricted while this site is undergoing maintenance.', 'maintenance-mode' ) );
150-
$maintenace_rest_error = new WP_Error(
149+
$error_message = apply_filters( 'vip_maintenance_mode_rest_api_error_message', __( 'REST API access is currently restricted while this site is undergoing maintenance.', 'maintenance-mode' ) );
150+
$maintenance_rest_error = new WP_Error(
151151
'vip_maintenance_mode_rest_error',
152152
$error_message,
153153
array(
@@ -156,11 +156,11 @@ function vip_maintenance_mode_restrict_rest_api( $result ) {
156156
);
157157

158158
if ( ! is_user_logged_in() ) {
159-
return $maintenace_rest_error;
159+
return $maintenance_rest_error;
160160
}
161161

162162
if ( ! vip_maintenance_mode_current_user_can_bypass() ) {
163-
return $maintenace_rest_error;
163+
return $maintenance_rest_error;
164164
}
165165

166166
return $result;

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "maintenance-mode-wp",
3-
"version": "0.3.1",
3+
"version": "0.3.2",
44
"description": "Shut down your site for a little while and do some maintenance on it!",
55
"license": "GPL-2.0-or-later",
66
"private": true,

vipgo-helper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* This function sets the filter response that Maintenance Mode uses to determine if it should set the 503 status header or not.
1818
*
1919
* @param bool $should_set_503 Whether Maintenance Mode should set a 503 header.
20-
* @return bool Indiciate whether a Maintenance Mode sets a 503 header.
20+
* @return bool Indicate whether a Maintenance Mode sets a 503 header.
2121
*/
2222
function vip_maintenance_mode_do_not_respond_503_for_services( $should_set_503 ): bool {
2323
$user_agent = filter_input( INPUT_SERVER, 'HTTP_USER_AGENT', FILTER_SANITIZE_SPECIAL_CHARS );

0 commit comments

Comments
 (0)