$callback) { // delete_option($option); if (!get_option($option, false)) { error_log('Calling do once: '.$option); $callback(); update_option($option, true); } } } function jvb_register_do_once(string $option, array $callback) { // delete_option(BASE.'do_these_once'); //Ensure we have the option starting with BASE $option = (str_starts_with($option, BASE)) ? $option : BASE.$option; $options = get_option(BASE.'do_these_once', []); // delete_option($option); if (!array_key_exists($option, $options)) { $options[$option] = $callback; update_option(BASE.'do_these_once', $options); } }