Skip to content

Commit

Permalink
Fix PHP warning message that may appear on new installations
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Diego committed Aug 11, 2020
1 parent 7667d5a commit 9385e40
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions class-blockvisibility.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: Block Visibility
* Plugin URI: http://www.outermost.co/
* Description: Block-based visibility control for WordPress
* Version: 1.0.0
* Version: 1.0.1
* Requires at least: 5.4
* Requires PHP: 5.6
* Author: Nick Diego
Expand All @@ -23,7 +23,7 @@
exit;
}

define( 'BLOCK_VISIBILITY_VERSION', '1.0.0' );
define( 'BLOCK_VISIBILITY_VERSION', '1.0.1' );
define( 'BLOCK_VISIBILITY_PLUGIN_FILE', __FILE__ );
define( 'BLOCK_VISIBILITY_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
define( 'BLOCK_VISIBILITY_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
Expand Down
4 changes: 3 additions & 1 deletion includes/frontend/render-block.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
* @return boolean Is the block disabled or not
*/
function is_block_type_disabled( $settings, $block ) {
$disabled_blocks = $settings['disabled_blocks'];
$disabled_blocks = isset( $settings['disabled_blocks'] )
? $settings['disabled_blocks']
: false;

if ( ! $disabled_blocks ) {
return false;
Expand Down
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Tags: visibility, hide blocks, block editor, gutenberg
Requires at least: 5.4
Tested up to: 5.4
Requires PHP: 5.6
Stable tag: 1.0.0
Stable tag: 1.0.1
License: GPL-2.0
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -72,3 +72,6 @@ Since full site editing is still in the development phase, this plugin does not

= 1.0.0 =
* Initial Release

= 1.0.1 =
* Fix PHP warning message that may appear on new installations

0 comments on commit 9385e40

Please sign in to comment.