# Rethinking do\_action(): Events as objects, hooks as class names

DevFeed: [Rethinking do\_action(): Events as objects, hooks as class names](<https://devfeed.tech/articles/rethinking-do-action-events-as-objects-hooks-as-class-names-44844.md>)

Original publisher: [Read original article](<https://developer.wordpress.org/news/2026/08/rethinking-do_action-events-as-objects-hooks-as-class-names/>)

Author: Justin Tadlock

Published: 2026-08-03T21:00:34Z

Content type: tutorial

Language: en

Sources: [WordPress](<https://devfeed.tech/sources/wordpress-developer-blog.md>)

Topics: [WordPress](<https://devfeed.tech/topics/wordpress.md>), [payload](<https://devfeed.tech/topics/payload.md>), [class](<https://devfeed.tech/topics/class.md>), [help](<https://devfeed.tech/topics/help.md>), [object](<https://devfeed.tech/topics/object.md>)

Tags: [advanced](<https://devfeed.tech/tags/advanced.md>), [class](<https://devfeed.tech/tags/class.md>), [code](<https://devfeed.tech/tags/code.md>), [code-editors](<https://devfeed.tech/tags/code-editors.md>), [extensibility](<https://devfeed.tech/tags/extensibility.md>), [hooks](<https://devfeed.tech/tags/hooks.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [payload](<https://devfeed.tech/tags/payload.md>), [plugins](<https://devfeed.tech/tags/plugins.md>), [themes](<https://devfeed.tech/tags/themes.md>)

## AI overview

A practical exploration of using typed event objects with WordPress hooks to improve plugin and theme extensibility. It compares the approach with existing action and filter hooks and discusses positional arguments, global names, and missing type information.

## Source excerpt

How to use typed event objects to improve the payload you send to plugin and theme extenders.