跳至主要內容
WordPress.org

Taiwan 正體中文

  • 佈景主題目錄
  • 外掛目錄
  • 最新消息
  • 技術支援
  • 關於我們
  • 團隊
  • 取得 WordPress
取得 WordPress
WordPress.org

Plugin Directory

FonX Delete User

  • 提交外掛
  • 我的最愛
  • 登入
  • 提交外掛
  • 我的最愛
  • 登入

FonX Delete User

由 Tabi Idris 開發
下載
  • 詳細資料
  • 使用者評論
  • 安裝方式
  • 開發資訊
技術支援

外掛說明

FonX Delete User turns account erasure into a controlled, reviewed process instead of a one-click auto-delete.

Most “delete my account” plugins force visitors into their own button or form. FonX Delete User takes the opposite approach: you keep the form you already have and the plugin quietly powers it in whichever way fits your site.

What makes it different

  • Bring-your-own-form — integrate any existing HTML form on your site with a CSS selector and data-fxldu-field mapping. The form you styled stays the form your visitors see; the plugin’s JavaScript attaches to it without blocking its own handler.
  • Config-only mode — toggle the plugin’s own markup off entirely. The shortcode or block still emits the per-site request token and configuration, so an existing form can drive submissions with nothing extra rendered.
  • Admin approval pipeline — nothing is deleted automatically. Every request waits in the admin queue for you to approve, reject, or delete it.
  • External API mode — instead of deleting inside WordPress, forward erasure submissions to your own endpoint for the external system to complete.
  • Audit logging — every request and outcome is recorded in the database or a file, with a built-in viewer.

Features

  • Dual deletion modes — store requests pending admin approval (wordpress_db) or forward submissions immediately to an external endpoint (external_api).
  • Form builder — add text, email, password, textarea, checkbox, select, and hidden fields with required toggles, placeholders, options, and validation regexes.
  • Flexible injection — the [fxldu_form] shortcode, a native Gutenberg block, or integration with an existing page form via CSS selector and data-* field mapping.
  • Email notifications — alert the administrator (or a custom admin email) about new requests, and acknowledge the requester by email with configurable subject/body and placeholders.
  • Security hardening — honeypot anti-bot field, per-site HMAC-compatible request tokens, per-IP rate limiting, capability-gated admin endpoints, prepared SQL, and fully escaped output.

Submission flow

  1. A visitor submits the form (shortcode, block, or an integrated existing form).
  2. The frontend checks the honeypot, validates required fields, and posts a JSON request containing a per-site token, the user email, and the collected fields.
  3. The request is stored with status pending (rate-limited per IP).
  4. The administrator is notified; the requester can also receive an acknowledgement email.
  5. On approval, the user is permanently deleted via wp_delete_user() (WordPress Database mode) or the request is marked approved for the external system (External API mode). On rejection, the request is marked rejected and no deletion happens.
  6. The requester is notified of the outcome.

Additional Information

This release addresses the points raised during the plugin review and hardens two runtime paths found while testing. Details of what changed and why:

  • Global prefix — every global identifier now uses the unique fxldu prefix instead of the generic du_ / delete_user_ names: option keys, database tables, transients, the REST namespace (fxldu/v1), action/filter names, nonces, admin menu slugs, the [fxldu_form] shortcode, the fxldu/form block, enqueue handles, JavaScript globals, and frontend CSS classes. PHP constants are FXLDU_* and the class namespace is Fxldu\. The text domain fonx-delete-user and the plugin folder name are unchanged.
  • Database cleanup — the admin list tables (Fields, Requests, Logs) and the REST listing endpoint no longer pass an empty argument list to $wpdb->prepare() when no filter or search is applied; in that case the static count query runs directly instead of emitting the “the query argument must have a placeholder” notice.
  • Existing-form integration — when the integration selector matches a non-form container (some themes wrap their form in a div that is matched instead of the <form> itself), field collection and email resolution now read the named inputs directly instead of throwing inside new FormData(). The window integration-guard is __fxlduIntegrationBound.
  • Script output — the frontend form configuration is no longer printed as raw inline <script> tags. The shortcode and block register the fxldu-frontend script through wp_enqueue_script() and inject the config object with wp_add_inline_script( 'fxldu-frontend', $js, 'before' ). The unused print_frontend_config() method was removed from the main plugin file, and no <script> or <style> strings remain in the plugin source.
  • Sanitization of custom headers — the admin live-test of the API connection now passes the custom headers through sanitize_textarea_field( wp_unslash( $_POST['api_headers'] ) ) before building the request, matching the sanitization applied when the headers are saved.
  • Contributors — the Contributors: header now uses the plugin owner’s WordPress.org username.
  • Log file location — file logging no longer writes to a hard-coded WP_CONTENT_DIR path. Logs now go to a plugin-specific subfolder under the uploads directory ({uploads}/fxldu/fxldu-logs.log), created with wp_mkdir_p(), and each line is appended with error_log( $line, 3, $log_path ).
  • External-request REST proxy — the /external-request route remains open for anonymous form submissions but is now hardened: it keeps the honeypot check and the per-site token verification, strips internal keys from the forwarded payload, fails closed with HTTP 403 unless External API mode is active, and is rate-limited per IP (its own transient counter so a normal submission still counts only once per endpoint leg).
  • Uninstall cleanup — the broad option_name LIKE query (which could delete options owned by other plugins sharing the old prefix) and a usermeta LIKE cleanup (the plugin writes no user meta) were removed. uninstall.php now deletes an explicit list of the 26 options owned by this plugin plus the three plugin-owned database tables.
  • Rate-limit filter — the fxldu_rate_limit filter documented in the FAQ is now actually applied. Both the /request and /external-request endpoints enforce their per-IP limit through a shared helper whose default is max( 1, Options::get_rate_limit() ) and which honors apply_filters( 'fxldu_rate_limit', $limit, $ip ).

