block-visibility

Conditional visibility controls for all WordPress blocks.

GPL-2.0 License

Stars
118

Bot releases are visible (Hide)

block-visibility - Version 1.5.2

Published by ndiego over 3 years ago

Added

  • Added a support and review nudge on the plugin settings page in hopefully the least annoying way possible. 😉
  • New screenshots and readme updates.

Fixed

  • Fixed bug were visibility settings were still displaying for blocks disabled by the Block Manager.
  • Fixed conditional indicators not displaying for extra large and extra small screen size controls.
block-visibility - Version 1.5.1

Published by ndiego over 3 years ago

Added

  • Added plugin setting so users can toggle whether plugin-specific notices are displayed in the editor. Some power users may want to disable these notices.

Fixed

  • Fixed error where plugin settings were not being fetched from the REST api as expected. This issue impacted websites that had WordPress installed in a subdirectory. (Thanks @elenasaygo for discovering this issue and opening a support ticket!)
  • Fixed logic in the get_current_user_role() so no errors are thrown when WordPress installed in a subdirectory.
  • Fixed minor styling issues in the editor when the user changes the admin color scheme.
block-visibility - Version 1.5.0

Published by ndiego over 3 years ago

Added

  • Screen Size controls allow you to show or hide blocks based on the width of the screen (Desktop, Tablet, Mobile and more).
  • Added universal function for retrieving plugin settings.

Changed

  • Minor adjustments to settings layout and styles.
  • All documentation links have been updated to reflect website changes.

Removed

  • Removed legacy visibility controls in REST API settings class.

Fixed

  • Fixed error where scheduling controls were still active on the frontend when disabled in the plugin settings.
block-visibility - Version 1.4.3

Published by ndiego over 3 years ago

Fixed

  • Error that occurred when plugin assets were enqueued on incorrect admin pages. Improved logic now dequeues assets on any admin page without the Block Editor. Thanks @gsarig for catching this!
block-visibility - Version 1.4.2

Published by ndiego over 3 years ago

Fixed

  • Error that occurred when the plugin was deleted.
  • Contextual indicator border not displaying on placeholder blocks (e.g. the Shortcode Block)
block-visibility - Version 1.4.1

Published by ndiego almost 4 years ago

Added

  • The ability to disabled scheduling at the block level without having to remove the start and end date/times.
  • The blockVisibility "supports" variable to all blocks types that have visibility enabled. This provide a more consistent method for detecting whether a block should have visibility controls or not.

Changed

  • The contextual indicator icons have been updated and are now more legible.
  • Refactored the scheduling controls.
  • Updated the Visibility by Role labels to be more consistent with standard WordPress labeling and nomenclature.

Deprecated

  • The startDateTime and endDateTime properties of the blockVisibility attribute have been deprecated. All new blocks will use the new scheduling property.

Removed

  • Visibility block attribute defaults in an effort to declutter block markup when only a few settings are enabled.

Fixed

  • Some third-party blocks were not receiving visibility controls when they should have, notably Jetpack blocks, due to the way their block JS is enqueued.
block-visibility - Version 1.4.0

Published by ndiego almost 4 years ago

Upgrade Warning

For the long-term maintainability of the Block Visibility plugin, changes to the underlying file structure were needed in version 1.4.0. Therefore, when you upgrade from version 1.3.0 or lower, the plugin will deactivate and you will receive an error message. But don't worry, simply re-activate Block Visibility and you are good to go.

This is an unfortunate issue that will occur only once. We apologize for any inconvenience that this causes, but trust that this change better positions the plugin for many exciting enhancements in the future!

Added

  • Preliminary compatibility with Full Site Editing (Requires the Gutenberg plugin and a theme that is Full Site Editing compatible)
  • Hooks and slots to support the upcoming Pro add-on

Changed

  • Block Visibility now requires WordPress 5.5+ to take advantage of new core functionality
  • The base plugin file is now simply block-visibility.php and the setup class has been moved
  • Redesigned the Block Visibility settings page
  • Refactored the methods for fetching plugin setting and variable data on the Block Visibility settings page

Removed

  • Component styling that is not longer needed since the version requirement for the plugin is now WordPress 5.5+
block-visibility - Version 1.3.0

Published by ndiego almost 4 years ago

Added

  • User permissions now give website administrators control over who can use visibility settings
  • Custom REST API routes for retrieving plugin data

Changed

  • By default, visibility controls are now available to all users that have access to the Block Editor
  • Refactored the methods for fetching plugin setting and variable data in the Block Editor
  • Restructured much of the plugin with a more consistent file/folder layout

Fixed

  • Contextual indicator icon was incorrect when using all visibility controls and the block was disabled
block-visibility - Version 1.2.0

Published by ndiego almost 4 years ago

Added

  • Added the ability to "hide on selected roles" in the Restrict by User Roles visibility control (Thanks to @edwardsh for the feature request!)
block-visibility - Version 1.1.0

Published by ndiego almost 4 years ago

Added

  • Date and time controls for block scheduling
  • Contextual indicators for visibility setting to the Block Editor
  • A toolbar option for quickly hiding blocks
  • Additional plugin settings to dynamically control all the new features
block-visibility - Version 1.0.1

Published by ndiego about 4 years ago

Fixed

  • Addressed PHP warning message that may appear on new installations
block-visibility - Version 1.0.0

Published by ndiego about 4 years ago

Initial Release