Table of Contents
- Installation (Single Site)
- Installation (Multisite)
- Quick Start
- Restrictions Menu
- Options Menu
- Block Inspector
- Geolocation
- Credits
- FAQ
1) Installation (Single Site)
With this procedure, you will be able to install the Restricted Blocks plugin on your WordPress website.
- Visit the Plugins -> Add New menu
- Click on the Upload Plugin button and select the zip file you just downloaded
- Click on Install Now
- 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:
- Visit the Plugins -> Add New menu
- Click on the Upload Plugin button and select the zip file you just downloaded
- Click on Install Now
- Click on Network Activate
With this procedure, you will be able to perform a Single Site Activation in a WordPress Network environment:
- Visit the specific site of the WordPress Network where you want to install the plugin
- Visit the Plugins menu
- Click on the Activate button
3) Quick Start
This section will guide you in the creation of a block restricted with a password.
- Install the plugin with the procedure described in the Installation (Single Site) or Installation (Multisite) section.
- Visit the Restricted Blocks -> Restrictions menu
- Enter the Name and the Description of the restriction
- Select the Password in the Type field
- Open the Password section of the menu and enter a password
- Click the Add Restriction button to save your changes
- Visit a post, page, or custom post type
- Click on a block
- Select the restriction you just created with the selector available in the Restriction section of the block inspector
- 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:
- Visit the Restricted Blocks -> Restrictions menu
- Enter the Name and the Description of the restriction
- Select Fixed in the Type field
- Click the Add Restrictions button to save your changes
Password
To create a restriction of type Password proceed as follows:
- Visit the Restricted Blocks -> Restrictions menu
- Enter the Name and the Description of the restriction
- Select Password in the Type field
- Open the Password section of the menu
- Enter password in the Password field
- Click the Add Restrictions button to save your changes
Device
To create a restriction of type Device proceed as follows:
- Visit the Restricted Blocks -> Restrictions menu
- Enter the Name and the Description of the restriction
- Select Device in the Type field
- Open the Device section of the menu
- With the Device control select whether to display the block with Desktop or Mobile devices
- Click the Add Restriction button to save your changes
Time Range
To create a restriction of type Time Range proceed as follows:
- Visit the Restricted Blocks -> Restrictions menu
- Enter the Name and the Description of the restriction
- Select Time Range in the Type field
- Open the Time Range section of the menu
- Enter the Start Date of the range
- Enter the End Date of the range
- Click the Add Restriction button to save your changes
Capability
To create a restriction of type Capability proceed as follows:
- Visit the Restricted Blocks -> Restrictions menu
- Enter the Name and the Description of the restriction
- Select Capability in the Type field
- Open the Capability section of the menu
- Enter one or more capabilities (one capability per line) in the Capabilities field
- Click the Add Restriction button to save your changes
IP Address
To create a restriction of type IP Address proceed as follows:
- Visit the Restricted Blocks -> Restriction menu
- Enter the Name and the Description of the restriction
- Select IP Address in the Type field
- Open the IP Address section of the menu
- Enter one or more capabilities (one capability per line) in the IP Address field
- Click the Add Restriction button to save your changes
Cookie
To create a restriction of type Cookie proceed as follows:
- Visit the Restricted Blocks -> Restrictions menu
- Enter the Name and the Description of the restriction
- Select IP Address in the Type field
- Open the IP Address section of the menu
- Enter one or more capabilities (one capability per line) in the IP Address field
- Click the Add Restriction button to save your changes
HTTP Headers
To create a restriction of type HTTP Header proceed as follows:
- Visit the Restricted Blocks -> Restrictions menu
- Enter the Name and the Description of the restriction
- Select HTTP Header in the Type field
- Open the HTTP Header section of the menu
- Enter name of the HTTP header in the Header Name field
- Enter one or more HTTP header values (one value per line) in the HTTP Header Value field
- 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:
- Select2 licensed under the MIT License
- Mobile Detect licensed under the MIT License
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.