/home/mtseagarden/firepit-grill.jp/public_html/wordpress/wp-content/themes/sage/app/View/Composers/Breadcrumb.php
}
}
$str .= '<li class="breadcrumb__item">' . $my_tax->name . '</li>';
} elseif (is_category()) {
$cat = get_queried_object();
$post_type = get_post_type_object($post->post_type);
$str .= '<li class="breadcrumb__item" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"><a class="border-b border-basic b" href="' . get_post_type_archive_link($post->post_type) . '" itemprop="item"><span itemprop="name">' . $post_type->label . '</span></a></li>';
if ($cat->parent != 0) {
$ancestors = array_reverse(get_ancestors($cat->cat_ID, 'category'));
foreach ($ancestors as $ancestor) {
$str .= '<li class="breadcrumb__item" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"><a class="border-b border-basic" href="' . get_category_link($ancestor) . '" itemprop="item"><span itemprop="name">' . get_cat_name($ancestor) . '</span></a></li>';
}
}
$str .= '<li class="breadcrumb__item">' . $cat->name . '</li>';
} elseif (is_post_type_archive()) {
$cpt = get_query_var('post_type');
$str .= '<li class="breadcrumb__item">' . get_post_type_object($cpt)->label . '</li>';
} elseif ($cpt && is_singular($cpt)) {
$taxes = get_object_taxonomies($cpt);
$mytax = $taxes[0];
if(is_singular('exhibitions')) {
$str .= '<li class="breadcrumb__item" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"><a class="border-b border-basic c" href="//kk-ishida.com/exhibition/" itemprop="item"><span itemprop="name">' . get_post_type_object($cpt)->label . '</span></a></li>';
} else {
$str .= '<li class="breadcrumb__item" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"><a class="border-b border-basic c" href="' . get_post_type_archive_link($cpt) . '" itemprop="item"><span itemprop="name">' . get_post_type_object($cpt)->label . '</span></a></li>';
}
$taxes = get_the_terms($post->ID, $mytax) ?: [];
$tax = $this->get_youngest_tax($taxes, $mytax);
if ($tax->parent != 0) {
$ancestors = array_reverse(get_ancestors($tax->term_id, $mytax));
foreach ($ancestors as $ancestor) {
$str .= '<li class="breadcrumb__item" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"><a class="border-b border-basic" href="' . get_term_link($ancestor,
$mytax) . '" itemprop="item"><span itemprop="name">' . get_term($ancestor,
$mytax)->name . '</span></a></li>';
}
}
// if ($mytax) {
// $str .= '<li class="breadcrumb__item" itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a class="border-b border-basic" href="' . get_term_link($tax,
// $mytax) . '" itemprop="item"><span itemprop="name">' . $mytax->name . '</span></a></li>';
// }
Arguments
/home/mtseagarden/firepit-grill.jp/public_html/wordpress/wp-content/themes/sage/app/View/Composers/Breadcrumb.php
}
}
$str .= '<li class="breadcrumb__item">' . $my_tax->name . '</li>';
} elseif (is_category()) {
$cat = get_queried_object();
$post_type = get_post_type_object($post->post_type);
$str .= '<li class="breadcrumb__item" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"><a class="border-b border-basic b" href="' . get_post_type_archive_link($post->post_type) . '" itemprop="item"><span itemprop="name">' . $post_type->label . '</span></a></li>';
if ($cat->parent != 0) {
$ancestors = array_reverse(get_ancestors($cat->cat_ID, 'category'));
foreach ($ancestors as $ancestor) {
$str .= '<li class="breadcrumb__item" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"><a class="border-b border-basic" href="' . get_category_link($ancestor) . '" itemprop="item"><span itemprop="name">' . get_cat_name($ancestor) . '</span></a></li>';
}
}
$str .= '<li class="breadcrumb__item">' . $cat->name . '</li>';
} elseif (is_post_type_archive()) {
$cpt = get_query_var('post_type');
$str .= '<li class="breadcrumb__item">' . get_post_type_object($cpt)->label . '</li>';
} elseif ($cpt && is_singular($cpt)) {
$taxes = get_object_taxonomies($cpt);
$mytax = $taxes[0];
if(is_singular('exhibitions')) {
$str .= '<li class="breadcrumb__item" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"><a class="border-b border-basic c" href="//kk-ishida.com/exhibition/" itemprop="item"><span itemprop="name">' . get_post_type_object($cpt)->label . '</span></a></li>';
} else {
$str .= '<li class="breadcrumb__item" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"><a class="border-b border-basic c" href="' . get_post_type_archive_link($cpt) . '" itemprop="item"><span itemprop="name">' . get_post_type_object($cpt)->label . '</span></a></li>';
}
$taxes = get_the_terms($post->ID, $mytax) ?: [];
$tax = $this->get_youngest_tax($taxes, $mytax);
if ($tax->parent != 0) {
$ancestors = array_reverse(get_ancestors($tax->term_id, $mytax));
foreach ($ancestors as $ancestor) {
$str .= '<li class="breadcrumb__item" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"><a class="border-b border-basic" href="' . get_term_link($ancestor,
$mytax) . '" itemprop="item"><span itemprop="name">' . get_term($ancestor,
$mytax)->name . '</span></a></li>';
}
}
// if ($mytax) {
// $str .= '<li class="breadcrumb__item" itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a class="border-b border-basic" href="' . get_term_link($tax,
// $mytax) . '" itemprop="item"><span itemprop="name">' . $mytax->name . '</span></a></li>';
// }
Arguments
2
"Undefined array key 0"
"/home/mtseagarden/firepit-grill.jp/public_html/wordpress/wp-content/themes/sage/app/View/Composers/Breadcrumb.php"
82
/home/mtseagarden/firepit-grill.jp/public_html/wordpress/wp-content/themes/sage/app/View/Composers/Breadcrumb.php
use Roots\Acorn\View\Composer;
use App\View\Composers\App;
use function App\get_youngest_cat;
use function App\get_youngest_tax;
class Breadcrumb extends Composer
{
/**
* List of views served by this composer.
*
* @var array
*/
protected static $views = [
'*'
];
public function with() {
return [
'breadcrumb' => $this->breadcrumb(),
];
}
public function breadcrumb($args = array()) {
global $post;
$str = '';
$defaults = array(
'class' => "breadcrumb",
'home' => "TOP",
'search' => "の検索結果 ",
'tag' => "",
'author' => "",
'notfound' => "404 Not Found",
);
$args = wp_parse_args($args, $defaults);
extract($args, EXTR_SKIP);
if (!is_home() && !is_front_page() && !is_admin()) {
$str .= '<div class="' . $class . '" >';
/home/mtseagarden/firepit-grill.jp/public_html/wordpress/wp-content/themes/sage/vendor/roots/acorn/src/Roots/Acorn/View/Composer.php
* @param View $view
* @return void
*/
public function compose(View $view)
{
$this->view = $view;
$this->data = new Fluent($view->getData());
$view->with($this->merge());
}
/**
* Data to be merged and passed to the view before rendering.
*
* @return array
*/
protected function merge()
{
return array_merge(
$this->with(),
$this->view->getData(),
$this->override()
);
}
/**
* Data to be passed to view before rendering
*
* @return array
*/
protected function with()
{
return [];
}
/**
* Data to be passed to view before rendering
*
* @return array
*/
/home/mtseagarden/firepit-grill.jp/public_html/wordpress/wp-content/themes/sage/vendor/roots/acorn/src/Roots/Acorn/View/Composer.php
return static::$views;
}
$view = array_slice(explode('\\', static::class), 3);
$view = array_map([Str::class, 'snake'], $view, array_fill(0, count($view), '-'));
return implode('/', $view);
}
/**
* Compose the view before rendering.
*
* @param View $view
* @return void
*/
public function compose(View $view)
{
$this->view = $view;
$this->data = new Fluent($view->getData());
$view->with($this->merge());
}
/**
* Data to be merged and passed to the view before rendering.
*
* @return array
*/
protected function merge()
{
return array_merge(
$this->with(),
$this->view->getData(),
$this->override()
);
}
/**
* Data to be passed to view before rendering
*
* @return array
/home/mtseagarden/firepit-grill.jp/public_html/wordpress/wp-content/themes/sage/vendor/illuminate/view/Concerns/ManagesEvents.php
return $callback;
}
/**
* Build a class based container callback Closure.
*
* @param string $class
* @param string $prefix
* @return \Closure
*/
protected function buildClassEventCallback($class, $prefix)
{
[$class, $method] = $this->parseClassEvent($class, $prefix);
// Once we have the class and method name, we can build the Closure to resolve
// the instance out of the IoC container and call the method on it with the
// given arguments that are passed to the Closure as the composer's data.
return function () use ($class, $method) {
return $this->container->make($class)->{$method}(...func_get_args());
};
}
/**
* Parse a class based composer name.
*
* @param string $class
* @param string $prefix
* @return array
*/
protected function parseClassEvent($class, $prefix)
{
return Str::parseCallback($class, $this->classEventMethodForPrefix($prefix));
}
/**
* Determine the class event method based on the given prefix.
*
* @param string $prefix
* @return string
Arguments
Illuminate\View\View {#2560}
/home/mtseagarden/firepit-grill.jp/public_html/wordpress/wp-content/themes/sage/vendor/illuminate/view/Concerns/ManagesEvents.php
* @param string $prefix
* @return string
*/
protected function classEventMethodForPrefix($prefix)
{
return Str::contains($prefix, 'composing') ? 'compose' : 'create';
}
/**
* Add a listener to the event dispatcher.
*
* @param string $name
* @param \Closure $callback
* @return void
*/
protected function addEventListener($name, $callback)
{
if (Str::contains($name, '*')) {
$callback = function ($name, array $data) use ($callback) {
return $callback($data[0]);
};
}
$this->events->listen($name, $callback);
}
/**
* Call the composer for a given view.
*
* @param \Illuminate\Contracts\View\View $view
* @return void
*/
public function callComposer(ViewContract $view)
{
$this->events->dispatch('composing: '.$view->name(), [$view]);
}
/**
* Call the creator for a given view.
*
Arguments
Illuminate\View\View {#2560}
/home/mtseagarden/firepit-grill.jp/public_html/wordpress/wp-content/themes/sage/vendor/illuminate/events/Dispatcher.php
/**
* Register an event listener with the dispatcher.
*
* @param \Closure|string|array $listener
* @param bool $wildcard
* @return \Closure
*/
public function makeListener($listener, $wildcard = false)
{
if (is_string($listener)) {
return $this->createClassListener($listener, $wildcard);
}
if (is_array($listener) && isset($listener[0]) && is_string($listener[0])) {
return $this->createClassListener($listener, $wildcard);
}
return function ($event, $payload) use ($listener, $wildcard) {
if ($wildcard) {
return $listener($event, $payload);
}
return $listener(...array_values($payload));
};
}
/**
* Create a class based listener using the IoC container.
*
* @param string $listener
* @param bool $wildcard
* @return \Closure
*/
public function createClassListener($listener, $wildcard = false)
{
return function ($event, $payload) use ($listener, $wildcard) {
if ($wildcard) {
return call_user_func($this->createClassCallable($listener), $event, $payload);
}
Arguments
"composing: single"
array:1 [
0 => Illuminate\View\View {#2560}
]
/home/mtseagarden/firepit-grill.jp/public_html/wordpress/wp-content/themes/sage/vendor/illuminate/events/Dispatcher.php
* @param bool $halt
* @return array|null
*/
public function dispatch($event, $payload = [], $halt = false)
{
// When the given "event" is actually an object we will assume it is an event
// object and use the class as the event name and this event itself as the
// payload to the handler, which makes object based events quite simple.
[$event, $payload] = $this->parseEventAndPayload(
$event, $payload
);
if ($this->shouldBroadcast($payload)) {
$this->broadcastEvent($payload[0]);
}
$responses = [];
foreach ($this->getListeners($event) as $listener) {
$response = $listener($event, $payload);
// If a response is returned from the listener and event halting is enabled
// we will just return this response, and not call the rest of the event
// listeners. Otherwise we will add the response on the response list.
if ($halt && ! is_null($response)) {
return $response;
}
// If a boolean false is returned from a listener, we will stop propagating
// the event to any further listeners down in the chain, else we keep on
// looping through the listeners and firing every one in our sequence.
if ($response === false) {
break;
}
$responses[] = $response;
}
return $halt ? null : $responses;
}
Arguments
"composing: single"
array:1 [
0 => Illuminate\View\View {#2560}
]
/home/mtseagarden/firepit-grill.jp/public_html/wordpress/wp-content/themes/sage/vendor/illuminate/view/Concerns/ManagesEvents.php
protected function addEventListener($name, $callback)
{
if (Str::contains($name, '*')) {
$callback = function ($name, array $data) use ($callback) {
return $callback($data[0]);
};
}
$this->events->listen($name, $callback);
}
/**
* Call the composer for a given view.
*
* @param \Illuminate\Contracts\View\View $view
* @return void
*/
public function callComposer(ViewContract $view)
{
$this->events->dispatch('composing: '.$view->name(), [$view]);
}
/**
* Call the creator for a given view.
*
* @param \Illuminate\Contracts\View\View $view
* @return void
*/
public function callCreator(ViewContract $view)
{
$this->events->dispatch('creating: '.$view->name(), [$view]);
}
}
Arguments
"composing: single"
array:1 [
0 => Illuminate\View\View {#2560}
]
/home/mtseagarden/firepit-grill.jp/public_html/wordpress/wp-content/themes/sage/vendor/illuminate/view/View.php
} catch (Throwable $e) {
$this->factory->flushState();
throw $e;
}
}
/**
* Get the contents of the view instance.
*
* @return string
*/
protected function renderContents()
{
// We will keep track of the amount of views being rendered so we can flush
// the section after the complete rendering operation is done. This will
// clear out the sections for any separate views that may be rendered.
$this->factory->incrementRender();
$this->factory->callComposer($this);
$contents = $this->getContents();
// Once we've finished rendering the view, we'll decrement the render count
// so that each sections get flushed out next time a view is created and
// no old sections are staying around in the memory of an environment.
$this->factory->decrementRender();
return $contents;
}
/**
* Get the evaluated contents of the view.
*
* @return string
*/
protected function getContents()
{
return $this->engine->get($this->path, $this->gatherData());
}
Arguments
Illuminate\View\View {#2560}
/home/mtseagarden/firepit-grill.jp/public_html/wordpress/wp-content/themes/sage/vendor/illuminate/view/View.php
$this->view = $view;
$this->path = $path;
$this->engine = $engine;
$this->factory = $factory;
$this->data = $data instanceof Arrayable ? $data->toArray() : (array) $data;
}
/**
* Get the string contents of the view.
*
* @param callable|null $callback
* @return string
*
* @throws \Throwable
*/
public function render(callable $callback = null)
{
try {
$contents = $this->renderContents();
$response = isset($callback) ? $callback($this, $contents) : null;
// Once we have the contents of the view, we will flush the sections if we are
// done rendering all views so that there is nothing left hanging over when
// another view gets rendered in the future by the application developer.
$this->factory->flushStateIfDoneRendering();
return ! is_null($response) ? $response : $contents;
} catch (Throwable $e) {
$this->factory->flushState();
throw $e;
}
}
/**
* Get the contents of the view instance.
*
* @return string
/home/mtseagarden/firepit-grill.jp/public_html/wordpress/wp-content/themes/sage/index.php
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-HRDHS86D9W"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', 'G-HRDHS86D9W');
</script>
</head>
<body <?php body_class(); ?>>
<?php wp_body_open(); ?>
<?php do_action('get_header'); ?>
<div id="app">
<?php echo view(app('sage.view'), app('sage.data'))->render(); ?>
</div>
<?php do_action('get_footer'); ?>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/lazysizes/5.2.0/lazysizes.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/lazysizes/5.2.0/plugins/unveilhooks/ls.unveilhooks.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/slick-carousel@1.8.1/slick/slick.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/wow/1.1.2/wow.min.js"></script>
<script src="<?php echo get_template_directory_uri() ?>/public/editor.js"></script>
<script>
new WOW().init();
</script>
<?php wp_footer(); ?>
</body>
</html>
/home/mtseagarden/firepit-grill.jp/public_html/wordpress/wp-includes/template-loader.php
}
break;
}
}
if ( ! $template ) {
$template = get_index_template();
}
/**
* 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 ) {
include $template;
} elseif ( current_user_can( 'switch_themes' ) ) {
$theme = wp_get_theme();
if ( $theme->errors() ) {
wp_die( $theme->errors() );
}
}
return;
}
Arguments
"/home/mtseagarden/firepit-grill.jp/public_html/wordpress/wp-content/themes/sage/index.php"
/home/mtseagarden/firepit-grill.jp/public_html/wordpress/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/mtseagarden/firepit-grill.jp/public_html/wordpress/wp-includes/template-loader.php"
/home/mtseagarden/firepit-grill.jp/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__ . '/wordpress/wp-blog-header.php';
Arguments
"/home/mtseagarden/firepit-grill.jp/public_html/wordpress/wp-blog-header.php"