for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Leonidas\Hooks;
use Closure;
trait TargetsWpLoadedHook
{
protected function targetWpLoadedHook()
add_action(
"wp_loaded",
Closure::fromCallable([$this, 'doWpLoadedAction']),
$this->getWpLoadedPriority(),
PHP_INT_MAX
);
return $this;
}
protected function getWpLoadedPriority(): int
return 10;
abstract protected function doWpLoadedAction(): void;