# photonic/3.37/Components/Single_Photo.php

Photonic Gallery &amp; Lightbox for Flickr, SmugMug &amp; Others, version 3.37. 46 lines.

- Page: https://pluginprobe.com/plugins/photonic/3.37/code/Components/Single_Photo.php
- Raw: https://pluginprobe.com/plugins/photonic/3.37/raw/Components/Single_Photo.php
- Modified: 2026-07-23T21:21:48+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/photonic/3.37/code/Components/Single_Photo.php#L10-L20`.

```php
<?php

namespace Photonic_Plugin\Components;

use Photonic_Plugin\Core\Photonic;
use Photonic_Plugin\Layouts\Core_Layout;
use Photonic_Plugin\Platforms\Base;

/**
 * Class Single_Photo
 * Represents a standalone photo in Photonic. This can be displayed currently by Flickr, Instagram and Zenfolio. The photo shows up
 * as a full-width image and caption, along with a header if available. The photo can be linked to the source.
 * This is a "Printable" element - it may be returned in the <code>get_gallery_images</code> for the corresponding platform.
 *
 * @package Photonic_Plugin\Components
 */
class Single_Photo implements Printable {
	public string $src = '';
	public string $href = '';
	public string $title = '';
	public string $caption = '';

	/**
	 * Single_Photo constructor.
	 *
	 * @param string $src
	 * @param string $href
	 * @param string $title
	 * @param string $caption
	 */
	public function __construct(string $src, string $href, string $title, string $caption) {
		$this->src = $src;
		$this->href = $href;
		$this->title = $title;
		$this->caption = $caption;
	}

	public function html(Base $module, ?Core_Layout $layout, bool $print = false): string {
		$ret = $layout->generate_single_photo_markup($this, $module);
		if ($print) {
			echo wp_kses($ret, Photonic::$safe_tags);
		}
		return wp_kses($ret, Photonic::$safe_tags);
	}
}

```
