Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
9cedd63
Merge pull request #103 from Automattic/release/0.10.0
GaryJones Aug 12, 2024
6f705c8
Deploy: Don't include .git/ directory
GaryJones Aug 12, 2024
9f27115
Merge pull request #106 from Automattic/feature/fix/git-directory-in-…
GaryJones Aug 12, 2024
b7af9af
CS: Run PHPCBF
GaryJones Aug 10, 2024
00f49be
CS: Add Rector with PHP 5.3 set
GaryJones Aug 10, 2024
e8007b2
CS: Rector with PHP 5.5 set
GaryJones Aug 10, 2024
3cee9b9
CS: Rector with PHP 7.0 set
GaryJones Aug 10, 2024
4b4c2a9
CS: Rector with PHP 7.1 set
GaryJones Aug 10, 2024
de2852f
CS: Rector with PHP 7.3 set
GaryJones Aug 10, 2024
ec14a43
CS: Rector with PHP 7.4 set
GaryJones Aug 10, 2024
4f71221
CS: Rector with TypeCoverage level 1
GaryJones Aug 10, 2024
9aaf2e2
CS: Rector with DeadCode level 1
GaryJones Aug 10, 2024
374da22
CS: Rector with DeadCode level 2
GaryJones Aug 10, 2024
3f64563
CS: Rector with DeadCode level 7
GaryJones Aug 10, 2024
d21774e
CS: Rector with DeadCode level 14
GaryJones Aug 10, 2024
fee1309
CS: Rector with DeadCode level 19
GaryJones Aug 10, 2024
04fccfd
CS: Rector with DeadCode level 21
GaryJones Aug 10, 2024
73a85b9
CS: Rector with DeadCode level 26
GaryJones Aug 10, 2024
b51a88e
CS: Rector with DeadCode level 40
GaryJones Aug 10, 2024
adbc67b
CS: Rector with DeadCode level 41
GaryJones Aug 10, 2024
15d87ed
CS: Rector with DeadCode level 44
GaryJones Aug 10, 2024
72d1c9e
CS: Rector with CodeQuality level 11
GaryJones Aug 10, 2024
4f72927
CS: Rector with CodeQuality level 13
GaryJones Aug 10, 2024
ad29cae
CS: Rector with CodeQuality level 18
GaryJones Aug 10, 2024
fcfc889
CS: Rector with CodeQuality level 22
GaryJones Aug 10, 2024
5950cda
CS: Rector with CodeQuality level 24
GaryJones Aug 10, 2024
7b7d1a4
CS: Rector with CodeQuality level 25
GaryJones Aug 10, 2024
49b49da
CS: Rector with CodeQuality level 29
GaryJones Aug 10, 2024
38676dd
CS: Rector with CodeQuality level 34
GaryJones Aug 10, 2024
c1340e7
CS: Rector with CodeQuality level 35
GaryJones Aug 10, 2024
4098dfd
CS: Rector with CodeQuality level 38
GaryJones Aug 10, 2024
41769bc
CS: Rector with CodeQuality level 39
GaryJones Aug 10, 2024
5c7b9bc
CS: Rector with CodeQuality level 48
GaryJones Aug 10, 2024
a731820
CS: Rector with CodeQuality level 51
GaryJones Aug 10, 2024
0c958de
CS: Rector with CodeQuality level 57
GaryJones Aug 10, 2024
1e46ade
CS: Rector with CodeQuality level 65
GaryJones Aug 12, 2024
ca92258
CS: Rector with CodeQuality level 70
GaryJones Aug 12, 2024
2ca2c1d
CS: Rector with CodingStyle
GaryJones Aug 14, 2024
97a353e
CS: Rector with CodingStyle
GaryJones Aug 14, 2024
91fdd5d
CS: Rector with CodingStyle
GaryJones Aug 14, 2024
a8d4a30
CS: Rector with CodingStyle
GaryJones Aug 14, 2024
b479dec
CS: Rector with back-compat later PHP rules
GaryJones Aug 14, 2024
32e2d8d
CS: Rector changes from merge conflict resolution
GaryJones Aug 14, 2024
d5f46c6
Merge pull request #107 from Automattic/feature/add-rector
GaryJones Aug 14, 2024
0b7e9d3
Merge tag '0.10.1' into develop
GaryJones Aug 15, 2024
9879b91
CS: Fix or ignore coding standards issues
GaryJones Aug 16, 2024
38f7792
CI: Enable Coding Standards checks
GaryJones Aug 16, 2024
5e51557
Merge pull request #112 from Automattic/feature/fix/cs
GaryJones Aug 16, 2024
e4826f2
Consolidate includes and lib directories
GaryJones Nov 23, 2024
7574b06
Extract Zoninator class
GaryJones Nov 23, 2024
6284745
Move and rename widget class file
GaryJones Nov 23, 2024
fd42738
Merge pull request #117 from Automattic/classes
GaryJones Nov 23, 2024
15ada44
Refactor root file
GaryJones Nov 23, 2024
8a724ce
Merge pull request #118 from Automattic/root-file
GaryJones Nov 23, 2024
7bff483
Fix rector config
GaryJones Nov 23, 2024
0d4f366
Merge pull request #119 from Automattic/rector-fix
GaryJones Nov 23, 2024
ee88d3d
Update GitHub action to install SVN before deploy to WordPress.org
raamdev Dec 4, 2024
7352d05
Merge pull request #120 from Automattic/update/deploy-action
raamdev Dec 4, 2024
3b1566c
ci: Add SVN installation step for integration tests
GaryJones Oct 2, 2025
53758fc
Merge pull request #123 from Automattic/fix/install-svn-for-integrati…
GaryJones Oct 2, 2025
ea5079e
fix: Address deprecation notices during tests
GaryJones Oct 2, 2025
45e63c4
Merge pull request #124 from Automattic/fix/deprecation-notices-durin…
GaryJones Oct 2, 2025
eb84c92
fix: Prevent exposure of content for password-protected posts
GaryJones Oct 2, 2025
028153b
Merge pull request #125 from Automattic/fix/3366837
GaryJones Oct 2, 2025
bd5f7cc
chore: Modernise i18n
GaryJones Oct 2, 2025
1f065d6
Merge pull request #126 from Automattic/fix/i18n
GaryJones Oct 2, 2025
81d2a7a
Version 0.10.2 changelog
GaryJones Oct 2, 2025
e3585df
Version 0.10.2 i18n
GaryJones Oct 2, 2025
6a42baa
Version 0.10.2
GaryJones Oct 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/cs-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ jobs:
xml-schema-file: ./vendor/phpunit/phpunit/phpunit.xsd

