-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
272c9a4
commit cdde69d
Showing
34 changed files
with
2,510 additions
and
676 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/tests/ | ||
.editorconfig | ||
.gitignore | ||
.gitattributes | ||
.distignore | ||
.wordpress-org | ||
composer.json | ||
composer.lock | ||
code-of-conduct.md | ||
contributing.md | ||
phpstan.neon.dist | ||
package.json | ||
package-lock.json | ||
.wp-env.json | ||
*.sql | ||
*.tar.gz | ||
*.zip | ||
.git | ||
.github | ||
.travis.yml | ||
.DS_Store | ||
.wp-env.json | ||
Thumbs.db | ||
bin | ||
node_modules | ||
phpunit.xml | ||
phpunit.xml.dist | ||
phpstan.neon | ||
phpstan.neon.dist | ||
README.md | ||
tests | ||
cypress.config.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
# This file is for unifying the coding style for different editors and IDEs | ||
# editorconfig.org | ||
|
||
# WordPress Coding Standards | ||
# https://make.wordpress.org/core/handbook/coding-standards/ | ||
|
||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
indent_style = tab | ||
|
||
[*.yml] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[{*.txt,wp-config-sample.php}] | ||
end_of_line = crlf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Directories | ||
/.wordpress-org export-ignore | ||
/.github export-ignore | ||
# Files | ||
/.gitattributes export-ignore | ||
/.gitignore export-ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: "Coding Standards" | ||
on: | ||
workflow_dispatch: null | ||
permissions: | ||
contents: "write" | ||
pull-requests: "write" | ||
concurrency: | ||
group: "${{ github.workflow }}-${{ github.ref }}" | ||
cancel-in-progress: true | ||
jobs: | ||
fix: | ||
name: "Fix" | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: "Checkout repository" | ||
uses: "actions/checkout@v4" | ||
- name: "Install PHPCS" | ||
run: | | ||
composer require --no-plugins --dev wp-coding-standards/wpcs | ||
composer config --no-plugins allow-plugins.dealerdirect/phpcodesniffer-composer-installer true | ||
composer run post-install-cmd | ||
- name: "Fix violations" | ||
run: | | ||
# phpcbf exists with 1 on success | ||
vendor/bin/phpcbf --standard=WordPress-Core *.php includes/ || true | ||
# Complex errors need a second run | ||
vendor/bin/phpcbf --standard=WordPress-Core *.php includes/ || true | ||
- name: "Check difference to repository" | ||
id: "list_diff" | ||
run: | | ||
if ! git diff --exit-code; then | ||
echo "exit_status=1" >>"${GITHUB_OUTPUT}" | ||
fi | ||
- name: "Create pull request" | ||
if: "${{ steps.list_diff.outputs.exit_status == '1' }}" | ||
uses: "peter-evans/create-pull-request@v4" | ||
with: | ||
add-paths: | | ||
*.php | ||
branch: "cs-fixer" | ||
commit-message: "Fix CS" | ||
title: "Fix Coding Standards violations" | ||
body: | | ||
Automated changes by running `phpcbf`. | ||
delete-branch: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Plugin asset/readme update | ||
on: | ||
push: | ||
branches: | ||
- stable | ||
jobs: | ||
trunk: | ||
name: Push to trunk | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: WordPress.org plugin asset/readme update | ||
uses: 10up/action-wordpress-plugin-asset-update@stable | ||
env: | ||
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} | ||
SVN_USERNAME: ${{ secrets.SVN_USERNAME }} | ||
IGNORE_OTHER_FILES: true | ||
SLUG: archived-post-status |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: "Deploy to WordPress.org" | ||
on: | ||
push: | ||
tags: | ||
- "*" | ||
jobs: | ||
tag: | ||
name: "New tag" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "Checkout" | ||
uses: actions/checkout@master | ||
- name: "WordPress Plugin Deploy" | ||
uses: 10up/action-wordpress-plugin-deploy@stable | ||
env: | ||
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} | ||
SVN_USERNAME: ${{ secrets.SVN_USERNAME }} | ||
SLUG: archived-post-status |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: "Integrate" | ||
|
||
on: | ||
pull_request: null | ||
push: | ||
branches: | ||
- stable | ||
- develop | ||
|
||
jobs: | ||
syntax-check: | ||
name: "Syntax check on all PHP versions" | ||
runs-on: "ubuntu-latest" | ||
strategy: | ||
matrix: | ||
php: ['7.4', '8.0', '8.1', '8.2.' ] | ||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v3" | ||
- name: "Install PHP" | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
php-version: ${{ matrix.php }} | ||
- name: "PHP lint" | ||
run: "find *.php includes/ -type f -name '*.php' -print0 | xargs -0 -L1 -P4 -- php -l" | ||
|
||
coding-standard: | ||
name: "Check coding standard" | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v3" | ||
- name: "Install PHP" | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
php-version: "8.1" | ||
- name: "Install PHPCS" | ||
run: | | ||
composer require --no-plugins --dev wp-coding-standards/wpcs | ||
composer config --no-plugins allow-plugins.dealerdirect/phpcodesniffer-composer-installer true | ||
composer run post-install-cmd | ||
- name: "Run PHPCS" | ||
run: "vendor/bin/phpcs --standard=WordPress-Core *.php src/" | ||
|
||
static-analysis: | ||
name: "Run static analysis" | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v3" | ||
- name: "Install PHP" | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
php-version: "8.1" | ||
- name: "Install PHPStan" | ||
run: "composer require --dev szepeviktor/phpstan-wordpress" | ||
- name: "Run PHPStan" | ||
run: "vendor/bin/phpstan analyze" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.DS_Store | ||
Thumbs.db | ||
*.sql | ||
*.tar.gz | ||
*.zip | ||
node_modules | ||
dist | ||
vendor | ||
*.cache |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?xml version="1.0"?> | ||
<ruleset name="WordPress Coding Standards based custom ruleset for your plugin"> | ||
<description>Generally-applicable sniffs for WordPress plugins.</description> | ||
|
||
<!-- What to scan --> | ||
<file>.</file> | ||
<exclude-pattern>/vendor/</exclude-pattern> | ||
<exclude-pattern>/node_modules/</exclude-pattern> | ||
|
||
<!-- How to scan --> | ||
<!-- Usage instructions: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Usage --> | ||
<!-- Annotated ruleset: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml --> | ||
<arg value="sp"/> <!-- Show sniff and progress --> | ||
<arg name="basepath" value="./"/><!-- Strip the file paths down to the relevant bit --> | ||
<arg name="colors"/> | ||
<arg name="extensions" value="php"/> | ||
<arg name="parallel" value="8"/><!-- Enables parallel processing when available for faster results. --> | ||
|
||
<!-- Rules: Check PHP version compatibility --> | ||
<!-- https://github.com/PHPCompatibility/PHPCompatibility#sniffing-your-code-for-compatibility-with-specific-php-versions --> | ||
<config name="testVersion" value="5.3-"/> | ||
<!-- https://github.com/PHPCompatibility/PHPCompatibilityWP --> | ||
<rule ref="PHPCompatibilityWP"/> | ||
|
||
<!-- Rules: WordPress Coding Standards --> | ||
<!-- https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards --> | ||
<!-- https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki/Customizable-sniff-properties --> | ||
<config name="minimum_supported_wp_version" value="4.6"/> | ||
<rule ref="WordPress"> | ||
<exclude name="WordPress.VIP"/> | ||
</rule> | ||
<rule ref="WordPress.NamingConventions.PrefixAllGlobals"> | ||
<properties> | ||
<!-- Value: replace the function, class, and variable prefixes used. Separate multiple prefixes with a comma. --> | ||
<property name="prefixes" type="array" value="my-plugin"/> | ||
</properties> | ||
</rule> | ||
<rule ref="WordPress.WP.I18n"> | ||
<properties> | ||
<!-- Value: replace the text domain used. --> | ||
<property name="text_domain" type="array" value="my-plugin"/> | ||
</properties> | ||
</rule> | ||
<rule ref="WordPress.WhiteSpace.ControlStructureSpacing"> | ||
<properties> | ||
<property name="blank_line_check" value="true"/> | ||
</properties> | ||
</rule> | ||
</ruleset> |
This file was deleted.
Oops, something went wrong.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"config": { | ||
"WP_DEBUG": true, | ||
"WP_DEBUG_LOG": true | ||
}, | ||
"phpVersion": "8.2", | ||
"plugins": [ | ||
"." | ||
] | ||
} |
Oops, something went wrong.