# phastpress/1.92/classes/InstallNoticeRendererImplementation.php

PhastPress, version 1.92. 26 lines.

- Page: https://pluginprobe.com/plugins/phastpress/1.92/code/classes/InstallNoticeRendererImplementation.php
- Raw: https://pluginprobe.com/plugins/phastpress/1.92/raw/classes/InstallNoticeRendererImplementation.php
- Modified: 2018-06-11T14:28:58+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/phastpress/1.92/code/classes/InstallNoticeRendererImplementation.php#L10-L20`.

```php
<?php

namespace Kibo\PhastPlugins\PhastPress;

use Kibo\PhastPlugins\SDK\AdminPanel\InstallNoticeRenderer;

class InstallNoticeRendererImplementation implements InstallNoticeRenderer {

    public function render($notice, $onCloseJSFunction) {
        $template = '
        <script>
            jQuery(document).ready(function ($) {
                $("#phastpress-activated-notice").on("click", " .notice-dismiss", function() {
                    (%s)()
                })
            });
        </script>';
        $template = sprintf($template, $onCloseJSFunction);
        $template .= '<div class="notice notice-success is-dismissible" id="phastpress-activated-notice">';
        $template .= '<p>' . $notice . '</p>';
        $template .= '</div>';
        return $template;
    }

}

```
