スキル一覧に戻る
dreamworks2050

wordpress-hook-generator

by dreamworks2050

RetroLogin WordPress plugin - A retro-themed login experience for WordPress

0🍴 0📅 2025年12月29日
GitHubで見るManusで実行

SKILL.md


name: wordpress-hook-generator description: Generate WordPress actions and filters with proper naming conventions. Use when creating hooks for the login page or plugin functionality.

WordPress Hook Generator

Instructions

When the user wants to add a WordPress hook:

  1. Determine hook type:

    • Action (add_action): Performs an action, no return value
    • Filter (add_filter): Modifies data, must return a value
  2. Apply naming convention:

    • Prefix: retrologin_
    • Example: retrologin_login_head, retrologin_custom_message
  3. Create callback function:

    • Use namespace: Retrologin\
    • Or use string callback: 'retrologin_callback'
  4. Register the hook:

    • Actions: add_action('hook_name', 'callback', priority, args)
    • Filters: add_filter('hook_name', 'callback', priority, args)

Example

// Action: Enqueue assets on login page
add_action('login_enqueue_scripts', 'retrologin_enqueue_assets');

function retrologin_enqueue_assets(): void {
    wp_enqueue_style('retrologin-login', plugins_url('dist/assets/login.css', __FILE__));
}

// Filter: Change logo URL
add_filter('login_headerurl', 'retrologin_login_logo_url');

function retrologin_login_logo_url(): string {
    return home_url('/');
}

Common Login Hooks

HookTypePurpose
login_enqueue_scriptsActionEnqueue CSS/JS
login_headerurlFilterLogo link URL
login_headertitleFilterLogo title text
login_messageFilterMessage above form
login_footer_textFilterFooter text
login_redirectFilterRedirect after login

スコア

総合スコア

60/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です