library = esc_attr(Photonic::$library);
$this->prompt_title = esc_attr__('Protected Content', 'photonic');
$this->prompt_submit = esc_attr__('Access', 'photonic');
$this->prompt_text = esc_attr__('This album is password-protected. Please provide a valid password.', 'photonic');
}
final public static function get_instance() {
static $instances = array();
$called_class = get_called_class();
if (!isset($instances[$called_class])) {
$instances[$called_class] = new $called_class();
}
return $instances[$called_class];
}
/**
* Generates the markup for a single photo.
*
* @param Single_Photo $photo Pertinent pieces of information about the photo - the source (src), the photo page (href), title and caption.
* @param Base $module The object calling this. A CSS class is created in the header, photonic-single-$module->provider-photo-header.
* @return string
*/
public function generate_single_photo_markup(Single_Photo $photo, Base $module): string {
$module->push_to_stack('Generate single photo markup');
$ret = '';
if (empty($photo->src)) {
$module->pop_from_stack();
return $ret;
}
global $photonic_external_links_in_new_tab;
if (!empty($photo->title)) {
$ret .= "\t" . '
Header element. A header typically consists of a thumbnail, a title and some
* information about the child counts.
*
* @param Header $header
* @param Base $module
* @return string
*/
public function generate_header_markup(Header $header, Base $module): string {
if ('lightbox' === $header->display_location || $this instanceof Slideshow) {
return '';
}
$ret = '';
global $photonic_gallery_template_page, $photonic_page_content;
if (!empty($photonic_gallery_template_page) && is_page($photonic_gallery_template_page) && in_array($photonic_page_content, ['replace-if-available', 'append-if-available'], true)) {
$ret = wptexturize(wp_kses_post($header->description));
}
elseif ((empty($photonic_gallery_template_page) ||
!is_page() ||
(is_page() && !empty($photonic_gallery_template_page) && !is_page($photonic_gallery_template_page))) &&
!empty($header->title)) {
global $photonic_external_links_in_new_tab;
$title = esc_attr($header->title);
if (!empty($photonic_external_links_in_new_tab)) {
$target = ' target="_blank" ';
}
else {
$target = '';
}
$anchor = '';
if (!empty($header->thumb_url)) {
$image = '