PluginProbe
PhastPress / 1.79
PhastPress v1.79
3.12 3.11 1.75 1.76 1.77 1.78 1.79 1.80 1.81 1.82 1.83 1.84 1.85 1.86 1.87 1.88 1.89 1.90 1.91 1.92 1.93 1.94 1.95 1.96 1.97 All 119 releases
phastpress / classes / InstallNoticeRendererImplementation.php

InstallNoticeRendererImplementation.php in PhastPress 1.79, at classes/InstallNoticeRendererImplementation.php

26 lines 792 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Kibo\PhastPlugins\PhastPress;
4
5 use Kibo\PhastPlugins\SDK\AdminPanel\InstallNoticeRenderer;
6
7 class InstallNoticeRendererImplementation implements InstallNoticeRenderer {
8
9 public function render($notice, $onCloseJSFunction) {
10 $template = '
11 <script>
12 jQuery(document).ready(function ($) {
13 $("#phastpress-activated-notice").on("click", " .notice-dismiss", function() {
14 (%s)()
15 })
16 });
17 </script>';
18 $template = sprintf($template, $onCloseJSFunction);
19 $template .= '<div class="notice notice-success is-dismissible" id="phastpress-activated-notice">';
20 $template .= '<p>' . $notice . '</p>';
21 $template .= '</div>';
22 return $template;
23 }
24
25 }
26