Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.5.5 - Update supported PHP and WP versions #81

Draft
wants to merge 20 commits into
base: stable
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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: 7 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,16 @@ insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab

[*.yml]
[*.{yml,yaml,json,js,css}]
indent_style = space
indent_size = 2

[*.md]
trim_trailing_whitespace = false

[{*.txt,wp-config-sample.php}]
end_of_line = crlf
[*.{txt,php}]
end_of_line = lf

[*.neon.dist]
indent_style = space
indent_size = 2
12 changes: 6 additions & 6 deletions .github/workflows/integrate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
runs-on: "ubuntu-latest"
strategy:
matrix:
php-versions: ['7.4', '8.0', '8.1', '8.2.']
php-versions: ['8.1', '8.2.', '8.3']
steps:
- name: "Checkout"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
Expand All @@ -28,11 +28,11 @@ jobs:
runs-on: "ubuntu-latest"
steps:
- name: "Checkout"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "8.1"
php-version: "8.2"
- name: "Install PHPCS"
run: |
composer require --no-plugins --dev wp-coding-standards/wpcs
Expand All @@ -46,11 +46,11 @@ jobs:
runs-on: "ubuntu-latest"
steps:
- name: "Checkout"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "8.1"
php-version: "8.2"
- name: "Install PHPStan"
run: "composer require --dev szepeviktor/phpstan-wordpress"
- name: "Run PHPStan"
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/vendor/
/node_modules/
.DS_Store
*.lock
2 changes: 1 addition & 1 deletion .wp-env.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"WP_DEBUG": true,
"WP_DEBUG_LOG": true
},
"phpVersion": "8.2",
"phpVersion": "8.3",
"plugins": [
"."
]
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.5.5
- Tested up to WordPress 6.7.1
- Tested up to PHP 8.3
- Bump minimum PHP to 8.1, lowest version being maintained.
- Bump minimum WordPress version to 5.9, aligning with minimum PHP support.
- Add composer support.
- Upgrade Github actions to `actions/checkout@v4`

## 0.5.4
- Tested up to WordPress 6.4.2.
- Bump minimum WordPress version to 5.3, aligning with minimum PHP support.
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ Disable Blog

[![WP compatibility](https://plugintests.com/plugins/wporg/disable-blog/wp-badge.svg)](https://plugintests.com/plugins/wporg/disable-blog/latest) [![PHP compatibility](https://plugintests.com/plugins/wporg/disable-blog/php-badge.svg)](https://plugintests.com/plugins/wporg/disable-blog/latest)

**Requires at least WordPress:** 5.3
**Tested up to WordPress:** 6.4.2
**Stable version:** 0.5.4
**Requires at least WordPress:** 5.9
**Tested up to WordPress:** 6.7.1
**Stable version:** 0.5.5
**License:** GPLv2 or later
**Requires PHP:** 7.4
**Tested up to PHP:** 8.2
**Requires PHP:** 8.1
**Tested up to PHP:** 8.3

All the power of WordPress, without a blog.

Expand Down
30 changes: 30 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "joshuanelson/disable-blog",
"description": "All the power of WordPress, without a blog.",
"type": "wordpress-plugin",
"license": "GPL-2.0+",
"homepage": "https://disable.blog",
"authors": [
{
"name": "Joshua Nelson",
"email": "[email protected]",
"homepage": "https://joshuadnelson.com"
}
],
"minimum-stability": "stable",
"prefer-stable": true,
"support": {
"issues": "https://github.com/joshuadavidnelson/disable-blog/issues/",
"forum": "https://wordpress.org/support/plugin/disable-blog/",
"source": "https://github.com/joshuadavidnelson/disable-blog/"
},
"require": {
"php": ">=8.1",
"composer/installers": "^2.0"
},
"config": {
"allow-plugins": {
"composer/installers": true
}
}
}
167 changes: 167 additions & 0 deletions composer.lock

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

4 changes: 2 additions & 2 deletions disable-blog.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* Plugin Name: Disable Blog
* Plugin URI: https://wordpress.org/plugins/disable-blog/
* Description: Go blog-less with WordPress. This plugin disables all blog-related functionality (by hiding, removing, and redirecting).
* Version: 0.5.4
* Version: 0.5.5
* Author: Joshua David Nelson
* Author URI: http://joshuadnelson.com
* License: GPL-2.0+
Expand Down Expand Up @@ -59,7 +59,7 @@ function deactivate_disable_blog() {
define( 'DWPB_DIR', __DIR__ );
define( 'DWPB_URL', plugins_url( '/', __FILE__ ) );
define( 'DWPB_PLUGIN_NAME', 'disable-blog' );
define( 'DWPB_VERSION', '0.5.4' );
define( 'DWPB_VERSION', '0.5.5' );

/**
* The core plugin class that is used to define everything.
Expand Down
7 changes: 1 addition & 6 deletions includes/class-disable-blog-activator.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,6 @@ private static function validate_request( $plugin ) {
* @return bool false if no caps, else true.
*/
private static function check_caps() {

if ( current_user_can( 'activate_plugins' ) ) {
return true;
}

return false;
return current_user_can( 'activate_plugins' );
}
}
Loading
Loading