Skip to content
github-actions[bot] edited this page Oct 14, 2026 · 2 revisions

Executes a callback within a deferred scope, ensuring all registered callbacks are executed at the end.

This function MUST create a Defer instance, pass it to the callback, and unset it after execution.


  • Full name: scope
  • Defined in: functions.php

Parameters

Parameter Type Description
$callback callable a function that receives the Defer and executes the desired logic

Return Value

mixed

the return value of the callback

Clone this wiki locally