PluginProbe
Photonic Gallery & Lightbox for Flickr, SmugMug & Others / 3.35
Photonic Gallery & Lightbox for Flickr, SmugMug & Others v3.35
3.35 3.34 3.33 2.19 2.20 2.21 2.22 2.23 2.24 2.25 2.26 2.27 2.28 2.29 2.30 2.31 2.32 2.33 2.34 2.40 2.41 2.42 2.43 2.44 2.45 All 140 releases
photonic / Components / Error.php

Error.php in Photonic Gallery & Lightbox for Flickr, SmugMug & Others 3.35, at Components/Error.php

38 lines 913 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Photonic_Plugin\Components;
4
5 use Photonic_Plugin\Layouts\Core_Layout;
6 use Photonic_Plugin\Platforms\Base;
7
8 class Error implements Printable {
9 private string $message;
10
11 /**
12 * Error constructor.
13 *
14 * @param String $message
15 */
16 public function __construct(string $message) {
17 $this->message = $message;
18 }
19
20 /**
21 * {@inheritDoc} - an Error
22 */
23 public function html(Base $module, ?Core_Layout $layout, bool $print = false): string { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter
24 $ret = "
25 <div class='photonic-error photonic-{$module->provider}-error' id='photonic-{$module->provider}-error-{$module->gallery_index}'>
26 <span class='photonic-error-icon photonic-icon'>&nbsp;</span>
27 <div class='photonic-message'>
28 {$this->message}
29 </div>
30 </div>\n";
31 if ($print) {
32 echo wp_kses_post($ret);
33 }
34
35 return wp_kses_post($ret);
36 }
37 }
38