PluginProbe
Photonic Gallery & Lightbox for Flickr, SmugMug & Others / 3.24
Photonic Gallery & Lightbox for Flickr, SmugMug & Others v3.24
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 / Header.php

Header.php in Photonic Gallery & Lightbox for Flickr, SmugMug & Others 3.24, at Components/Header.php

83 lines 2.3 KB
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\Core\Photonic;
6 use Photonic_Plugin\Layouts\Core_Layout;
7 use Photonic_Plugin\Platforms\Base;
8
9 /**
10 * Class Header
11 *
12 * @package Photonic_Plugin\Components
13 */
14 class Header implements Printable {
15 public $id; // Used primarily for Flickr collections, to facilitate expansion
16
17 /**
18 * @var $title string All headers have a title
19 */
20 public $title;
21
22 /**
23 * @var $description string Some headers have a description
24 */
25 public $description;
26
27 /**
28 * @var $thumb_url string The URL for the thumbnail to be shown in the header. Exists if the platform provides an album thumbnail
29 */
30 public $thumb_url;
31
32 /**
33 * @var string $page_url The URL for the level 2 or level 3 object represented by the header
34 */
35 public $page_url;
36
37 /**
38 * @var string $header_for Indicates what type of object is being displayed like gallery / photoset / album etc. This is added to the CSS class.
39 */
40 public $header_for;
41
42 /**
43 * @var array $hidden_elements Contains the elements that should be hidden from the header display.
44 */
45 public $hidden_elements = [];
46
47 /**
48 * @var array $counters Contains counts of the object that the header represents. In most cases this has just one value. Zenfolio objects have multiple values.
49 */
50 public $counters = [];
51
52 /**
53 * @var bool $enable_link Should clicking on the thumbnail / title take you anywhere?
54 */
55 public $enable_link;
56
57 /**
58 * @var string $display_location Is this header in a local, modal, lighbtox or template location?
59 */
60 public $display_location = 'local';
61
62 /**
63 * @var bool $iterate_level_3 If this is a level 3 header, this field indicates whether an expansion icon should be shown. This is to improve performance for Flickr collections.
64 */
65 public $iterate_level_3 = true;
66
67 /**
68 * @var $layout string What layout is this a header for? Also used by Flickr, when the "+" is clicked for a collection
69 */
70 public $layout;
71
72 /**
73 * {@inheritDoc} - a Header
74 */
75 public function html(Base $module, Core_Layout $layout = null, $print = false): string {
76 $ret = $layout->generate_header_markup($this, $module);
77 if ($print) {
78 echo wp_kses($ret, Photonic::$safe_tags);
79 }
80 return wp_kses($ret, Photonic::$safe_tags);
81 }
82 }
83