# Check the code-style consistency of the PHP files.
# - name: Check PHP code style
# continue-on-error: true
# run: vendor/bin/phpcs --report-full --report-checkstyle=./phpcs-report.xml
- name: Check PHP code style
continue-on-error: true
run: vendor/bin/phpcs --report-full --report-checkstyle=./phpcs-report.xml

# - name: Show PHPCS results in PR
# run: cs2pr ./phpcs-report.xml
- name: Show PHPCS results in PR
run: cs2pr ./phpcs-report.xml
6 changes: 6 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install SVN (Subversion)
run: |
sudo apt-get update
sudo apt-get install subversion

- name: Push to WordPress.org
uses: 10up/action-wordpress-plugin-deploy@stable
env:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/integrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ jobs:
- name: Start MySQL Service
run: sudo systemctl start mysql.service

# This is needed as the integration tests use SVN to download the WordPress core and test dependencies.
- name: Install SVN (Subversion)
run: |
sudo apt-get update
sudo apt-get install subversion

- name: Prepare environment for integration tests
run: composer prepare-ci ${{ matrix.wordpress }}

Expand Down
14 changes: 12 additions & 2 deletions .phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<file>.</file>
<!-- Ignoring Files and Folders:
https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#ignoring-files-and-folders -->
<exclude-pattern>/node_modules/</exclude-pattern>
<exclude-pattern>/vendor/</exclude-pattern>
<exclude-pattern>/tests/</exclude-pattern>

