/home/farmaboo/domains/underbodyguards.com/public_html/wp-content/themes/wph/includes/helpers.php
return get_the_title(get_queried_object());
} elseif (is_archive()) {
return get_the_archive_title();
} elseif (is_home()) {
return get_the_title(wph_blog_page_id());
} else {
return wp_title();
}
}
function h_page_bg_id()
{
if (is_singular()) {
$result = ah_field('background', get_queried_object_id());
} elseif (is_home()) {
$result = ah_field('background', wph_blog_page_id());
} elseif (is_product_category()) {
$result = ah_field('background', get_queried_object());
}
if (is_empty($result)) {
$result = ah_option('info.image');
}
return $result;
}
/**
* @param array|string $attrOrClass
* @return string|null
*/
function h_page_bg($attrOrClass = [])
{
return wph_image(h_page_bg_id(), $attrOrClass);
}
function h_format_copyright($input)
{
if (is_empty($input)) {
return '';
}
$replace = [
Arguments
"Undefined variable $result"
/home/farmaboo/domains/underbodyguards.com/public_html/wp-content/themes/wph/includes/helpers.php
return get_the_title(get_queried_object());
} elseif (is_archive()) {
return get_the_archive_title();
} elseif (is_home()) {
return get_the_title(wph_blog_page_id());
} else {
return wp_title();
}
}
function h_page_bg_id()
{
if (is_singular()) {
$result = ah_field('background', get_queried_object_id());
} elseif (is_home()) {
$result = ah_field('background', wph_blog_page_id());
} elseif (is_product_category()) {
$result = ah_field('background', get_queried_object());
}
if (is_empty($result)) {
$result = ah_option('info.image');
}
return $result;
}
/**
* @param array|string $attrOrClass
* @return string|null
*/
function h_page_bg($attrOrClass = [])
{
return wph_image(h_page_bg_id(), $attrOrClass);
}
function h_format_copyright($input)
{
if (is_empty($input)) {
return '';
}
$replace = [
/home/farmaboo/domains/underbodyguards.com/public_html/wp-content/themes/wph/includes/helpers.php
if (is_singular()) {
$result = ah_field('background', get_queried_object_id());
} elseif (is_home()) {
$result = ah_field('background', wph_blog_page_id());
} elseif (is_product_category()) {
$result = ah_field('background', get_queried_object());
}
if (is_empty($result)) {
$result = ah_option('info.image');
}
return $result;
}
/**
* @param array|string $attrOrClass
* @return string|null
*/
function h_page_bg($attrOrClass = [])
{
return wph_image(h_page_bg_id(), $attrOrClass);
}
function h_format_copyright($input)
{
if (is_empty($input)) {
return '';
}
$replace = [
'{year}' => date('Y'),
'{domain}' => parse_url(site_url(), PHP_URL_HOST),
];
return str_replace(
array_keys($replace),
array_values($replace),
$input,
);
}
/home/farmaboo/domains/underbodyguards.com/public_html/wp-content/themes/wph/views/site/blog/archive/archive.php
<?php
vh_class('blogArchive');
?>
<div class="baInfo">
<?= h_page_bg('baInfo-bg') ?>
<div class="baInfo-header">
<?= view('site/layout/header') ?>
</div>
<div class="baInfo-main">
<div class="baInfo-container">
<h1 class="baInfo-title">
<?= get_the_archive_title(); ?>
</h1>
</div>
</div>
</div>
<main class="baMain">
<?= view('../cards')->data(compact('query')) ?>
</main>
/home/farmaboo/domains/underbodyguards.com/public_html/wp-content/themes/wph/modules/Helpers/misc.php
return $result;
}
/**
* @param string $path
* @param array $data
* @param bool $optional
* @return mixed
* @noinspection PhpDocSignatureInspection
*/
function h_perform()
{
if (func_num_args() !== 3) {
throw new InvalidArgumentException('Invalid argument number.');
}
extract(func_get_arg(1));
if (func_get_arg(2)) {
return include func_get_arg(0);
} else {
return require func_get_arg(0);
}
}
/**
* @param callable $callback
* @return string|null
*/
function h_render($callback)
{
ob_start();
$callback();
$result = ob_get_clean();
if (is_empty($result)) {
$result = null;
}
return $result;
}
/**
* @param object|array $data
Arguments
"/home/farmaboo/domains/underbodyguards.com/public_html/wp-content/themes/wph/views/site/blog/archive/archive.php"
/home/farmaboo/domains/underbodyguards.com/public_html/wp-content/themes/wph/modules/Views/View.php
* @param string $content
* @return string
*/
private function renderLayout($content)
{
$layout = $this->layout instanceof self
? $this->layout
: view($this->layout, null);
$layout->data('content', $content);
return $layout->render();
}
/**
* @return string
*/
public function render()
{
ViewState::beforeRendering($this);
ob_start();
$result = h_perform($this->fullPath, $this->data, false);
$isEmpty = $result === 0;
$content = ob_get_clean();
if (!$isEmpty) {
if (!is_string($content)) {
$content = '';
}
$content = trim($content);
if ($this->isPlain) {
$result = $content;
} else {
$this->setAttributes();
$result = $this->renderElement($content);
}
} else {
$result = '';
}
ViewState::afterRendering();
return $this->layout ? $this->renderLayout($result) : $result;
}
/home/farmaboo/domains/underbodyguards.com/public_html/wp-content/themes/wph/modules/Views/View.php
if (!is_string($content)) {
$content = '';
}
$content = trim($content);
if ($this->isPlain) {
$result = $content;
} else {
$this->setAttributes();
$result = $this->renderElement($content);
}
} else {
$result = '';
}
ViewState::afterRendering();
return $this->layout ? $this->renderLayout($result) : $result;
}
public function print()
{
echo $this->render();
}
public function __toString()
{
return $this->render();
}
}
/home/farmaboo/domains/underbodyguards.com/public_html/wp-content/themes/wph/archive.php
<?php
defined('WPH') or exit;
iife(function () {
if (eh_has_location('archive')) {
view('site/page/theme')
->data('content', eh_location('archive'))
->defaultLayout()
->print();
} else {
view('site/blog/archive')
->defaultLayout()
->data(['query' => wph_the_query()])
->print();
}
});
/home/farmaboo/domains/underbodyguards.com/public_html/wp-content/themes/wph/modules/Helpers/misc.php
}
/**
* @param string|object $class
* @return string
*/
function class_basename($class)
{
$class = is_object($class) ? get_class($class) : $class;
$class = str_replace('\\', '/', $class);
return basename($class);
}
/**
* @param Closure $fn
* @return mixed
*/
function iife(Closure $fn)
{
return $fn();
}
/**
* @param string $base
* @param string ...$parts
* @return string
*/
function h_build_path($base, ...$parts)
{
$result = $base;
foreach ($parts as $part) {
$part = trim($part, '/\\');
$result .= '/' . $part;
}
return $result;
}
/**
* @param string $path
* @param array $data
/home/farmaboo/domains/underbodyguards.com/public_html/wp-content/themes/wph/archive.php
<?php
defined('WPH') or exit;
iife(function () {
if (eh_has_location('archive')) {
view('site/page/theme')
->data('content', eh_location('archive'))
->defaultLayout()
->print();
} else {
view('site/blog/archive')
->defaultLayout()
->data(['query' => wph_the_query()])
->print();
}
});
/home/farmaboo/domains/underbodyguards.com/public_html/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
"/home/farmaboo/domains/underbodyguards.com/public_html/wp-content/themes/wph/archive.php"
/home/farmaboo/domains/underbodyguards.com/public_html/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
"/home/farmaboo/domains/underbodyguards.com/public_html/wp-includes/template-loader.php"
/home/farmaboo/domains/underbodyguards.com/public_html/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 __DIR__ . '/wp-blog-header.php';
Arguments
"/home/farmaboo/domains/underbodyguards.com/public_html/wp-blog-header.php"