use-wordpress-hook 0.0.1

WordPress hook metadata primitives for RustUse.
Documentation
  • Coverage
  • 25.93%
    7 out of 27 items documented1 out of 23 items with examples
  • Size
  • Source code size: 7.57 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 689.95 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 2s Average build duration of successful builds.
  • all releases: 2s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-php
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-wordpress-hook

WordPress hook metadata primitives for RustUse.

Experimental

use-wordpress-hook is experimental while use-php remains below 0.3.0.

Example

use use_wordpress_hook::{HookCallbackMetadata, HookKind, HookName, HookReference};

let hook = HookReference::new(HookName::new("init")?, HookKind::Action)
    .with_callback(HookCallbackMetadata::new("register_books"));

assert_eq!(hook.name().as_str(), "init");
assert_eq!(hook.kind(), HookKind::Action);
# Ok::<(), use_wordpress_hook::WordPressHookError>(())

Scope

  • Action/filter hook names, priorities, callback metadata, and hook references.

Non-goals

  • Runtime callback execution, plugin loading, or WordPress event dispatching.

License

Licensed under either Apache-2.0 or MIT.