Expand Down Expand Up @@ -36,8 +37,17 @@
<!-- Rules: WordPress Coding Standards - see
https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards -->
<!-- WordPress-Extra includes WordPress-Core -->
<rule ref="WordPress-Extra"/>
<rule ref="WordPress-Docs"/>
<rule ref="WordPress-Extra">
<exclude name="Universal.Operators.DisallowShortTernary.Found"/>
</rule>
<rule ref="WordPress.Files.FileName.InvalidClassFileName">
<exclude-pattern>widget.zone-posts.php</exclude-pattern>
<exclude-pattern>zoninator.php</exclude-pattern>
</rule>
<rule ref="WordPress.Files.FileName.NotHyphenatedLowercase">
<exclude-pattern>widget.zone-posts.php</exclude-pattern>
</rule>
<!-- <rule ref="WordPress-Docs"/>-->
<!-- For help in understanding these custom sniff properties:
https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki/Customizable-sniff-properties -->
<config name="minimum_supported_wp_version" value="5.9"/>
Expand Down
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,25 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.10.2] - 2025-10-02

### Fixed

* fix: Prevent exposure of content for password-protected posts by @GaryJones in https://github.com/Automattic/zoninator/pull/125

### Maintenance

* Deploy: Don't include .git/ directory by @GaryJones in https://github.com/Automattic/zoninator/pull/106
* Add and apply Rector by @GaryJones in https://github.com/Automattic/zoninator/pull/107
* CS: Fix or ignore coding standards issues by @GaryJones in https://github.com/Automattic/zoninator/pull/112
* Consolidate classes by @GaryJones in https://github.com/Automattic/zoninator/pull/117
* Refactor root file by @GaryJones in https://github.com/Automattic/zoninator/pull/118
* Fix rector config by @GaryJones in https://github.com/Automattic/zoninator/pull/119
* Update GitHub action to install SVN before deploy to WordPress.org by @raamdev in https://github.com/Automattic/zoninator/pull/120
* ci: Add SVN installation step for integration tests by @GaryJones in https://github.com/Automattic/zoninator/pull/123
* fix: Address deprecation notices during tests by @GaryJones in https://github.com/Automattic/zoninator/pull/124
* chore: Modernise i18n by @GaryJones in https://github.com/Automattic/zoninator/pull/126

## [0.10.1] - 2024-08-15

### Fixed
Expand Down Expand Up @@ -103,6 +122,7 @@ This release has PHP 7.4 and WordPress 5.9 as the minimum supported versions.

* Initial Release!

[0.10.2]: https://github.com/automattic/zoninator/compare/0.10.1..0.10.2
[0.10.1]: https://github.com/automattic/zoninator/compare/0.10.0..0.10.1
[0.10.0]: https://github.com/automattic/zoninator/compare/0.9..0.10.0
[0.9]: https://github.com/automattic/zoninator/compare/0.8..0.9
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Zone Manager (Zoninator)

Stable tag: 0.10.1
Stable tag: 0.10.2
Requires at least: 5.9
Tested up to: 6.6
Requires PHP: 7.4
Expand Down
6 changes: 5 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"phpcompatibility/phpcompatibility-wp": "^2.1",
"phpunit/phpunit": "^9",
"wp-coding-standards/wpcs": "^3",
"yoast/phpunit-polyfills": "^1"
"yoast/phpunit-polyfills": "^1",
"rector/rector": "^1.2"
},
"scripts": {
"cbf": [
Expand All @@ -35,6 +36,9 @@
"cs": [
"@php ./vendor/bin/phpcs"
],
"i18n": [
"@php wp i18n make-pot . ./languages/zoninator.pot"
],
"lint": [
"@php ./vendor/php-parallel-lint/php-parallel-lint/parallel-lint . -e php --exclude vendor --exclude .git"
],
Expand Down
9 changes: 7 additions & 2 deletions functions.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound -- Yes, a prefix of z is too short, but fixing this is a breaking change.

function z_get_zoninator() {
global $zoninator;
Expand All @@ -7,6 +8,7 @@ function z_get_zoninator() {

/**
* Get a list of all zones
*
* @return array List of all zones
*/
function z_get_zones() {
Expand Down Expand Up @@ -68,10 +70,13 @@ function z_get_post_zones( $post_id = 0 ) {
}

function z_get_loop_post_id_or_default( $post_id = 0 ) {
if( ! $post_id ) {
if ( ! $post_id ) {
global $post;
if( $post && isset( $post->ID ) ) $post_id = $post->ID;
if ( $post && isset( $post->ID ) ) {
$post_id = $post->ID;
}
}

return $post_id;
}

Expand Down
Binary file removed language/zoninator-he_IL.mo
Binary file not shown.
222 changes: 0 additions & 222 deletions language/zoninator-he_IL.po

This file was deleted.

Loading