/var/www/vhosts/zteisner.at/www/content/themes/eisnerzt/includes/partials/slider.php
<?php
$orientation_default = 'landscape';
$orientation = isset($orientation) ? $orientation : $orientation_default;
?>
<div class="slider__container">
<div class="slider js-slider" data-haslightbox="<?= $hasLightbox; ?>" >
<?php
foreach ($images as $image) : ?>
<div class="slideItem js-slide js-slide-image">
<a data-href="<?= wp_get_original_image_url($image['ID']) ?>">
<div class="js-cursor-trigger" data-cursor="plus">
<?= picture($image)->default($orientation); ?>
</div>
</a>
</div>
<?php endforeach; ?>
</div>
<div class="js-slider__nav">
<div class="flex flex--center u-pt">
<div class="slider__nav flex flex--space-between">
<a class="slick-prev">
<i class="icon icon-arrow icon-arrow--prev"></i>
</a>
<div class="slider__pagination ft--h-2-caps nav-counter">
<span class="js-current">1</span> /
<span class="js-total"><?= count($images); ?></span>
</div>
<a class="slick-next">
<i class="icon icon-arrow icon-arrow--next"></i>
</a>
</div>
</div>
</div>
</div>
Arguments
"Trying to access array offset on false"
/var/www/vhosts/zteisner.at/www/content/themes/eisnerzt/includes/partials/slider.php
<?php
$orientation_default = 'landscape';
$orientation = isset($orientation) ? $orientation : $orientation_default;
?>
<div class="slider__container">
<div class="slider js-slider" data-haslightbox="<?= $hasLightbox; ?>" >
<?php
foreach ($images as $image) : ?>
<div class="slideItem js-slide js-slide-image">
<a data-href="<?= wp_get_original_image_url($image['ID']) ?>">
<div class="js-cursor-trigger" data-cursor="plus">
<?= picture($image)->default($orientation); ?>
</div>
</a>
</div>
<?php endforeach; ?>
</div>
<div class="js-slider__nav">
<div class="flex flex--center u-pt">
<div class="slider__nav flex flex--space-between">
<a class="slick-prev">
<i class="icon icon-arrow icon-arrow--prev"></i>
</a>
<div class="slider__pagination ft--h-2-caps nav-counter">
<span class="js-current">1</span> /
<span class="js-total"><?= count($images); ?></span>
</div>
<a class="slick-next">
<i class="icon icon-arrow icon-arrow--next"></i>
</a>
</div>
</div>
</div>
</div>
/var/www/vhosts/zteisner.at/www/content/themes/eisnerzt/class/src/Tools/Helper.php
<?php
namespace Probots\Tools;
class Helper
{
public static function includePartial($file, $data = [])
{
extract($data);
include(sprintf('%s/includes/partials/%s.php', get_template_directory(), $file));
}
public static function loadPartial($file, $data = [])
{
ob_start();
extract($data);
include(sprintf('%s/includes/partials/%s.php', get_template_directory(), $file));
return ob_get_clean();
}
public static function includeBlock($file, $data = [])
{
extract($data);
include(sprintf('%s/includes/blocks/%s.php', get_template_directory(), $file));
}
public static function getAssetUrl($name = '')
{
return sprintf('%s/assets/%s', get_template_directory_uri(), $name);
}
public static function includeAsset($name = '')
{
include(sprintf('%s/assets/%s', get_template_directory(), $name));
}
public static function getTplPath($file = '')
{
return sprintf('%s/%s', get_template_directory(), $file);
}
Arguments
"/var/www/vhosts/zteisner.at/www/content/themes/eisnerzt/includes/partials/slider.php"
/var/www/vhosts/zteisner.at/www/content/themes/eisnerzt/class/functions/helpers.php
if (!function_exists('assetUrl')) {
function assetUrl($name)
{
return \Probots\Tools\Helper::getAssetUrl($name);
}
}
if (!function_exists('includeAsset')) {
function includeAsset($name)
{
return \Probots\Tools\Helper::includeAsset($name);
}
}
if (!function_exists('p_load_partial')) {
function p_load_partial($name, $data = [])
{
\Probots\Tools\Helper::includePartial($name, $data);
}
}
if (!function_exists('ignore_upload_ext')) {
function ignore_upload_ext($checked, $file, $filename, $mimes)
{
//we only need to worry if WP failed the first pass
if (!$checked['type']) {
//rebuild the type info
$wp_filetype = wp_check_filetype($filename, $mimes);
$ext = $wp_filetype['ext'];
$type = $wp_filetype['type'];
$proper_filename = $filename;
//preserve failure for non-svg images
if ($type && 0 === strpos($type, 'image/') && $ext !== 'svg') {
$ext = $type = false;
}
/var/www/vhosts/zteisner.at/www/content/themes/eisnerzt/includes/layouts/news_slider.php
<?php
$images = [];
if (is_array($slides)) {
foreach ($slides as $slide) {
array_push($images, $slide['image']);
}
}
?>
<div class="container">
<div class="inner">
<div class="o-grid">
<div class="o-grid__col u-8/16@ts u-push-4/16@ts">
<?php
if ($images) {
p_load_partial('slider', [
'images' => $images,
'hasLightbox' => true
]);
}
?>
</div>
</div>
</div>
</div>
/var/www/vhosts/zteisner.at/www/content/themes/eisnerzt/class/src/Modules/Builder.php
print $content;
wp_reset_postdata();
}
}
private function getModuleHtml($layout, $variables)
{
$fileName = sprintf('%s.php', $layout);
$filePath = sprintf('%s/%s/%s', get_template_directory(), $this->layoutDir, $fileName);
if (!file_exists($filePath)) {
print 'MODULE LAYOUT NOT FOUND IN: ' . $filePath;
return;
}
extract($variables);
include($filePath);
}
private function getDebugHtml($layout, $variables)
{
if (!isset($_GET['debug-modules'])) {
return;
}
printf("<div>");
print '<pre>';
print_r($variables);
print '</pre>';
printf("</div>");
}
private function getModules()
{
return \get_field($this->acfModulesFieldKey) ?: [];
}
private function getLayoutName($module)
Arguments
"/var/www/vhosts/zteisner.at/www/content/themes/eisnerzt/includes/layouts/news_slider.php"
/var/www/vhosts/zteisner.at/www/content/themes/eisnerzt/class/src/Modules/Builder.php
private $layoutDir = './';
public function build()
{
$modules = $this->getModules();
foreach ($modules as $module) {
$layout = $this->getLayoutName($module);
$variables = $module;
unset($variables[$this->acfLayoutFieldKey]);
$variables['layout'] = $layout;
$baseClassName = $this->moduleClassName;
$layoutClassName = $baseClassName . "--" . $layout;
ob_start();
printf("<div class=\"%s %s\">\n", $baseClassName, $layoutClassName);
$this->getDebugHtml($layout, $variables);
$this->getModuleHtml($layout, $variables);
print("</div>\n");
$content = ob_get_clean();
print $content;
wp_reset_postdata();
}
}
private function getModuleHtml($layout, $variables)
{
$fileName = sprintf('%s.php', $layout);
$filePath = sprintf('%s/%s/%s', get_template_directory(), $this->layoutDir, $fileName);
if (!file_exists($filePath)) {
print 'MODULE LAYOUT NOT FOUND IN: ' . $filePath;
return;
/var/www/vhosts/zteisner.at/www/content/themes/eisnerzt/index.php
<?php
get_header('single-news');
$Modules = new \Probots\Modules\Builder;
$Modules
->setModulesFieldKey('field_5c9381d43da03')
->setLayoutFieldKey('acf_fc_layout')
->setModuleClassName('layout')
->setLayoutSubDirectory('includes/layouts');
$Modules->build();
get_footer();
?>
/var/www/vhosts/zteisner.at/www/wp/wp-includes/template-loader.php
*/
$template = apply_filters( 'template_include', $template );
$is_stringy = is_string( $template ) || ( is_object( $template ) && method_exists( $template, '__toString' ) );
$template = $is_stringy ? realpath( (string) $template ) : null;
if (
is_string( $template ) &&
( str_ends_with( $template, '.php' ) || str_ends_with( $template, '.html' ) ) &&
is_file( $template ) &&
is_readable( $template )
) {
/**
* Fires immediately before including the template.
*
* @since 6.9.0
*
* @param string $template The path of the template about to be included.
*/
do_action( 'wp_before_include_template', $template );
include $template;
} elseif ( current_user_can( 'switch_themes' ) ) {
$theme = wp_get_theme();
if ( $theme->errors() ) {
wp_die( $theme->errors() );
}
}
return;
}
Arguments
"/var/www/vhosts/zteisner.at/www/content/themes/eisnerzt/index.php"
/var/www/vhosts/zteisner.at/www/wp/wp-blog-header.php
<?php
/**
* Loads the WordPress environment and template.
*
* @package WordPress
*/
if ( ! isset( $wp_did_header ) ) {
$wp_did_header = true;
// Load the WordPress library.
require_once __DIR__ . '/wp-load.php';
// Set up the WordPress query.
wp();
// Load the theme template.
require_once ABSPATH . WPINC . '/template-loader.php';
}
Arguments
"/var/www/vhosts/zteisner.at/www/wp/wp-includes/template-loader.php"
/var/www/vhosts/zteisner.at/www/index.php
<?php
/**
* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*/
/**
* Tells WordPress to load the WordPress theme and output it.
*
* @var bool
*/
define('WP_USE_THEMES', true);
/** Loads the WordPress Environment and Template */
require( dirname( __FILE__ ) . '/wp/wp-blog-header.php' );
Arguments
"/var/www/vhosts/zteisner.at/www/wp/wp-blog-header.php"