Hope Ignites - Fusion Builder Container Restrictions
Locks specific Avada Fusion Builder containers for certain user roles. Containers with CSS class "nhq-locked" or "nhq-critical" will be restricted for users with the "affiliate_contributor" role.
by 637 Digital Solutions · github.com/hope-ignites/hope-ignites-fusion-restrictions · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/hope-ignites/hope-ignites-fusion-restrictions/archive/refs/heads/main.zipAvada Fusion Builder Container Restrictions Plugin
Version: 1.0.0
Requires: WordPress 5.5+, Avada Theme
Tested up to: WordPress 6.4
License: MIT
Description
This plugin restricts editing of specific Avada Fusion Builder containers based on user roles and CSS classes. It's designed for the Hope Ignites multisite network to prevent Affiliate Contributors from editing critical sections like headers, footers, and navigation while still allowing them to edit blog posts and event pages.
Features
- ✅ Lock containers by CSS class (
nhq-locked,nhq-critical) - ✅ Role-based restrictions (targets
affiliate_contributorrole) - ✅ Visual indicators (yellow borders, lock icons)
- ✅ Custom restriction messages
- ✅ Server-side validation prevents unauthorized saves
- ✅ Compatible with Fusion Builder backend and live editors
- ✅ Optimized for Multisite - Network activation with per-site settings
- ✅ Easy configuration via Settings page (per site or network overview)
Installation
Method 1: Manual Upload
- Download the plugin files
- Upload the entire
hope-ignites-fusion-restrictionsfolder to/wp-content/plugins/ - Network activate the plugin (for multisite) or activate on individual sites
- Go to Settings → Fusion Restrictions to configure
Method 2: ZIP Upload
- Zip the plugin folder:
zip -r hope-ignites-fusion-restrictions.zip hope-ignites-fusion-restrictions/ - Go to Plugins → Add New → Upload Plugin
- Choose the ZIP file and click Install Now
- Activate the plugin
File Structure
hope-ignites-fusion-restrictions/
├── hope-ignites-fusion-restrictions.php (Main plugin file)
├── assets/
│ └── fusion-restrictions.js (JavaScript for restrictions)
├── LICENSE (MIT License)
├── README.md (This file)
└── QUICK-START.md (Quick start guide)
How It Works
Step 1: Mark Containers as Locked
In Avada Fusion Builder, add one of these CSS classes to containers you want to lock:
Option A: Using Fusion Builder Interface
- Edit a page with Fusion Builder
- Click on a container's settings (gear icon)
- Go to Advanced → CSS Class
- Add:
nhq-lockedornhq-critical - Save the container
Option B: Using Code Editor Add the class to the shortcode:
[fusion_builder_container class="nhq-locked"]
...content...
[/fusion_builder_container]
Step 2: Assign User Roles
Users with the affiliate_contributor role will automatically have restrictions applied.
For Single Site:
- Go to PublishPress → Capabilities
- Click Add Role
- Name:
Affiliate Contributor - Copy capabilities from:
ContributororEditor - Customize permissions as needed
- Save
For Multisite Network:
- You can assign the role at the site level (site-specific users)
- Or assign users network-wide and give them the role per site
- The role needs to exist on each site where you want restrictions
- Consider creating the role on your primary site, then use a role management plugin to sync across sites
Step 3: Test the Restrictions
- Create a test page with a locked container
- Log in as a user with
affiliate_contributorrole - Edit the page - locked container should have:
- Yellow border with diagonal stripes
- Lock icon with message
- Hidden edit controls
- Disabled interactions
- Try to modify locked content and save
- Changes should be rejected with an error message
Configuration
Settings Page
Go to Settings → Fusion Restrictions to view:
- Current Status: Shows your role and if restrictions apply to you
- Restricted Roles: Currently set to
affiliate_contributor - Locked CSS Classes:
nhq-locked,nhq-critical - Contact Email: Email shown in lock messages (default: marketing@hopeignites.org)
- Instructions: Setup and testing guide
Customizing for Your Organization
Edit the main plugin file to customize:
Change Restricted Roles (Line 33):
private $restricted_roles = array( 'affiliate_contributor', 'another_role' );
Change Locked Classes (Line 38):
private $locked_classes = array( 'nhq-locked', 'nhq-critical', 'custom-class' );
Change Contact Email (Line 267):
Default is marketing@hopeignites.org, or change via Settings page.
Testing Checklist
✅ Pre-Test Setup
- [ ] Plugin activated on staging site
- [ ] Avada theme is active
- [ ] Created
affiliate_contributorrole (via PublishPress Capabilities) - [ ] Created test user with this role
✅ Test 1: Visual Indicators
- [ ] Login as admin
- [ ] Create test page with Fusion Builder
- [ ] Add container with CSS class
nhq-locked - [ ] Save page
- [ ] Login as affiliate_contributor
- [ ] Edit the page
- [ ] Verify locked container has:
- [ ] Yellow border
- [ ] Lock message
- [ ] Hidden edit controls
✅ Test 2: Edit Prevention
- [ ] As affiliate_contributor, try to click locked container
- [ ] Should show alert: "This section is managed by NHQ..."
- [ ] Edit controls should be hidden/disabled
- [ ] Try to save page anyway
- [ ] Confirm no changes were made to locked container
✅ Test 3: Server-Side Validation
- [ ] As affiliate_contributor, use browser inspector to bypass JavaScript
- [ ] Manually edit locked container content via inspector
- [ ] Try to save page
- [ ] Verify changes are rejected
- [ ] Old content should be restored
- [ ] Error message should appear
✅ Test 4: Non-Locked Content
- [ ] As affiliate_contributor, edit non-locked containers
- [ ] Make changes to regular content
- [ ] Save page
- [ ] Verify non-locked changes ARE saved successfully
✅ Test 5: Admin Access
- [ ] Login as Administrator
- [ ] Edit same page
- [ ] Verify NO restrictions apply
- [ ] Should be able to edit everything
- [ ] No lock icons or borders visible
✅ Test 6: Multiple Locked Classes
- [ ] Create container with
nhq-locked - [ ] Create another with
nhq-critical - [ ] Verify both are locked for affiliate_contributor
- [ ] Verify both allow editing for admin
Troubleshooting
Restrictions Not Applying
Problem: Affiliate Contributors can still edit locked containers
Solutions:
- Clear browser cache and hard refresh (Ctrl+Shift+R)
- Check user role is exactly
affiliate_contributor(case-sensitive) - Verify CSS class is exactly
nhq-lockedornhq-critical - Check JavaScript console for errors (F12 → Console)
- Ensure plugin is activated
JavaScript Not Loading
Problem: No visual indicators appear
Solutions:
- Check if
/assets/fusion-restrictions.jsfile exists - Verify file permissions (should be readable)
- Check browser console for 404 errors
- Try deactivating and reactivating plugin
Save Validation Not Working
Problem: Locked content can be modified and saved
Solutions:
- Check PHP error logs for issues
- Verify
save_posthook is firing - Ensure user role check is correct
- Test with debug mode: Add to wp-config.php:
define('WP_DEBUG', true); define('WP_DEBUG_LOG', true);
Containers Not Detected
Problem: Plugin doesn't recognize locked containers
Solutions:
- Verify Avada shortcode structure is correct
- Check CSS class has no typos
- Try rebuilding Fusion Builder cache (Avada → Options → Performance)
- Ensure content is saved as shortcodes, not HTML
Multisite Configuration
Network Activation (Recommended)
The plugin is optimized for network activation with per-site settings:
Benefits:
- ✅ One-click activation across all sites
- ✅ Automatic setup for new sites added to network
- ✅ Each site maintains independent settings
- ✅ Network admin overview of all sites
- ✅ Easy centralized management
How to Network Activate:
- Go to Network Admin → Plugins
- Click Network Activate on this plugin
- Default settings are automatically applied to all sites
- Each site admin can customize their settings
Network Admin Overview
Network administrators can view status across all sites:
- Go to Network Admin → Settings → Fusion Restrictions
- View:
- Total sites in network
- List of all sites with configuration links
- Default settings being applied
- Quick access to each site's settings
Per-Site Settings
Each site administrator can customize settings independently:
- Go to Site Admin → Settings → Fusion Restrictions
- Configure:
- Contact email (shown in lock messages)
- View current role restrictions
- See testing instructions
- Check restriction status
What's Site-Specific:
- ✅ Contact email address
- ✅ Restriction messages
- ✅ User role assignments (users can be site-specific)
- ✅ Locked container content
What's Consistent Across Sites:
- ✅ Restricted role name:
affiliate_contributor - ✅ Locked CSS classes:
nhq-locked,nhq-critical - ✅ Plugin functionality and behavior
Note: To change the restricted role or locked classes for all sites, edit the plugin code (lines 33 and 38 in main PHP file).
New Site Handling
When you add a new site to your network:
- Plugin automatically activates on the new site
- Default settings are applied automatically
- Site admin can customize immediately
- No manual configuration required
Testing in Multisite
Best Practice:
- Create a test site in your network
- Network activate on staging first
- Test with
affiliate_contributorrole on test site - Verify restrictions work as expected
- Then network activate on production
Per-Site Activation (Alternative)
You can also activate individually per site:
- Better for selective deployment
- Good for testing on specific sites
- Site admins can activate independently
- Settings still remain site-specific
Compatibility
Compatible With:
- ✅ WordPress 5.5+
- ✅ Avada 7.0+
- ✅ WordPress Multisite
- ✅ PublishPress Capabilities
- ✅ PublishPress Permissions Pro
- ✅ WP Activity Log
Not Compatible With:
- ❌ Gutenberg Block Editor (use Avada Fusion Builder)
- ❌ Classic Editor without Fusion Builder
- ❌ Page builders other than Fusion Builder
Support & Contact
For Hope Ignites Team:
- Primary Contact: Technology Services
- Email: technology@hopeignites.org
- Documentation: See project wiki
For Plugin Issues:
- Check WordPress debug logs
- Review browser console for JavaScript errors
- Contact 637 Digital Solutions via https://637digital.com
Changelog
Version 1.0.0 - March 2026
- Initial release
- Container locking by CSS class
- Role-based restrictions
- Visual indicators
- Server-side validation
- Settings page per site
- Optimized multisite support:
- Network activation with automatic setup
- Per-site independent settings
- Network admin overview page
- Automatic default setup for new sites
- Translation-ready with text domain loading
License
MIT License
Copyright (c) 2026 637 Digital Solutions
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Credits
Developed for Hope Ignites by 637 Digital Solutions. Based on Avada Fusion Builder architecture and WordPress plugin standards.
Last Updated: March 2026
Plugin URI: https://637digital.com
Author: 637 Digital Solutions