wphooks

package
v1.23.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package wphooks provides lookup for WordPress core hook definitions.

It embeds the official wp-hooks/wordpress-core-hooks JSON data (actions + filters) and exposes fast name-based lookups. This allows tools to distinguish between WP core hooks and custom hooks defined by plugins.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Count

func Count() int

Count returns the total number of loaded WP core hooks.

func IsKnownHook

func IsKnownHook(name string) bool

IsKnownHook returns true if name is a WordPress core hook.

Types

type HookDef

type HookDef struct {
	Name string `json:"name"`
	File string `json:"file"`
	Type string `json:"type"` // "action" or "filter"
	Args int    `json:"args"`
}

HookDef describes a single WordPress core hook.

func Lookup

func Lookup(name string) *HookDef

Lookup returns the hook definition for a WP core hook, or nil if unknown.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL