Skip to content

Commit

Permalink
Merge pull request #47 from brainstormforce/classic-editor-option-uns…
Browse files Browse the repository at this point in the history
…aved

Version 1.1.2
  • Loading branch information
Nikschavan authored Jan 12, 2021
2 parents d9989ac + 58b11b9 commit ebd295b
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 22 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/phpcs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: PHPCS check

on: pull_request

jobs:
phpcs:
name: PHPCS
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install dependencies
run: composer install --dev --prefer-dist --no-progress --no-suggest

- name: PHPCS check
uses: chekalsky/phpcs-action@v1
with:
enable_warnings: true
phpcs_bin_path: './vendor/bin/phpcs'
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
**Tags:** post, unlist posts, hide posts,
**Requires at least:** 4.4
**Tested up to:** 5.6
**Stable tag:** 1.1.1
**Stable tag:** 1.1.2
**License:** GPLv2 or later
**License URI:** http://www.gnu.org/licenses/gpl-2.0.html

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

## Changelog ##

### 1.1.2 ###
- Fix: Post metabox did not show the correct status if the post is unlisted or not in the classic editor.

### 1.1.1 ###
- Improvement: Added the WordPress 5.6 compatibilty.

Expand Down
2 changes: 1 addition & 1 deletion class-unlist-posts-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ function metabox_render( $post ) {

$checked = '';

if ( in_array( $post->ID, $hidden_posts, true ) ) {
if ( in_array( (int) $post->ID, $hidden_posts, true ) ) {
$checked = 'checked';
}

Expand Down
15 changes: 8 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
"wp-coding-standards/wpcs": "dev-master",
"phpcompatibility/phpcompatibility-wp": "*"
},
"require": {
}
"name": "brainstormforce/unlist-posts",
"description": "Unlist Posts from displaying anywhere on the site, only access the post with a direct link.",
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
"phpcompatibility/phpcompatibility-wp": "*",
"wp-coding-standards/wpcs": "^2"
},
"require": {}
}
10 changes: 0 additions & 10 deletions phpcs.ruleset.xml

This file was deleted.

5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Donate link: https://www.paypal.me/BrainstormForce
Tags: post, unlist posts, hide posts,
Requires at least: 4.4
Tested up to: 5.6
Stable tag: 1.1.1
Stable tag: 1.1.2
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

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

== Changelog ==

= 1.1.2 =
- Fix: Post metabox did not show the correct status if the post is unlisted or not in the classic editor.

= 1.1.1 =
- Improvement: Added the WordPress 5.6 compatibilty.

Expand Down
4 changes: 2 additions & 2 deletions unlist-posts.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Author URI: https://www.nikhilchavan.com/
* Text Domain: unlist-posts
* Domain Path: /languages
* Version: 1.1.1
* Version: 1.1.2
*
* @package Hide_Post
*/
Expand All @@ -16,6 +16,6 @@

define( 'UNLIST_POSTS_DIR', plugin_dir_path( __FILE__ ) );
define( 'UNLIST_POSTS_URI', plugins_url( '/', __FILE__ ) );
define( 'UNLIST_POSTS_VER', '1.1.1' );
define( 'UNLIST_POSTS_VER', '1.1.2' );

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

0 comments on commit ebd295b

Please sign in to comment.