螢幕擷圖

Settings — General: choose the deletion mode, security limits, and frontend messaging.
Settings — General: choose the deletion mode, security limits, and frontend messaging.
Settings — Integration: connect an existing form with a CSS selector and data-fxldu-field mapping.
Settings — Integration: connect an existing form with a CSS selector and data-fxldu-field mapping.
Settings — External API: configure the external endpoint, method, authentication, and header forwarding.
Settings — External API: configure the external endpoint, method, authentication, and header forwarding.
Custom Fields — define the fields visitors submit alongside their email.
Custom Fields — define the fields visitors submit alongside their email.
Frontend form — the account deletion form as visitors see it.
Frontend form — the account deletion form as visitors see it.
Delete Requests — review the queue and approve, reject, or delete each request.
Delete Requests — review the queue and approve, reject, or delete each request.
Audit Logs — lifecycle events recorded for every request.
Audit Logs — lifecycle events recorded for every request.
Settings — Email — admin alerts and the requester acknowledgement email.
Settings — Email — admin alerts and the requester acknowledgement email.
Log viewer — browse recorded log entries in the admin.
Log viewer — browse recorded log entries in the admin.

適用於區塊編輯器

這個外掛提供 1 個可供區塊編輯器使用的區塊。

  • Delete User Form Renders the configurable account deletion form.

安裝方式

  1. Upload the fonx-delete-user folder to /wp-content/plugins/.
  2. Activate the plugin through the Plugins screen.
  3. Activation creates three database tables — {prefix}fxldu_fields, {prefix}fxldu_requests, and {prefix}fxldu_logs — and seeds the default options.
  4. Configure it under FonX Delete User → Settings, then add fields under Fields.

常見問題集

How do I put the form on a page?

Use the [fxldu_form] shortcode anywhere in post content or a widget, or insert the Delete User Form block in the block editor. Both render server-side, so they always reflect your current fields and settings.

How do I use my own existing form instead of the plugin’s form?

Enable Integration under Settings, set the CSS selector for your form, and add data-fxldu-field attributes to the inputs you want mapped. Keep the shortcode or block on the same page (it supplies the request token and configuration) and, if you do not want the plugin’s form visible, uncheck Show Form in the Form settings tab — only the configuration script is emitted.

How is the user identified?

The plugin resolves the submitter by email. Add an email-type field to the form (or name a field user_email or email). Requests without a valid email are rejected.

What happens to the user’s account?

In WordPress Database mode the account is deleted only after an administrator approves the pending request. In External API mode the submission is forwarded to your endpoint immediately, and the external system is responsible for erasure.

How does the plugin stop spam?

A hidden honeypot field silently discards automated submissions, every request must carry a valid per-site token, and each IP is rate-limited (default 5 requests/hour). The limit is adjustable via the fxldu_rate_limit filter.

What emails does the plugin send?

The administrator receives a new-request alert (to the admin email configured in the Email settings tab, falling back to the site admin email). The requester can receive an acknowledgement email on submission and is notified on approval, rejection, and completion. Subject and body for the acknowledgement are configurable and support {{site_name}}, {{user_email}}, and {{request_id}}.

