/home/farmaboo/domains/underbodyguards.com/public_html/wp-content/themes/wph/modules/Views/ViewFinder.php
$index = strrpos($path, '/');
if ($index !== false) {
return substr($path, $index + 1);
} else {
return $path;
}
}
/**
* @param string $path
* @return ViewLocation
*/
private function handle($path)
{
$baseName = $this->baseName($path);
$directory = "{$this->basePath}/{$path}";
$fullPath = "{$directory}/{$baseName}.php";
if (!h_is_file_exists($fullPath)) {
throw new ViewNotFoundException(
"View '{$path}' not found.",
);
}
$location = new ViewLocation($fullPath, $directory, $baseName);
$this->found[$path] = $location;
return $location;
}
/**
* @param string $path
* @return ViewLocation
*/
public function find($path)
{
return $this->found[$path] ?? $this->handle($path);
}
}
Arguments
"View 'site/shop/product' not found."
/home/farmaboo/domains/underbodyguards.com/public_html/wp-content/themes/wph/modules/Views/ViewFinder.php
$fullPath = "{$directory}/{$baseName}.php";
if (!h_is_file_exists($fullPath)) {
throw new ViewNotFoundException(
"View '{$path}' not found.",
);
}
$location = new ViewLocation($fullPath, $directory, $baseName);
$this->found[$path] = $location;
return $location;
}
/**
* @param string $path
* @return ViewLocation
*/
public function find($path)
{
return $this->found[$path] ?? $this->handle($path);
}
}
/home/farmaboo/domains/underbodyguards.com/public_html/wp-content/themes/wph/modules/Views/ViewFactory.php
* @return string
*/
private function resolve($target, $relative)
{
if (str_contains($target, './')) {
return $this->resolver->resolve($target, $relative);
} else {
return $target;
}
}
/**
* @param string $target
* @param string|null $relative
* @return View
*/
public function provide($target, $relative = null)
{
$path = $this->resolve($target, $relative);
$location = $this->finder->find($path);
return new View(
$path,
$location,
);
}
}
/home/farmaboo/domains/underbodyguards.com/public_html/wp-content/themes/wph/modules/Views/viewsModule.php
<?php
use Modules\Views\View;
use Modules\Views\ViewFactory;
use Modules\Views\ViewFinder;
use Modules\Views\ViewSections;
use Modules\Views\ViewState;
/**
* @param string $target
* @param string|null $relative
* @return View
*/
function view($target, $relative = null)
{
$active = vh_active_view();
if ($active && func_num_args() === 1) {
$relative = $active->path;
}
return vh_factory()->provide($target, $relative);
}
function vh_empty()
{
return 0;
}
/**
* @param string $path
* @return View
*/
function vh_sub($path)
{
$active = vh_active_view();
if (!$active) {
throw new RuntimeException(
'Unable to create sub view outside view rendering',
);
}
return view($active->path . '/' . $path);
/home/farmaboo/domains/underbodyguards.com/public_html/wp-content/themes/wph/woocommerce.php
<?php
defined('WPH') or exit;
iife(function () {
if (is_product()) {
view('site/shop/product')
->defaultLayout()
->print();
} else {
view('site/shop/catalog')
->defaultLayout()
->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/woocommerce.php
<?php
defined('WPH') or exit;
iife(function () {
if (is_product()) {
view('site/shop/product')
->defaultLayout()
->print();
} else {
view('site/shop/catalog')
->defaultLayout()
->print();
}
});
/home/farmaboo/domains/underbodyguards.com/public_html/wp-includes/template-loader.php
/**
* Filters the path of the current template before including it.
*
* @since 3.0.0
*
* @param string $template The path of the template to include.
*/
$template = apply_filters( 'template_include', $template );
if ( $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/woocommerce.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"