0; } /** * Run a callback while flagging the current call stack as plugin-initiated. * * Uses a depth counter (not a boolean) so nested calls remain correct. * `try`/`finally` guarantees the counter is decremented even when the * callback throws. * * @since 1.2.0 * * @param callable $callback Callback to execute. * * @return mixed Callback return value. */ public static function run( callable $callback ) { ++self::$depth; try { return $callback(); } finally { --self::$depth; } } }