/var/www/vhosts/zteisner.at/www/content/plugins/advanced-custom-fields-pro/includes/acf-value-functions.php
// If we're using a non options_ option key, ensure we have a valid reference key.
if ( 'option' === $decoded['type'] && 'options' !== $decoded['id'] ) {
// TODO: Move this into options meta class? i.e. return false
$meta = acf_get_metadata_by_field( $post_id, $field, true );
if ( ! $meta ) {
$allow_load = false;
} elseif ( $meta !== $field['key'] ) {
if ( ! isset( $field['__key'] ) || $meta !== $field['__key'] ) {
$allow_load = false;
}
}
}
// Load Store.
$store = acf_get_store( 'values' );
// If we're allowing load, check the store or load value from database.
if ( $allow_load ) {
if ( $store->has( "$post_id:$field_name" ) ) {
return $store->get( "$post_id:$field_name" );
}
$value = acf_get_metadata_by_field( $post_id, $field );
}
// Use field's default_value if no meta was found.
if ( $value === null && isset( $field['default_value'] ) ) {
$value = $field['default_value'];
}
/**
* Filters the $value after it has been loaded.
*
* @date 28/09/13
* @since 5.0.0
*
* @param mixed $value The value to preview.
* @param string $post_id The post ID for this value.
* @param array $field The field array.
Arguments
"Array to string conversion"
/var/www/vhosts/zteisner.at/www/content/plugins/advanced-custom-fields-pro/includes/acf-value-functions.php
// If we're using a non options_ option key, ensure we have a valid reference key.
if ( 'option' === $decoded['type'] && 'options' !== $decoded['id'] ) {
// TODO: Move this into options meta class? i.e. return false
$meta = acf_get_metadata_by_field( $post_id, $field, true );
if ( ! $meta ) {
$allow_load = false;
} elseif ( $meta !== $field['key'] ) {
if ( ! isset( $field['__key'] ) || $meta !== $field['__key'] ) {
$allow_load = false;
}
}
}
// Load Store.
$store = acf_get_store( 'values' );
// If we're allowing load, check the store or load value from database.
if ( $allow_load ) {
if ( $store->has( "$post_id:$field_name" ) ) {
return $store->get( "$post_id:$field_name" );
}
$value = acf_get_metadata_by_field( $post_id, $field );
}
// Use field's default_value if no meta was found.
if ( $value === null && isset( $field['default_value'] ) ) {
$value = $field['default_value'];
}
/**
* Filters the $value after it has been loaded.
*
* @date 28/09/13
* @since 5.0.0
*
* @param mixed $value The value to preview.
* @param string $post_id The post ID for this value.
* @param array $field The field array.
/var/www/vhosts/zteisner.at/www/content/plugins/advanced-custom-fields-pro/includes/api/api-template.php
$field = acf_maybe_get_field( $selector, $post_id );
// create dummy field
$dummy_field = false;
if ( ! $field ) {
$field = acf_get_valid_field(
array(
'name' => $selector,
'key' => '',
'type' => '',
)
);
// prevent formatting, flag as dummy in case $escape_html is true.
$format_value = false;
$dummy_field = true;
}
// get value for field
$value = acf_get_value( $post_id, $field );
// escape html is only compatible when formatting the value too
if ( ! $dummy_field && ! $format_value && $escape_html ) {
_doing_it_wrong( __FUNCTION__, __( 'Returning an escaped HTML value is only possible when format_value is also true. The field value has not been returned for security.', 'acf' ), '6.2.6' ); //phpcs:ignore -- escape not required.
return false;
}
// format value
if ( $format_value ) {
if ( $escape_html ) {
// return the escaped HTML version if requested.
if ( acf_field_type_supports( $field['type'], 'escaping_html' ) ) {
$value = acf_format_value( $value, $post_id, $field, true );
} else {
$new_value = acf_format_value( $value, $post_id, $field );
if ( is_array( $new_value ) ) {
$value = map_deep( $new_value, 'acf_esc_html' );
} else {
$value = acf_esc_html( $new_value );
}
/var/www/vhosts/zteisner.at/www/content/themes/eisnerzt/includes/partials/quote_slider_main.php
<div class="slider__main <?= count($quotes)>1?"js-cursor-trigger":"" ?>" data-cursor="left-right">
<div class="o-grid">
<div class="o-grid__col u-6/10@ts u-push-3/10@ts">
<div class="js-slider__main">
<?php foreach ($quotes as $quote) : ?>
<?php
$quoteText = get_field("zitate", $quote)["0"]["quote"];
$namePartKeys = [
"title",
"firstname",
"lastname"
];
$nameParts = [];
foreach ($namePartKeys as $nPK) {
$val = get_field($nPK, $quote);
if ($val) {
$nameParts[] = $val;
}
}
if (array($nameParts)>= 1) {
$name = sprintf("- %s", implode(" ", $nameParts));
}
?>
<div class="slide">
<div class="quote__text ft--quotes">
<?= $quoteText ?: '' ?>
</div>
<div class="quote__author ft--navigation-caps u-pt">
<?php if (strlen($name) > 2): ?>
<?= $name ?>
<?php endif ?>
</div>
</div>
<?php endforeach; ?>
</div>
</div>
</div>
<?php
$circleState = get_the_post_thumbnail($quotes[0]);
if (!$circleState): ?>
/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/quote_slider_main.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/quote_partner.php
<?php
$data_id = uniqid();
$button_text = isset($button_text) ? $button_text : false;
$button_link = isset($button_link) ? $button_link : false;
?>
<div class="o-grid">
<div class="container o-grid__col u-12/16@ts u-push-2/16@ts">
<div class="inner">
<div class="js-quote-slider slider" data-unique="<?= $data_id ?>" >
<div class="slider__main__outer">
<div class="o-grid">
<div class="o-grid__col u-10/12@ts u-push-2/12@ts">
<?php
if (is_array($quotes)) {
p_load_partial("quote_slider_main", [
"quotes" => $quotes
]);
}
?>
</div>
<div class="o-grid__col u-10/12@ts u-push-2/12@ts u-hidden u-block@ts">
<div class="button_and_nav__desktop">
<?php if ($button_text && $button_link) : ?>
<div class="button__holder u-pt--half u-pt@ts <?= count($quotes)>1?"u-pr--double":"" ?>">
<a class="button" href="<?= $button_link; ?>">
<div class="ft--navigation-caps">
<?= $button_text; ?>
</div>
</a>
</div>
<?php endif; ?>
<?php
if (count($quotes)>1) {
if (is_array($quotes)) {
p_load_partial("quote_slider_navigation", [
"quotes" => $quotes
]);
}
/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/quote_partner.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/page.php
<?php
get_header();
$Modules = new \Probots\Modules\Builder;
$Modules
->setModulesFieldKey('modules')
->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/page.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"