WP Manifestindependent plugin directory
manifest / content / pncr-agent-mode

PBCR Agent Mode

Lightweight WordPress plugin to generate clean, standalone property pages for agents — no theme branding, mobile-ready, and fully compliant with WordPress coding standards.

★ 0stars
v.1.1.0latest · 1 year ago

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/elpuas/pncr-agent-mode/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

PBCR Agent Mode Plugin

A WordPress plugin that enables a "Broker Mode" or "Agent Mode" feature for sharing property listings via unique URLs with minimal, unbranded views.

Purpose

This plugin allows agents to share specific properties without exposing the company's brand, layout, or global elements. The shared link loads only the property information in a neutral, minimal layout optimized for mobile and direct client interaction.

Features

  • Unbranded Property Views: Clean, minimal property display without theme branding
  • Mobile Optimized: Responsive design optimized for mobile devices
  • Secure Access: Properties must be published to be accessible
  • Interactive Copy Button: [agent_view_link_button] shortcode with clipboard functionality
  • Role-Based Access: Button only visible to authorized users
  • Independent Operation: Works independently from RealHomes theme templates

Installation

  1. Upload the plugin files to the /wp-content/plugins/pbcr-agent-mode/ directory
  2. Activate the plugin through the 'Plugins' screen in WordPress
  3. The plugin will automatically register its functionality

Usage

Generating Agent View Copy Buttons

Use the [agent_view_link_button] shortcode within any property post to display an interactive copy button:

[agent_view_link_button]

Or with a custom label:

[agent_view_link_button label="Share Property"]

Security Features

  • Login Required: Button only visible to logged-in users
  • Capability Check: Default requires edit_posts capability
  • Role Customization: Developers can modify required capability using filter

Developer Filter

Customize the required capability:

add_filter( 'pbcr_agent_button_capability', function( $capability ) {
    return 'manage_options'; // Only administrators
});

Button Functionality

  • One-Click Copy: Copies agent view URL to clipboard
  • Visual Feedback: Shows "Copied!" message for 2 seconds
  • Fallback Support: Works on older browsers
  • Error Handling: Displays appropriate messages if copy fails

Accessing Agent Views

Agent view URLs can be shared directly with clients. The URLs will display:

  • Property title
  • Featured image or gallery
  • Price (when implemented)
  • Location (when implemented)
  • Property description
  • Contact button

Technical Requirements

  • WordPress 5.0 or higher
  • PHP 8.0 or higher
  • RealHomes Theme 4.4.1 (for property data compatibility)

File Structure

pbcr-agent-mode/
├── pbcr-agent-mode.php          # Main plugin file
├── includes/
│   ├── Plugin.php               # Main plugin class
│   ├── Loader.php              # Component loader
│   ├── Shortcodes/
│   │   └── AgentViewLinkButton.php   # Copy button shortcode handler
│   ├── Views/
│   │   └── agent-template.php  # Agent view template
│   ├── css/
│   │   ├── agent-style.css     # Main plugin styles
│   │   └── agent-copy-btn.css  # Copy button styles
│   ├── js/
│   │   └── agent-copy-btn.js   # Clipboard functionality
│   └── Blocks/
│       └── AgentCopyButton.php # Gutenberg block support
├── logs/                       # Development logs
└── README.md                   # This file

Development

This plugin follows WordPress coding standards and uses modern development practices.

Prerequisites

  • PHP 8.2 or higher
  • Composer
  • WordPress 6.4 or higher

Setup

Install development dependencies:

composer install

Or using the provided Makefile:

make install

Code Quality

Run PHP CodeSniffer to check coding standards:

composer run lint

Automatically fix coding standards issues:

composer run lint-fix

Testing

Run the test suite:

composer run test

Run tests with coverage report:

composer run test-coverage

Development Workflow

  1. Code Standards: All code must follow WordPress Coding Standards
  2. Testing: Write tests for new functionality
  3. Documentation: Update relevant documentation
  4. Logging: Create log entries for significant changes in /logs/

Available Make Commands

  • make install - Install development dependencies
  • make lint - Run PHP CodeSniffer
  • make lint-fix - Fix coding standards automatically
  • make test - Run PHPUnit tests
  • make test-coverage - Run tests with coverage
  • make clean - Clean generated files
  • make check - Run all quality checks
  • make help - Show all available commands

Architecture

  • Object-oriented PHP structure with PSR-4 namespacing
  • Modern vanilla CSS with container queries
  • Scoped CSS classes (.agent-mode namespace)
  • Proper sanitization and escaping
  • Security best practices

License

GPL v2 or later

Changelog

1.0.0

  • Initial plugin scaffold
  • Basic agent view functionality
  • Shortcode implementation
  • Responsive CSS framework

For development guidelines and detailed documentation, see the /logs/ directory.

Releases

2 releases.

Tag
Published
v.1.1.0 latest
Aug 4, 2025 1 year ago
Jul 23, 2025 1 year ago

These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.