# give/4.15.2/src/Onboarding/Setup/Handlers/AdminNoticeHandler.php

GiveWP – Donation Plugin and Fundraising Platform, version 4.15.2. 49 lines.

- Page: https://pluginprobe.com/plugins/give/4.15.2/code/src/Onboarding/Setup/Handlers/AdminNoticeHandler.php
- Raw: https://pluginprobe.com/plugins/give/4.15.2/raw/src/Onboarding/Setup/Handlers/AdminNoticeHandler.php
- Modified: 2021-11-23T23:55:18+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/give/4.15.2/code/src/Onboarding/Setup/Handlers/AdminNoticeHandler.php#L10-L20`.

```php
<?php

/**
 * Onboarding class
 *
 * @package Give
 */

namespace Give\Onboarding\Setup\Handlers;

defined('ABSPATH') || exit;

class AdminNoticeHandler implements RequestHandler
{

    /**
     * @inheritDoc
     */
    public function maybeHandle()
    {
        if ( ! isset($_GET['page']) || 'give-setup' !== $_GET['page']) {
            return;
        }

        $this->handle();
    }

    /**
     * @inheritDoc
     */
    public function handle()
    {
        add_action(
            'admin_notices',
            function () {
                ob_start();
            },
            -999999
        );
        add_action(
            'admin_notices',
            function () {
                ob_get_clean();
            },
            999999
        );
    }
}

```