Is there an API?

Yes. POST /wp-json/fxldu/v1/request accepts deletion requests (public, token-verified). Administrators can use GET /wp-json/fxldu/v1/requests, POST /requests/{id}/approve, and POST /requests/{id}/reject.

使用者評論

這個外掛目前沒有任何使用者評論。

參與者及開發者

以下人員參與了開源軟體〈FonX Delete User〉的開發相關工作。

參與者
  • Tabi Idris

將〈FonX Delete User〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄。

變更記錄

1.1.0

  • Renamed every global prefix to the unique fxldu prefix to prevent conflicts with other plugins: option keys, database tables, transients, the REST namespace (fxldu/v1), action/filter names, nonces, the admin menu slugs, the [fxldu_form] shortcode, the fxldu/form block, enqueue handles, JavaScript globals, and frontend CSS classes.
  • PHP constants are now FXLDU_* and the class namespace is Fxldu\.
  • Fixed a “wpdb::prepare was called incorrectly” notice on the Fields, Requests, and Logs admin pages and on the REST listing endpoint when no filter or search is applied — count queries without placeholders no longer go through prepare().
  • Existing-form integration now tolerates a non-form container as the integration target (e.g. a theme wrapper div): field collection and email resolution read the named inputs directly instead of failing inside new FormData().

1.0.4

  • Frontend configuration is now output through the script loader (wp_add_inline_script) instead of raw inline script tags.
  • Custom API headers are sanitized before test-connection and outbound requests.
  • The external-request REST proxy is only active in External API mode and is rate-limited per IP.
  • Implemented the documented fxldu_rate_limit filter for adjusting the per-IP request limit.
  • File logs now write to the uploads directory (a plugin-specific subfolder) instead of wp-content.
  • Uninstall removes only this plugin’s own options, not any option whose name contains “fxldu_”.
  • Corrected the Contributors list to the plugin owner’s WordPress.org username.

1.0.3

  • Renamed the admin page title from “Deletion Requests” to “Delete Requests”.
  • Added a status filter dropdown (All Statuses / Pending / Completed / Rejected) with a Filter button to the requests list table.

1.0.2

  • External API submissions now record server-side and prefer the plugin’s own success message.
  • Added a Show Form option so the shortcode/block can emit configuration only (for existing-form integration).
  • Added an Email settings tab for the admin recipient and a configurable requester acknowledgement email.
  • Frontend success/error messages now always come from the General settings.

1.0.1

  • Fixed double rendering on the settings page.
  • Fixed stale JavaScript state on the settings page.
  • Improved external API request handling and success-message fallbacks.

1.0.0

  • Initial release: dual deletion modes, form builder, shortcode and block injection, existing-form integration, admin review pipeline, audit logging, email notifications, and guest-form security.

中繼資料

  • 版本 1.1.0
  • 最後更新 1 個月前
  • 啟用安裝數 少於 10 次
  • WordPress 版本需求 6.7 或更新版本
  • 已測試相容的 WordPress 版本 7.1.4
  • PHP 版本需求 8.2 或更新版本
  • 語言
    English (US)
  • 標籤:
    account deletiondelete userform builderGDPRuser management
  • 進階檢視

評分

這個項目尚無任何評論記錄。

撰寫評分

查看全部使用者評論

參與者

  • Tabi Idris

技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

檢視技術支援論壇

  • 關於我們
  • 最新消息
  • 主機代管
  • 隱私權
  • 展示網站
  • 佈景主題目錄
  • 外掛目錄
  • 區塊版面配置目錄
  • Learn
  • 技術支援
  • 開發者資源
  • WordPress.tv ↗
  • 共同參與
  • 活動
  • 贊助基金會 ↗
  • Swag ↗
  • WordPress.com ↗
  • Matt ↗
  • bbPress ↗
  • BuddyPress ↗
WordPress.org

Taiwan 正體中文

The WordPress® trademark is the intellectual property of the WordPress Foundation.

  • 查看我們的 X (之前的 Twitter) 帳號
  • 造訪我們的 Bluesky 帳號
  • 造訪我們的 Mastodon 帳號
  • 造訪我們的 Threads 帳號
  • 造訪我們的 Facebook 粉絲專頁
  • Visit our Instagram account
  • Visit our LinkedIn account
  • 造訪我們的 TikTok 帳號
  • Visit our YouTube channel
  • 造訪我們的 Tumblr 帳號
程式碼,如詩