Skip to content

Commit ebd295b

Browse files
authored
Merge pull request #47 from brainstormforce/classic-editor-option-unsaved
Version 1.1.2
2 parents d9989ac + 58b11b9 commit ebd295b

7 files changed

+39
-22
lines changed

.github/workflows/phpcs.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: PHPCS check
2+
3+
on: pull_request
4+
5+
jobs:
6+
phpcs:
7+
name: PHPCS
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v2
12+
13+
- name: Install dependencies
14+
run: composer install --dev --prefer-dist --no-progress --no-suggest
15+
16+
- name: PHPCS check
17+
uses: chekalsky/phpcs-action@v1
18+
with:
19+
enable_warnings: true
20+
phpcs_bin_path: './vendor/bin/phpcs'

README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
**Tags:** post, unlist posts, hide posts,
55
**Requires at least:** 4.4
66
**Tested up to:** 5.6
7-
**Stable tag:** 1.1.1
7+
**Stable tag:** 1.1.2
88
**License:** GPLv2 or later
99
**License URI:** http://www.gnu.org/licenses/gpl-2.0.html
1010

@@ -37,6 +37,9 @@ Just select option "Unlist Post" in any post of any type and that post will be h
3737

3838
## Changelog ##
3939

40+
### 1.1.2 ###
41+
- Fix: Post metabox did not show the correct status if the post is unlisted or not in the classic editor.
42+
4043
### 1.1.1 ###
4144
- Improvement: Added the WordPress 5.6 compatibilty.
4245

class-unlist-posts-admin.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ function metabox_render( $post ) {
8383

8484
$checked = '';
8585

86-
if ( in_array( $post->ID, $hidden_posts, true ) ) {
86+
if ( in_array( (int) $post->ID, $hidden_posts, true ) ) {
8787
$checked = 'checked';
8888
}
8989

composer.json

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
{
2-
"require-dev": {
3-
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
4-
"wp-coding-standards/wpcs": "dev-master",
5-
"phpcompatibility/phpcompatibility-wp": "*"
6-
},
7-
"require": {
8-
}
2+
"name": "brainstormforce/unlist-posts",
3+
"description": "Unlist Posts from displaying anywhere on the site, only access the post with a direct link.",
4+
"require-dev": {
5+
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
6+
"phpcompatibility/phpcompatibility-wp": "*",
7+
"wp-coding-standards/wpcs": "^2"
8+
},
9+
"require": {}
910
}

phpcs.ruleset.xml

-10
This file was deleted.

readme.txt

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.me/BrainstormForce
44
Tags: post, unlist posts, hide posts,
55
Requires at least: 4.4
66
Tested up to: 5.6
7-
Stable tag: 1.1.1
7+
Stable tag: 1.1.2
88
License: GPLv2 or later
99
License URI: http://www.gnu.org/licenses/gpl-2.0.html
1010

@@ -37,6 +37,9 @@ Just select option "Unlist Post" in any post of any type and that post will be h
3737

3838
== Changelog ==
3939

40+
= 1.1.2 =
41+
- Fix: Post metabox did not show the correct status if the post is unlisted or not in the classic editor.
42+
4043
= 1.1.1 =
4144
- Improvement: Added the WordPress 5.6 compatibilty.
4245

unlist-posts.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Author URI: https://www.nikhilchavan.com/
88
* Text Domain: unlist-posts
99
* Domain Path: /languages
10-
* Version: 1.1.1
10+
* Version: 1.1.2
1111
*
1212
* @package Hide_Post
1313
*/
@@ -16,6 +16,6 @@
1616

1717
define( 'UNLIST_POSTS_DIR', plugin_dir_path( __FILE__ ) );
1818
define( 'UNLIST_POSTS_URI', plugins_url( '/', __FILE__ ) );
19-
define( 'UNLIST_POSTS_VER', '1.1.1' );
19+
define( 'UNLIST_POSTS_VER', '1.1.2' );
2020

2121
require_once UNLIST_POSTS_DIR . 'class-unlist-posts.php';

0 commit comments

Comments
 (0)