WP Manifestindependent plugin directory
manifest / multisite / next-instant-signup

NExT-Instant Signup

WordPress Multisite mu-plugin: ワークショップ参加者が確認メールなしで即時登録でき、ログイン情報をログインページに表示する

★ 0stars

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/atsushia/next-instant-signup/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.

NExT-Instant Signup (next-instant-signup.php)

注意: このプラグインはワークショップ・ハンズオン等、参加者が限られた一時的な環境専用です。 確認メールの無効化・即時アカウント作成・平文パスワードの画面表示など、通常の本番サイトには適さない設定を含みます。不特定多数がアクセスできる環境には絶対に使用しないでください。

WordPress Multisite 用の mu-plugin。ワークショップ参加者がサインアップフォームから登録すると、確認メールなしで即時アカウントを作成し、ログイン情報をログインページに表示する。

機能

  • 確認メール無効化 — wpmu_signup_user_notification / wpmu_signup_blog_notification フィルターで送信をスキップ
  • 即時アクティベート — after_signup_user / after_signup_site フックでサインアップ登録直後に wpmu_activate_signup() を呼び出す
  • サブサイト自動作成 — ユーザー登録後、ユーザー名と同名のサブサイトを自動生成してユーザーを管理者として追加
  • ログイン情報表示 — アクティベート後にログインページへリダイレクトし、ユーザー名とパスワードを表示

既知の注意点

wp_installing() 問題

wpmu_create_blog() による新サブサイト初期化中に wp_installing(true) が設定される。この状態で set_site_transient() を呼ぶと DB 書き込みがスキップされ、オブジェクトキャッシュのみに保存される。次リクエスト(wp-login.php)ではキャッシュが空で DB にも存在しないため認証情報が取得できない。

対処: set_site_transient() 呼び出し前に wp_installing(false) へ一時リセットし、保存後に元の状態に戻す。

output buffering 問題

output_buffering=0 の環境では get_header() が HTML を出力した時点でヘッダーが送信済みになり、その後の wp_safe_redirect() が失敗する。

対処: before_signup_header アクション(優先度 0)で ob_start() を開始し、リダイレクト直前に ob_end_clean() でバッファを破棄する。

deprecated notices(ブロックテーマ)

unitone 等のブロックテーマには header.php / footer.php がなく、wp-signup.php の get_header() / get_footer() が _deprecated_file() を呼び出して通知を出す。

対処: deprecated_file_trigger_error フィルターで wp-signup.php からのリクエスト時のみ通知を抑制する。

動作環境

  • WordPress Multisite(サブディレクトリ構成)
  • Local by Flywheel(ローカル開発環境)
  • ブロックテーマ(unitone)