benecaster_request_wizard_step()
benecaster_request_wizard_step( string $step_id, int $show_id ): bool
Asks for an add-on’s setup-wizard step to be run on a show that has already finished setup. Declare the step through benecaster_setup_wizard_steps as usual, then call this for each show that still needs it.
Benecaster shows a notice on its admin pages naming the show, with Set it up and No thanks. Set it up runs only that show’s pending add-on steps and then returns the podcaster to the page they were on. Nobody is redirected into it. Before first-run setup is finished the request is recorded but nothing is shown, because the step is part of the ordinary wizard.
Parameters
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
step_id |
string |
— | Yes | The step's id, as declared in benecaster_setup_wizard_steps |
show_id |
int |
— | Yes | The show to run the step for |
Return Value
Type:
bool
true when the step is waiting to be offered on that show after the call. false when nothing was recorded: a Benecaster step ID or done, an ID that is empty once sanitised, an ID that is not a show, or a step already completed, declined or withdrawn on that show. That includes a step the podcaster answered in the first-run wizard on the wizard's own show, Continue and Skip alike. Benecaster reads both as complete, and neither late-step action fires.
Example
add_action( 'admin_init', function (): void {
foreach ( my_addon_shows_needing_setup() as $show_id ) {
// Does nothing once the podcaster has finished or declined it on that show.
benecaster_request_wizard_step( 'my-addon-config', $show_id );
}
} );
Hooks Fired
Notes
Call it on every request; that is the intended use. A step completed or declined on a
show is never offered there again, and the call returns false without doing anything.
Closing the run part-way counts as declining. There is no undo; only a full wizard reset,
available on development and staging sites, forgets the record.
The step's condition is not used when it is requested this way. Decide whether a show
still needs the step before you call. Its component receives showId, lateRun: true and
setCanContinue( boolean ), which holds Continue → / Finish → until the step
releases it (the exit button is never held). An optional title on the step definition
names it in the notice.
Need this built rather than just documented? See our services →