Siren

Quick Reference

WordPress-to-Siren pattern mapping table with links to detailed guides.

Last updated: April 9, 2026

WordPress Developer Quick Reference

Siren is built on PHPNomad, a platform-agnostic PHP framework. None of Siren’s core logic depends on WordPress. It uses WordPress as a host platform through a thin integration layer. This means the patterns you use daily in WordPress plugin development have direct equivalents in Siren, but they are expressed through typed PHP interfaces rather than global functions and string-named hooks.

This guide maps WordPress patterns you already know to their Siren equivalents. Each row links to a dedicated page with side-by-side code examples. The rest of Siren’s documentation is platform-agnostic by design. It describes PHPNomad interfaces, domain events, and datastores without reference to WordPress. These WordPress Developer Guide pages are the bridge: they start from the WordPress concept and show you where to land.

If you are building a Siren extension for a WordPress plugin, start here and follow the links into the detailed guides. If you have already read through the Getting Started section, use this table as a quick-lookup cheat sheet.

Pattern Mapping

WordPress PatternSiren EquivalentDetails
add_action / add_filterEvent::attach() or CanHandle + HasListenersHooks, Actions & Events
do_action / apply_filtersEvent::broadcast() or EventStrategy::broadcast()Hooks, Actions & Events
WordPress hook to domain eventEvent bindings + transformer callablesBridging Platform Hooks
get_post / WP_QueryFacade::getById() / andWhere() or datastore DIQuerying Data
$wpdb direct queriesDatastore andWhere() / where()Querying Data
Global functionsFacades (static wrappers)Dependency Injection
get_option / update_optionConfigs::getConfigValue() or ConfigDatastore DIConfiguration
get_post_meta / update_post_metaConfigs::setConfig() (scoped by type/subtype)Configuration
Custom post typesModel classes + datastoresArchitecture Overview
register_rest_routeController + HasMiddleware + HasControllersREST API Patterns
current_user_canUser::canDoAction() or auth middlewareRoles & Permissions
WP-Cron / wp_schedule_eventDomain event listeners or TaskStrategy::dispatch()PHPNomad Tasks
WP_Error / is_wp_error()Typed exceptions (RecordNotFoundException, etc.)Error Handling
Plugin activation hooksInitializers + shouldLoad()The Integration Class