Proxymity
Contributors: lotgrafix
Tags: proxy, shortcode, embed, scraper, external-content
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Embed content from any external website with a shortcode. Fetch remote HTML directly or via proxy and extract elements by CSS selector or ID.
== Description ==
Proximity embeds content from any external website into WordPress with a simple shortcode, with no iframes needed. It fetches remote HTML directly or through an optional proxy, extracts a section by HTML ID, CSS class, or both, lets you review and edit the HTML, and styles it with a built-in custom CSS editor. Ideal for franchises, associations, schools, and multi-site networks that reuse central content without duplicate manual entry or editing source code.
== Features ==
🌐 Remote Content Fetching
– Public Website Ingestion: Fetch HTML content from any publicly accessible website endpoint.
– Optional Proxy Support: Enter the address of a proxy service if the source website blocks direct requests from your server.
– Test Connection: Check whether your server can reach the page directly, or through your proxy, before fetching.
– Manual & Scheduled Refresh: Fetch the latest HTML with one click, or let the plugin update it automatically every day, week, or month.
🎯 Targeted HTML Extraction
– ID & Class Selectors: Extract a section by HTML ID, CSS class, or both. With both, the class is searched inside the element with that ID. You can paste several classes at once.
– Clean HTML Output: Optionally removes classes, IDs, and inline styles from imported content, giving you a clean starting point. Scripts, iframes, and forms are always removed.
– Readable Markup: Extracted HTML is formatted with one tag per line and extra white space trimmed.
– Native Rendering: Renders extracted HTML inline without iframes or external dependencies.
✏️ Editing & Styling
– Editable HTML: Review and edit the extracted HTML before saving, for example to add your own classes and IDs.
– Custom CSS Editor: Style each shortcode with its own CSS, applied only to that embed so it never affects the rest of your site.
– Selector Helper: Add an empty CSS rule for every ID and class found in your HTML with one click, in the order they appear.
🧩 Shortcodes & Integration
– Named Shortcodes: Create as many shortcodes as you need, for example ``.
– Universal Shortcode Embedding: Place shortcodes in pages, posts, widgets, or theme templates.
== Important Notes ==
– Only fetch content from external websites that you own or have permission to access.
– Make sure the section you want has a unique CSS class or HTML ID for accurate extraction.
– Large external pages or slow proxy endpoints may take longer to fetch in the dashboard. Visitors are never affected, because the saved content is served from your database.
– Editing the saved HTML pauses auto-update for that shortcode, because an automatic update would overwrite your changes. Fetch the HTML again to reset it.
== Installation ==
1. Upload the plugin files to the `/wp-content/plugins/lotgrafix-proximity` directory, or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the ‘Plugins’ screen in WordPress.
3. Navigate to **LOT Grafix → Proximity** in your WordPress dashboard.
4. Click “New shortcode” and give it a name, using letters and numbers only.
5. Enter the page URL, then the HTML ID, CSS class, or both, of the section you want. Add a proxy address only if the source blocks direct requests.
6. Click “Fetch”, review or edit the HTML, add custom CSS if needed, and click “Save Changes”.
7. Paste the shortcode (for example ``) into your content.
== Frequently Asked Questions ==
= Does Proximity copy an entire website? =
No. It only extracts and embeds the specific section you define by HTML ID, CSS class, or both.
= Does the source website need to run on WordPress? =
No. Any publicly accessible website can serve as a content source.
= How do I find the ID or class of a section? =
Open the source page, press F12, click the Select element tool, and click the section you want. The highlighted line shows its ID and class. The plugin includes step-by-step instructions next to the fields.
= Can I style the imported content? =
Yes. Each shortcode has its own Custom CSS box that lets you style the extracted elements without altering the remote source site. The CSS applies only to that embed.
= How do I display the imported content? =
Create a shortcode in the dashboard and paste it, for example ``, inside any post, page, widget, or layout block.
= Can I create more than one shortcode? =
Yes. Each shortcode has its own name, source page, HTML, and CSS. You can switch between them with the list at the top of the dashboard, and delete the ones you no longer need.
= Can I add my own classes and IDs to the imported content? =
Yes. Fetch the HTML with “Sanitized HTML” checked to remove the source site’s classes and IDs, then edit the HTML, add your own, and style them in the Custom CSS box. The “Add IDs & classes” button creates an empty rule for each one to get you started.
= Does Proximity request the external website every time a visitor loads my page? =
No. The HTML is fetched only when an administrator clicks the Fetch button, or on the daily, weekly, or monthly schedule if auto-update is enabled. Visitors always receive the saved copy.
= What happens if the source website changes? =
Fetch the HTML again, or enable auto-update. If an automatic update fails, the last saved content keeps being displayed.
= Do I need a proxy? =
Proximity can fetch pages directly from your server. If the source website blocks requests from your hosting provider, enter the address of a proxy service in the plugin settings. Free public proxies can go offline without notice, so for reliable results consider your own proxy, such as a Cloudflare Worker.
== External services ==
This plugin includes the LOT Grafix dashboard, which connects to an external service to display the list of other LOT Grafix plugins. Proximity also connects to the external websites you choose to embed, optionally through a proxy provider.
= LOT Grafix Plugin List =
– Service: https://wp-plugins.lotgrafix.workers.dev (hosted on Cloudflare Workers, operated by LOT Grafix, Inc.)
– Purpose: retrieves the list of available LOT Grafix plugins shown on the LOT Grafix admin page.
– Data sent: no personal or user data is sent. As with any HTTP request, the server receives your site’s IP address and the standard WordPress User-Agent, which includes your site URL.
– When: only when an administrator opens the LOT Grafix admin page and the cached list (1 hour) has expired.
– Terms of Service: https://lotgrafix.com/terms-of-service/
– Privacy Policy: https://lotgrafix.com/privacy-policy/
– Hosting provider (Cloudflare) Terms: https://www.cloudflare.com/website-terms/
– Hosting provider (Cloudflare) Privacy: https://www.cloudflare.com/privacypolicy/
= External websites and optional proxy =
– Service: the website you choose to embed, fetched directly from your server by default. If you enter a proxy service address in the plugin settings, requests are routed through that service instead. No proxy is included or used by default.
– Purpose: retrieves the HTML of the external page you want to embed.
– Data sent: the target URL, plus your server’s IP address and the standard WordPress User-Agent. If you configure a proxy, the proxy also receives the target URL and your server’s IP address.
– When: when an administrator clicks “Fetch” or “Test connection”, and automatically on the daily, weekly, or monthly schedule if the administrator enables auto-update. Visitors never trigger a request.
– Terms and privacy: those of the website you embed and, if you use one, the proxy service you choose.
== Screenshots ==
1. Proximity dashboard with the shortcode list, page URL, and connection test.
2. Optional proxy address and ID and class selectors.
3. Extracted HTML editor, Custom CSS box, and auto-update options.
== Changelog ==
= 1.0.0 =
– Initial release.
– Remote HTML retrieval directly or through an optional proxy address, with a connection test.
– Multiple named shortcodes, for example .
– Section extraction by HTML ID, CSS class, or both.
– Optional sanitized HTML and readable, one-tag-per-line markup.
– Editable HTML and per-shortcode custom CSS, with a selector helper.
– Manual and scheduled (daily, weekly, or monthly) content refresh.
== Upgrade Notice ==
= 1.0.0 =
Initial stable release.


