Restricted Blocks Lite

Documentation of the Restricted Blocks Lite plugin for WordPress

Table of Contents

  1. Installation (Single Site)
  2. Installation (Multisite)
  3. Quick Start
  4. Restrictions Menu
  5. Options Menu
  6. Block Inspector
  7. Geolocation
  8. Credits
  9. FAQ

1) Installation (Single Site)

With this procedure, you will be able to install the Restricted Blocks plugin on your WordPress website.

  1. Visit the Plugins -> Add New menu
  2. Click on the Upload Plugin button and select the zip file you just downloaded
  3. Click on Install Now
  4. Click on Activate Plugin

2) Installation (Multisite)

This plugin supports both a Network Activation (the plugin will be activated on all the sites of your WordPress Network) and a Single Site Activation in a WordPress Network environment (the plugin will be activated on a single site of the network).

With this procedure, you will be able to perform a Network Activation:

  1. Visit the Plugins -> Add New menu
  2. Click on the Upload Plugin button and select the zip file you just downloaded
  3. Click on Install Now
  4. Click on Network Activate

With this procedure, you will be able to perform a Single Site Activation in a WordPress Network environment:

  1. Visit the specific site of the WordPress Network where you want to install the plugin
  2. Visit the Plugins menu
  3. Click on the Activate button

3) Quick Start

This section will guide you in the creation of a block restricted with a password.

  1. Install the plugin with the procedure described in the Installation (Single Site) or Installation (Multisite) section.
  2. Visit the Restricted Blocks -> Restrictions menu
  3. Enter the Name and the Description of the restriction
  4. Select the Password in the Type field
  5. Open the Password section of the menu and enter a password
  6. Click the Add Restriction button to save your changes
  7. Visit a post, page, or custom post type
  8. Click on a block
  9. Select the restriction you just created with the selector available in the Restriction section of the block inspector
  10. Update the post

After completing this procedure the block content will be replaced with a form that require the submission of a password.

Please note that the are multiple types of restrictions applicable to a block, for more information visit the Restrictions Menu section.

4) Restrictions Menu

The Restrictions menu should be used to create restrictions. You can assign the restrictions created with this menu to any block available in your posts.

Fixed

To create a restriction of type Fixed proceed as follows:

  1. Visit the Restricted Blocks -> Restrictions menu
  2. Enter the Name and the Description of the restriction
  3. Select Fixed in the Type field
  4. Click the Add Restrictions button to save your changes

Password

To create a restriction of type Password proceed as follows:

  1. Visit the Restricted Blocks -> Restrictions menu
  2. Enter the Name and the Description of the restriction
  3. Select Password in the Type field
  4. Open the Password section of the menu
  5. Enter password in the Password field
  6. Click the Add Restrictions button to save your changes

Device

To create a restriction of type Device proceed as follows:

  1. Visit the Restricted Blocks -> Restrictions menu
  2. Enter the Name and the Description of the restriction
  3. Select Device in the Type field
  4. Open the Device section of the menu
  5. With the Device control select whether to display the block with Desktop or Mobile devices
  6. Click the Add Restriction button to save your changes

Time Range

To create a restriction of type Time Range proceed as follows:

  1. Visit the Restricted Blocks -> Restrictions menu
  2. Enter the Name and the Description of the restriction
  3. Select Time Range in the Type field
  4. Open the Time Range section of the menu
  5. Enter the Start Date of the range
  6. Enter the End Date of the range
  7. Click the Add Restriction button to save your changes

Capability

To create a restriction of type Capability proceed as follows:

  1. Visit the Restricted Blocks -> Restrictions menu
  2. Enter the Name and the Description of the restriction
  3. Select Capability in the Type field
  4. Open the Capability section of the menu
  5. Enter one or more capabilities (one capability per line) in the Capabilities field
  6. Click the Add Restriction button to save your changes

IP Address

To create a restriction of type IP Address proceed as follows:

  1. Visit the Restricted Blocks -> Restriction menu
  2. Enter the Name and the Description of the restriction
  3. Select IP Address in the Type field
  4. Open the IP Address section of the menu
  5. Enter one or more capabilities (one capability per line) in the IP Address field
  6. Click the Add Restriction button to save your changes

To create a restriction of type Cookie proceed as follows:

  1. Visit the Restricted Blocks -> Restrictions menu
  2. Enter the Name and the Description of the restriction
  3. Select IP Address in the Type field
  4. Open the IP Address section of the menu
  5. Enter one or more capabilities (one capability per line) in the IP Address field
  6. Click the Add Restriction button to save your changes

HTTP Headers

To create a restriction of type HTTP Header proceed as follows:

  1. Visit the Restricted Blocks -> Restrictions menu
  2. Enter the Name and the Description of the restriction
  3. Select HTTP Header in the Type field
  4. Open the HTTP Header section of the menu
  5. Enter name of the HTTP header in the Header Name field
  6. Enter one or more HTTP header values (one value per line) in the HTTP Header Value field
  7. Click the Add Restriction button to save your changes

5) Options Menu

The Options menu includes 21 options that you can use to customize the style of the front-end elements, the settings of the geolocation service, and other advanced options.

For more information about a single option, hover the mouse over the question mark on the right side of the option. The plugin will display a tooltip with additional information.

7) Block Inspector

The plugin adds the Restriction control to the settings sidebar of all the blocks. Use this selector with one of the restrictions defined in the Restricted Blocks -> Restrictions menu.

8) Credits

This plugin makes use of the following resources:

9) FAQ

Which versions of PHP are supported?

 PHP 5.6 and later versions are supported.

Which versions of WordPress are supported?

 WordPress 5.0 and later versions are supported.