/sites/localhost/html/public/app/themes/247able-theme/resources/views/product/summary.php
<div class="summaryBlock js-configurable-product-bind">
<h5 class="redHead"><?php _e('Summary', '247able'); ?></h5>
<ul class="no-bullet">
<?php
$cat_count = sizeof( get_the_terms( $product->get_id(), 'product_cat' ) );
$tag_count = sizeof( get_the_terms( $product->get_id(), 'product_tag' ) );
?>
<?php echo get_the_term_list_by_args( $product->get_id(), 'product_brand', function($term) { return ! $term->parent; }, '<li>' . _n( 'Brand:', 'Brands:', $cat_count, '247able' ) . ' ', ', ', '</li>' ); ?>
<?php echo $product->get_categories( ', ', '<li>' . _n( 'Category:', 'Categories:', $cat_count, '247able' ) . ' ', '</li>' ); ?>
<?php echo $product->get_tags( ', ', '<li>' . _n( 'Tag:', 'Tags:', $tag_count, '247able' ) . ' ', '</li>' ); ?>
<li class="product-sku"><?php _e( 'Part Number:', '247able' ); ?>
<span itemprop="sku" <?php echo $product->is_type('configurable') ? 'rv-text="product:sku"' : ''; ?>>
<?php echo ( $sku = $product->get_sku() ) ? $sku : ''; ?>
</span>
</li>
<?php if($product->get_weight()) : ?>
<li class="product-weight"><?php _e( 'Packaged Weight:', '247able' ); ?>
<span itemprop="weight" <?php echo $product->is_type('configurable') ? 'rv-text="product:weight"' : ''; ?>>
<?php echo $product->get_weight(); ?>
</span>
<span><?php echo strtoupper(get_option('woocommerce_weight_unit')); ?></span>
Arguments
"sizeof(): Argument #1 ($value) must be of type Countable|array, false given"
/sites/localhost/html/vendor/illuminate/filesystem/Filesystem.php
/**
* Get the returned value of a file.
*
* @param string $path
* @param array $data
* @return mixed
*
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
*/
public function getRequire($path, array $data = [])
{
if ($this->isFile($path)) {
$__path = $path;
$__data = $data;
return (static function () use ($__path, $__data) {
extract($__data, EXTR_SKIP);
return require $__path;
})();
}
throw new FileNotFoundException("File does not exist at path {$path}.");
}
/**
* Require the given file once.
*
* @param string $path
* @param array $data
* @return mixed
*
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
*/
public function requireOnce($path, array $data = [])
{
if ($this->isFile($path)) {
$__path = $path;
$__data = $data;
/sites/localhost/html/vendor/illuminate/filesystem/Filesystem.php
/**
* Get the returned value of a file.
*
* @param string $path
* @param array $data
* @return mixed
*
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
*/
public function getRequire($path, array $data = [])
{
if ($this->isFile($path)) {
$__path = $path;
$__data = $data;
return (static function () use ($__path, $__data) {
extract($__data, EXTR_SKIP);
return require $__path;
})();
}
throw new FileNotFoundException("File does not exist at path {$path}.");
}
/**
* Require the given file once.
*
* @param string $path
* @param array $data
* @return mixed
*
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
*/
public function requireOnce($path, array $data = [])
{
if ($this->isFile($path)) {
$__path = $path;
$__data = $data;
/sites/localhost/html/vendor/illuminate/view/Engines/PhpEngine.php
}
/**
* Get the evaluated contents of the view at the given path.
*
* @param string $path
* @param array $data
* @return string
*/
protected function evaluatePath($path, $data)
{
$obLevel = ob_get_level();
ob_start();
// We'll evaluate the contents of the view inside a try/catch block so we can
// flush out any stray output that might get out before an error occurs or
// an exception is thrown. This prevents any partial views from leaking.
try {
$this->files->getRequire($path, $data);
} catch (Throwable $e) {
$this->handleViewException($e, $obLevel);
}
return ltrim(ob_get_clean());
}
/**
* Handle a view exception.
*
* @param \Throwable $e
* @param int $obLevel
* @return void
*
* @throws \Throwable
*/
protected function handleViewException(Throwable $e, $obLevel)
{
while (ob_get_level() > $obLevel) {
ob_end_clean();
/sites/localhost/html/vendor/illuminate/view/Engines/PhpEngine.php
* Create a new file engine instance.
*
* @param \Illuminate\Filesystem\Filesystem $files
* @return void
*/
public function __construct(Filesystem $files)
{
$this->files = $files;
}
/**
* Get the evaluated contents of the view.
*
* @param string $path
* @param array $data
* @return string
*/
public function get($path, array $data = [])
{
return $this->evaluatePath($path, $data);
}
/**
* Get the evaluated contents of the view at the given path.
*
* @param string $path
* @param array $data
* @return string
*/
protected function evaluatePath($path, $data)
{
$obLevel = ob_get_level();
ob_start();
// We'll evaluate the contents of the view inside a try/catch block so we can
// flush out any stray output that might get out before an error occurs or
// an exception is thrown. This prevents any partial views from leaking.
try {
$this->files->getRequire($path, $data);
/sites/localhost/html/vendor/illuminate/view/View.php
$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());
}
/**
* Get the data bound to the view instance.
*
* @return array
*/
public function gatherData()
{
$data = array_merge($this->factory->getShared(), $this->data);
foreach ($data as $key => $value) {
if ($value instanceof Renderable) {
$data[$key] = $value->render();
}
}
return $data;
}
/sites/localhost/html/vendor/illuminate/view/View.php
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());
}
/**
/sites/localhost/html/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
/sites/localhost/html/vendor/wp-kit/utils/helpers.php
}
if ( ! function_exists('view') ) {
/**
* Helper function to build views.
*
* @param string $view The view relative path, name.
* @param array $data Passed data.
* @param array $mergeData
*
* @return string
*/
function view($view = null, array $data = [], array $mergeData = [])
{
$factory = app('view');
if (func_num_args() === 0) {
return $factory;
}
return $factory->make($view, $data, $mergeData)->render();
}
}
/*----------------------------------------------*\
#PATHS
\*----------------------------------------------*/
if( ! function_exists('resources_path') ) {
/**
* Gets the resources path
*
* @return string
*/
function resources_path($path = '', $file = '')
{
if( function_exists('themosis_path') ) {
$root = themosis_path('theme.resources');
} else {
/sites/localhost/html/public/app/themes/247able-theme/resources/widgets/ProductSummaryWidget.php
class ProductSummaryWidget extends WC_Widget {
public function __construct() {
$this->widget_cssclass = 'woocommerce wc_product_summary';
$this->widget_description = __( 'WooCommerce Product Summary', 'woocommerce' );
$this->widget_id = 'wc_product_summary';
$this->widget_name = __( 'WooCommerce Product Summary', 'woocommerce' );
parent::__construct();
}
public function widget( $args, $instance ) {
global $product;
if(!$product)
return;
$this->widget_start( $args, $instance );
echo view( 'product/summary', compact( 'product' ) );
$this->widget_end( $args );
}
public function update( $new_instance, $old_instance ) {
// Save widget options
}
public function form( $instance ) {
// Output admin widget options form
}
}
/sites/localhost/html/public/wp/wp-includes/class-wp-widget.php
* Returning false will effectively short-circuit display of the widget.
*
* @since 2.8.0
*
* @param array $instance The current widget instance's settings.
* @param WP_Widget $widget The current widget instance.
* @param array $args An array of default widget arguments.
*/
$instance = apply_filters( 'widget_display_callback', $instance, $this, $args );
if ( false === $instance ) {
return;
}
$was_cache_addition_suspended = wp_suspend_cache_addition();
if ( $this->is_preview() && ! $was_cache_addition_suspended ) {
wp_suspend_cache_addition( true );
}
$this->widget( $args, $instance );
if ( $this->is_preview() ) {
wp_suspend_cache_addition( $was_cache_addition_suspended );
}
}
}
/**
* Handles changed settings (Do NOT override).
*
* @since 2.8.0
*
* @global array $wp_registered_widgets
*
* @param int $deprecated Not used.
*/
public function update_callback( $deprecated = 1 ) {
global $wp_registered_widgets;
$all_instances = $this->get_settings();
/sites/localhost/html/public/wp/wp-includes/widgets.php
*
* @param array $widget {
* An associative array of widget arguments.
*
* @type string $name Name of the widget.
* @type string $id Widget ID.
* @type callable $callback When the hook is fired on the front end, `$callback` is an array
* containing the widget object. Fired on the back end, `$callback`
* is 'wp_widget_control', see `$_callback`.
* @type array $params An associative array of multi-widget arguments.
* @type string $classname CSS class applied to the widget container.
* @type string $description The widget description.
* @type array $_callback When the hook is fired on the back end, `$_callback` is populated
* with an array containing the widget object, see `$callback`.
* }
*/
do_action( 'dynamic_sidebar', $wp_registered_widgets[ $id ] );
if ( is_callable( $callback ) ) {
call_user_func_array( $callback, $params );
$did_one = true;
}
}
if ( ! is_admin() && ! empty( $sidebar['after_sidebar'] ) ) {
echo $sidebar['after_sidebar'];
}
/**
* Fires after widgets are rendered in a dynamic sidebar.
*
* Note: The action also fires for empty sidebars, and on both the front end
* and back end, including the Inactive Widgets sidebar on the Widgets screen.
*
* @since 3.9.0
*
* @param int|string $index Index, name, or ID of the dynamic sidebar.
* @param bool $has_widgets Whether the sidebar is populated with widgets.
* Default true.
*/
/sites/localhost/html/public/app/themes/247able-theme/resources/views/product/single.php
/**
* woocommerce_single_product_summary hook
*
* @hooked woocommerce_template_single_title - 5
* @hooked woocommerce_template_single_rating - 10
* @hooked woocommerce_template_single_excerpt - 20
* @hooked woocommerce_template_single_sharing - 50
*/
do_action( 'woocommerce_single_product_summary' );
?>
</div>
<div class="small-12 medium-12 large-offset-0 large-3 columns">
<div class="widgets">
<?php dynamic_sidebar('Product Sidebar'); ?>
</div>
</div>
</div>
<?php woocommerce_output_product_data_tabs(); ?>
</article>
<?php
/**
* woocommerce_after_single_product_summary hook
*
* @hooked woocommerce_output_related_products - 20
*/
do_action( 'woocommerce_after_single_product_summary' );
?>
/sites/localhost/html/vendor/illuminate/filesystem/Filesystem.php
/**
* Get the returned value of a file.
*
* @param string $path
* @param array $data
* @return mixed
*
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
*/
public function getRequire($path, array $data = [])
{
if ($this->isFile($path)) {
$__path = $path;
$__data = $data;
return (static function () use ($__path, $__data) {
extract($__data, EXTR_SKIP);
return require $__path;
})();
}
throw new FileNotFoundException("File does not exist at path {$path}.");
}
/**
* Require the given file once.
*
* @param string $path
* @param array $data
* @return mixed
*
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
*/
public function requireOnce($path, array $data = [])
{
if ($this->isFile($path)) {
$__path = $path;
$__data = $data;
Arguments
"/sites/localhost/html/public/app/themes/247able-theme/resources/views/product/single.php"
/sites/localhost/html/vendor/illuminate/filesystem/Filesystem.php
/**
* Get the returned value of a file.
*
* @param string $path
* @param array $data
* @return mixed
*
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
*/
public function getRequire($path, array $data = [])
{
if ($this->isFile($path)) {
$__path = $path;
$__data = $data;
return (static function () use ($__path, $__data) {
extract($__data, EXTR_SKIP);
return require $__path;
})();
}
throw new FileNotFoundException("File does not exist at path {$path}.");
}
/**
* Require the given file once.
*
* @param string $path
* @param array $data
* @return mixed
*
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
*/
public function requireOnce($path, array $data = [])
{
if ($this->isFile($path)) {
$__path = $path;
$__data = $data;
/sites/localhost/html/vendor/illuminate/view/Engines/PhpEngine.php
}
/**
* Get the evaluated contents of the view at the given path.
*
* @param string $path
* @param array $data
* @return string
*/
protected function evaluatePath($path, $data)
{
$obLevel = ob_get_level();
ob_start();
// We'll evaluate the contents of the view inside a try/catch block so we can
// flush out any stray output that might get out before an error occurs or
// an exception is thrown. This prevents any partial views from leaking.
try {
$this->files->getRequire($path, $data);
} catch (Throwable $e) {
$this->handleViewException($e, $obLevel);
}
return ltrim(ob_get_clean());
}
/**
* Handle a view exception.
*
* @param \Throwable $e
* @param int $obLevel
* @return void
*
* @throws \Throwable
*/
protected function handleViewException(Throwable $e, $obLevel)
{
while (ob_get_level() > $obLevel) {
ob_end_clean();
/sites/localhost/html/vendor/illuminate/view/Engines/PhpEngine.php
* Create a new file engine instance.
*
* @param \Illuminate\Filesystem\Filesystem $files
* @return void
*/
public function __construct(Filesystem $files)
{
$this->files = $files;
}
/**
* Get the evaluated contents of the view.
*
* @param string $path
* @param array $data
* @return string
*/
public function get($path, array $data = [])
{
return $this->evaluatePath($path, $data);
}
/**
* Get the evaluated contents of the view at the given path.
*
* @param string $path
* @param array $data
* @return string
*/
protected function evaluatePath($path, $data)
{
$obLevel = ob_get_level();
ob_start();
// We'll evaluate the contents of the view inside a try/catch block so we can
// flush out any stray output that might get out before an error occurs or
// an exception is thrown. This prevents any partial views from leaking.
try {
$this->files->getRequire($path, $data);
/sites/localhost/html/vendor/illuminate/view/View.php
$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());
}
/**
* Get the data bound to the view instance.
*
* @return array
*/
public function gatherData()
{
$data = array_merge($this->factory->getShared(), $this->data);
foreach ($data as $key => $value) {
if ($value instanceof Renderable) {
$data[$key] = $value->render();
}
}
return $data;
}
/sites/localhost/html/vendor/illuminate/view/View.php
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());
}
/**
/sites/localhost/html/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
/sites/localhost/html/vendor/wp-kit/utils/helpers.php
}
if ( ! function_exists('view') ) {
/**
* Helper function to build views.
*
* @param string $view The view relative path, name.
* @param array $data Passed data.
* @param array $mergeData
*
* @return string
*/
function view($view = null, array $data = [], array $mergeData = [])
{
$factory = app('view');
if (func_num_args() === 0) {
return $factory;
}
return $factory->make($view, $data, $mergeData)->render();
}
}
/*----------------------------------------------*\
#PATHS
\*----------------------------------------------*/
if( ! function_exists('resources_path') ) {
/**
* Gets the resources path
*
* @return string
*/
function resources_path($path = '', $file = '')
{
if( function_exists('themosis_path') ) {
$root = themosis_path('theme.resources');
} else {
/sites/localhost/html/public/app/themes/247able-theme/woocommerce/content-single-product.php
}
}
wp_reset_query();
query_posts($args);
$args = compact('product', 'featured');
echo view( 'shop/product-index', $args );
wp_reset_query();
break;
default :
echo view( 'product/single', compact( 'product' ) );
wp_reset_query();
break;
}
/sites/localhost/html/public/wp/wp-includes/template.php
if ( isset( $s ) ) {
$s = esc_attr( $s );
}
/**
* Fires before a template file is loaded.
*
* @since 6.1.0
*
* @param string $_template_file The full path to the template file.
* @param bool $load_once Whether to require_once or require.
* @param array $args Additional arguments passed to the template.
*/
do_action( 'wp_before_load_template', $_template_file, $load_once, $args );
if ( $load_once ) {
require_once $_template_file;
} else {
require $_template_file;
}
/**
* Fires after a template file is loaded.
*
* @since 6.1.0
*
* @param string $_template_file The full path to the template file.
* @param bool $load_once Whether to require_once or require.
* @param array $args Additional arguments passed to the template.
*/
do_action( 'wp_after_load_template', $_template_file, $load_once, $args );
}
Arguments
"/sites/localhost/html/public/app/themes/247able-theme/woocommerce/content-single-product.php"
/sites/localhost/html/public/app/plugins/woocommerce/includes/wc-core-functions.php
"{$slug}.php",
WC()->template_path() . "{$slug}.php",
)
);
}
// Don't cache the absolute path so that it can be shared between web servers with different paths.
$cache_path = wc_tokenize_path( $template, wc_get_path_define_tokens() );
wc_set_template_cache( $cache_key, $cache_path );
} else {
// Make sure that the absolute path to the template is resolved.
$template = wc_untokenize_path( $template, wc_get_path_define_tokens() );
}
// Allow 3rd party plugins to filter template file from their plugin.
$template = apply_filters( 'wc_get_template_part', $template, $slug, $name );
if ( $template ) {
load_template( $template, false );
}
}
/**
* Get other templates (e.g. product attributes) passing attributes and including the file.
*
* @param string $template_name Template name.
* @param array $args Arguments. (default: array).
* @param string $template_path Template path. (default: '').
* @param string $default_path Default path. (default: '').
*/
function wc_get_template( $template_name, $args = array(), $template_path = '', $default_path = '' ) {
$cache_key = sanitize_key( implode( '-', array( 'template', $template_name, $template_path, $default_path, Constants::get_constant( 'WC_VERSION' ) ) ) );
$template = (string) wp_cache_get( $cache_key, 'woocommerce' );
if ( ! $template ) {
$template = wc_locate_template( $template_name, $template_path, $default_path );
// Don't cache the absolute path so that it can be shared between web servers with different paths.
$cache_path = wc_tokenize_path( $template, wc_get_path_define_tokens() );
/sites/localhost/html/public/app/plugins/woocommerce/templates/single-product.php
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
get_header( 'shop' ); ?>
<?php
/**
* woocommerce_before_main_content hook.
*
* @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content)
* @hooked woocommerce_breadcrumb - 20
*/
do_action( 'woocommerce_before_main_content' );
?>
<?php while ( have_posts() ) : ?>
<?php the_post(); ?>
<?php wc_get_template_part( 'content', 'single-product' ); ?>
<?php endwhile; // end of the loop. ?>
<?php
/**
* woocommerce_after_main_content hook.
*
* @hooked woocommerce_output_content_wrapper_end - 10 (outputs closing divs for the content)
*/
do_action( 'woocommerce_after_main_content' );
?>
<?php
/**
* woocommerce_sidebar hook.
*
* @hooked woocommerce_get_sidebar - 10
*/
do_action( 'woocommerce_sidebar' );
?>
/sites/localhost/html/public/wp/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
"/sites/localhost/html/public/app/plugins/woocommerce/templates/single-product.php"
/sites/localhost/html/public/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
"/sites/localhost/html/public/wp/wp-includes/template-loader.php"
/sites/localhost/html/public/index.php
<?php
$GLOBALS['START_TIME'] = floatval(microtime(true));
/** WordPress view bootstrapper */
define('WP_USE_THEMES', true);
require __DIR__ . '/wp/wp-blog-header.php';
Arguments
"/sites/localhost/html/public/wp/wp-blog-header.php"