/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/themes/ctasc-2017/views/archives/archive-expert_answers.twig.html
{% for category in post.terms('category') %}
<a href="{{ category.link }}" style="padding-right:5px;color: gray;"
class="ctasc-category-link" title="{{ category.title }}">{{ category.title }}</a>
{% endfor %}
{% endif %}
</div>
<div class="box-text text-left">
<h3 class="post-title" style="margin-bottom:10px;"><a href="{{post.link}}">{{post.post_title}}</a></h3>
<p class="byline" style="margin-bottom:10px;text-transform: uppercase;font-size: 70%;color: gray;">
<img itemprop="image" alt="Donato Pompo" src="{{post.custom.gravatar}}"
class="avatar avatar-25 photo" height="25" width="25" style="margin-right:15px;border-radius: 50%;">
<a href="{{post.author.link}}">{{post.author.name}}</a> · {{ post.date | date('M jS, Y') }}
</p>
<div class="box-text-inner blog-post-inner" >
<p>{{post.answer|truncate(35)}}</p>
[button size="small" style="primary" text="Read More" link="{{post.link}}" target=""]
</div>
</div>
<!-- include sharemore -->
</div>
</a>
</div>
</div>
{% endfor %}
</div>
<div style="clear:both;"></div>
Arguments
"An exception has been thrown during the rendering of a template ("strip_tags() expects parameter 1 to be string, array given")."
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/plugins/timber-library/lib/TextHelper.php
/**
*
*
* @param string $text
* @param int $num_words
* @param string|null|false $more text to appear in "Read more...". Null to use default, false to hide
* @param string $allowed_tags
* @return string
*/
public static function trim_words( $text, $num_words = 55, $more = null, $allowed_tags = 'p a span b i br blockquote' ) {
if ( null === $more ) {
$more = __('…');
}
$original_text = $text;
$allowed_tags_array = explode(' ', apply_filters('timber/trim_words/allowed_tags', $allowed_tags));
$allowed_tags_array = array_filter($allowed_tags_array, function($value) { return $value !== ''; });
$allowed_tag_string = '<'.implode('><', $allowed_tags_array).'>';
$text = strip_tags($text, $allowed_tag_string);
/* translators: If your word count is based on single characters (East Asian characters), enter 'characters'. Otherwise, enter 'words'. Do not translate into your own language. */
if ( 'characters' == _x('words', 'word count: words or characters?') && preg_match('/^utf\-?8$/i', get_option('blog_charset')) ) {
$text = trim(preg_replace("/[\n\r\t ]+/", ' ', $text), ' ');
preg_match_all('/./u', $text, $words_array);
$words_array = array_slice($words_array[0], 0, $num_words + 1);
$sep = '';
} else {
$words_array = preg_split("/[\n\r\t ]+/", $text, $num_words + 1, PREG_SPLIT_NO_EMPTY);
$sep = ' ';
}
if ( count($words_array) > $num_words ) {
array_pop($words_array);
$text = implode($sep, $words_array);
$text = $text.$more;
} else {
$text = implode($sep, $words_array);
}
$text = self::close_tags($text);
return apply_filters('wp_trim_words', $text, $num_words, $more, $original_text);
}
Arguments
"strip_tags() expects parameter 1 to be string, array given"
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/plugins/timber-library/lib/TextHelper.php
/**
*
*
* @param string $text
* @param int $num_words
* @param string|null|false $more text to appear in "Read more...". Null to use default, false to hide
* @param string $allowed_tags
* @return string
*/
public static function trim_words( $text, $num_words = 55, $more = null, $allowed_tags = 'p a span b i br blockquote' ) {
if ( null === $more ) {
$more = __('…');
}
$original_text = $text;
$allowed_tags_array = explode(' ', apply_filters('timber/trim_words/allowed_tags', $allowed_tags));
$allowed_tags_array = array_filter($allowed_tags_array, function($value) { return $value !== ''; });
$allowed_tag_string = '<'.implode('><', $allowed_tags_array).'>';
$text = strip_tags($text, $allowed_tag_string);
/* translators: If your word count is based on single characters (East Asian characters), enter 'characters'. Otherwise, enter 'words'. Do not translate into your own language. */
if ( 'characters' == _x('words', 'word count: words or characters?') && preg_match('/^utf\-?8$/i', get_option('blog_charset')) ) {
$text = trim(preg_replace("/[\n\r\t ]+/", ' ', $text), ' ');
preg_match_all('/./u', $text, $words_array);
$words_array = array_slice($words_array[0], 0, $num_words + 1);
$sep = '';
} else {
$words_array = preg_split("/[\n\r\t ]+/", $text, $num_words + 1, PREG_SPLIT_NO_EMPTY);
$sep = ' ';
}
if ( count($words_array) > $num_words ) {
array_pop($words_array);
$text = implode($sep, $words_array);
$text = $text.$more;
} else {
$text = implode($sep, $words_array);
}
$text = self::close_tags($text);
return apply_filters('wp_trim_words', $text, $num_words, $more, $original_text);
}
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/plugins/timber-library/lib/Twig.php
$twig->addFilter(new Twig_Filter('list', array($this, 'add_list_separators')));
$twig->addFilter(new Twig_Filter('pluck', array('Timber\Helper', 'pluck')));
/**
* @deprecated since 1.13 (to be removed in 2.0). Use Twig's native filter filter instead
* @todo remove this in 2.x so that filter merely passes to Twig's filter without any modification
* @ticket #1594 #2120
*/
$twig->addFilter(new Twig_Filter('filter', array('Timber\Helper', 'filter_array')));
$twig->addFilter(new Twig_Filter('wp_list_filter', array('Timber\Helper', 'wp_list_filter')));
$twig->addFilter(new Twig_Filter('relative', function( $link ) {
return URLHelper::get_rel_url($link, true);
} ));
$twig->addFilter(new Twig_Filter('date', array($this, 'intl_date')));
$twig->addFilter(new Twig_Filter('truncate', function( $text, $len ) {
return TextHelper::trim_words($text, $len);
} ));
/* actions and filters */
$twig->addFilter(new Twig_Filter('apply_filters', function() {
$args = func_get_args();
$tag = current(array_splice($args, 1, 1));
return apply_filters_ref_array($tag, $args);
} ));
return $twig;
}
/**
* Adds escapers to Twig.
*
* @param \Twig\Environment $twig The Twig Environment.
* @return \Twig\Environment
*/
public function add_timber_escapers( $twig ) {
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/plugins/timber-library/vendor/twig/twig/src/Environment.php
} else {
$source = $loader->getSourceContext($name);
}
$content = $this->compileSource($source);
if ($this->bcWriteCacheFile) {
$this->writeCacheFile($key, $content);
} else {
$this->cache->write($key, $content);
$this->cache->load($key);
}
if (!class_exists($mainCls, false)) {
/* Last line of defense if either $this->bcWriteCacheFile was used,
* $this->cache is implemented as a no-op or we have a race condition
* where the cache was cleared between the above calls to write to and load from
* the cache.
*/
eval('?>'.$content);
}
}
if (!class_exists($cls, false)) {
throw new RuntimeError(sprintf('Failed to load Twig template "%s", index "%s": cache might be corrupted.', $name, $index), -1, $source);
}
}
if (!$this->runtimeInitialized) {
$this->initRuntime();
}
return $this->loadedTemplates[$cls] = new $cls($this);
}
/**
* Creates a template from source.
*
* This method should not be used as a generic way to load templates.
*
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/plugins/timber-library/vendor/twig/twig/src/Template.php
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
} catch (\Throwable $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
}
return ob_get_clean();
}
protected function displayWithErrorHandling(array $context, array $blocks = [])
{
try {
$this->doDisplay($context, $blocks);
} catch (Error $e) {
if (!$e->getSourceContext()) {
$e->setSourceContext($this->getSourceContext());
}
// this is mostly useful for \Twig\Error\LoaderError exceptions
// see \Twig\Error\LoaderError
if (-1 === $e->getTemplateLine()) {
$e->guess();
}
throw $e;
} catch (\Exception $e) {
$e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
$e->guess();
throw $e;
}
}
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/plugins/timber-library/vendor/twig/twig/src/Template.php
{
return $this;
}
/**
* Returns all blocks.
*
* This method is for internal use only and should never be called
* directly.
*
* @return array An array of blocks
*/
public function getBlocks()
{
return $this->blocks;
}
public function display(array $context, array $blocks = [])
{
$this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
}
public function render(array $context)
{
$level = ob_get_level();
if ($this->env->isDebug()) {
ob_start();
} else {
ob_start(function () { return ''; });
}
try {
$this->display($context);
} catch (\Exception $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
} catch (\Throwable $e) {
while (ob_get_level() > $level) {
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/plugins/timber-library/vendor/twig/twig/src/Template.php
public function getBlocks()
{
return $this->blocks;
}
public function display(array $context, array $blocks = [])
{
$this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
}
public function render(array $context)
{
$level = ob_get_level();
if ($this->env->isDebug()) {
ob_start();
} else {
ob_start(function () { return ''; });
}
try {
$this->display($context);
} catch (\Exception $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
} catch (\Throwable $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
}
return ob_get_clean();
}
protected function displayWithErrorHandling(array $context, array $blocks = [])
{
try {
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/plugins/timber-library/vendor/twig/twig/src/TemplateWrapper.php
* @internal
*/
public function __construct(Environment $env, Template $template)
{
$this->env = $env;
$this->template = $template;
}
/**
* Renders the template.
*
* @param array $context An array of parameters to pass to the template
*
* @return string The rendered template
*/
public function render($context = [])
{
// using func_get_args() allows to not expose the blocks argument
// as it should only be used by internal code
return $this->template->render($context, \func_num_args() > 1 ? func_get_arg(1) : []);
}
/**
* Displays the template.
*
* @param array $context An array of parameters to pass to the template
*/
public function display($context = [])
{
// using func_get_args() allows to not expose the blocks argument
// as it should only be used by internal code
$this->template->display($context, \func_num_args() > 1 ? func_get_arg(1) : []);
}
/**
* Checks if a block is defined.
*
* @param string $name The block name
* @param array $context An array of parameters to pass to the template
*
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/plugins/timber-library/lib/Loader.php
$key = null;
$output = false;
if ( false !== $expires ) {
ksort($data);
$key = md5($file.json_encode($data));
$output = $this->get_cache($key, self::CACHEGROUP, $cache_mode);
}
if ( false === $output || null === $output ) {
$twig = $this->get_twig();
if ( strlen($file) ) {
$loader = $this->get_loader();
$result = $loader->getCacheKey($file);
do_action('timber_loader_render_file', $result);
}
$data = apply_filters('timber_loader_render_data', $data);
$data = apply_filters('timber/loader/render_data', $data, $file);
$template = $twig->load($file);
$output = $template->render($data);
}
if ( false !== $output && false !== $expires && null !== $key ) {
$this->delete_cache();
$this->set_cache($key, $output, self::CACHEGROUP, $expires, $cache_mode);
}
$output = apply_filters('timber_output', $output);
return apply_filters('timber/output', $output, $data, $file);
}
protected function delete_cache() {
Cleaner::delete_transients();
}
/**
* Get first existing template.
*
* @param array|string $templates Name(s) of the Twig template(s) to choose from.
* @return string|bool Name of chosen template, otherwise false.
*/
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/plugins/timber-library/lib/Timber.php
if ( $via_render ) {
$file = apply_filters('timber_render_file', $file);
} else {
$file = apply_filters('timber_compile_file', $file);
}
$output = false;
if ($file !== false) {
if ( is_null($data) ) {
$data = array();
}
if ( $via_render ) {
$data = apply_filters('timber_render_data', $data);
} else {
$data = apply_filters('timber_compile_data', $data);
}
$output = $loader->render($file, $data, $expires, $cache_mode);
} else {
if ( is_array($filenames) ) {
$filenames = implode(", ", $filenames);
}
Helper::error_log( 'Error loading your template files: '.$filenames.'. Make sure one of these files exists.' );
}
do_action('timber_compile_done');
return $output;
}
/**
* Compile a string.
*
* @api
* @example
* ```php
* $data = array(
* 'username' => 'Jane Doe',
* );
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/plugins/timber-library/lib/Timber.php
$twig = $dummy_loader->get_twig();
$template = $twig->createTemplate($string);
return $template->render($data);
}
/**
* Fetch function.
*
* @api
* @param array|string $filenames Name of the Twig file to render. If this is an array of files, Timber will
* render the first file that exists.
* @param array $data Optional. An array of data to use in Twig template.
* @param bool|int $expires Optional. In seconds. Use false to disable cache altogether. When passed an
* array, the first value is used for non-logged in visitors, the second for users.
* Default false.
* @param string $cache_mode Optional. Any of the cache mode constants defined in TimberLoader.
* @return bool|string The returned output.
*/
public static function fetch( $filenames, $data = array(), $expires = false, $cache_mode = Loader::CACHE_USE_DEFAULT ) {
$output = self::compile($filenames, $data, $expires, $cache_mode, true);
$output = apply_filters('timber_compile_result', $output);
return $output;
}
/**
* Render function.
*
* Passes data to a Twig file and echoes the output.
*
* @api
* @example
* ```php
* $context = Timber::context();
*
* Timber::render( 'index.twig', $context );
* ```
* @param array|string $filenames Name of the Twig file to render. If this is an array of files, Timber will
* render the first file that exists.
* @param array $data Optional. An array of data to use in Twig template.
* @param bool|int $expires Optional. In seconds. Use false to disable cache altogether. When passed an
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/plugins/timber-library/lib/Timber.php
* Passes data to a Twig file and echoes the output.
*
* @api
* @example
* ```php
* $context = Timber::context();
*
* Timber::render( 'index.twig', $context );
* ```
* @param array|string $filenames Name of the Twig file to render. If this is an array of files, Timber will
* render the first file that exists.
* @param array $data Optional. An array of data to use in Twig template.
* @param bool|int $expires Optional. In seconds. Use false to disable cache altogether. When passed an
* array, the first value is used for non-logged in visitors, the second for users.
* Default false.
* @param string $cache_mode Optional. Any of the cache mode constants defined in TimberLoader.
* @return bool|string The echoed output.
*/
public static function render( $filenames, $data = array(), $expires = false, $cache_mode = Loader::CACHE_USE_DEFAULT ) {
$output = self::fetch($filenames, $data, $expires, $cache_mode);
echo $output;
return $output;
}
/**
* Render a string with Twig variables.
*
* @api
* @example
* ```php
* $data = array(
* 'username' => 'Jane Doe',
* );
*
* Timber::render_string( 'Hi {{ username }}, I’m a string with a custom Twig variable', $data );
* ```
* @param string $string A string with Twig variables.
* @param array $data An array of data to use in Twig template.
* @return bool|string
*/
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/themes/ctasc-2017/archive-common.php
// Pagination
ob_start();
flatsome_posts_pagination();
$context['pagination'] = ob_get_contents();
ob_end_clean();
if ( file_exists($tpath) ) {
$context['tpath'] = $tpath;
// Debugging data
ob_start();
d( $context );
$context['debug'] = ob_end_clean();
ob_start();
Timber::render( $tpath, $context );
$out = ob_get_contents();
ob_end_clean();
print do_shortcode( $out );
} else {
$context['missing_page'] = $tpath;
ob_start();
Timber::render_string( __fallback_404(), $context );
$out = ob_get_contents();
ob_end_clean();
print do_shortcode( $out );
}
// ------
// Flatsome likes this.
do_action('flatsome_after_blog');
// Standard WordPress footer
get_footer();
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/themes/ctasc-2017/archive-expert_answers.php
<?php
/**
* The STARTER Template for displaying all single posts - modified for flatsome
*
* Methods for TimberHelper can be found in the /lib sub-directory
*
* @package WordPress
* @subpackage Timber
* @since Timber 0.1
*/
// Let the common single handle this.
$tpath = __DIR__ . '/archive-common.php';
include_once( $tpath );
?>
Arguments
"/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/themes/ctasc-2017/archive-common.php"
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-includes/template.php
if ( is_array( $wp_query->query_vars ) ) {
/*
* This use of extract() cannot be removed. There are many possible ways that
* templates could depend on variables that it creates existing, and no way to
* detect and deprecate it.
*
* Passing the EXTR_SKIP flag is the safest option, ensuring globals and
* function variables cannot be overwritten.
*/
// phpcs:ignore WordPress.PHP.DontExtract.extract_extract
extract( $wp_query->query_vars, EXTR_SKIP );
}
if ( isset( $s ) ) {
$s = esc_attr( $s );
}
if ( $require_once ) {
require_once $_template_file;
} else {
require $_template_file;
}
}
Arguments
"/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/themes/ctasc-2017/archive-expert_answers.php"
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-includes/template.php
function locate_template( $template_names, $load = false, $require_once = true, $args = array() ) {
$located = '';
foreach ( (array) $template_names as $template_name ) {
if ( ! $template_name ) {
continue;
}
if ( file_exists( STYLESHEETPATH . '/' . $template_name ) ) {
$located = STYLESHEETPATH . '/' . $template_name;
break;
} elseif ( file_exists( TEMPLATEPATH . '/' . $template_name ) ) {
$located = TEMPLATEPATH . '/' . $template_name;
break;
} elseif ( file_exists( ABSPATH . WPINC . '/theme-compat/' . $template_name ) ) {
$located = ABSPATH . WPINC . '/theme-compat/' . $template_name;
break;
}
}
if ( $load && '' !== $located ) {
load_template( $located, $require_once, $args );
}
return $located;
}
/**
* Require the template file with WordPress environment.
*
* The globals are set up for the template file to ensure that the WordPress
* environment is available from within the function. The query variables are
* also available.
*
* @since 1.5.0
* @since 5.5.0 The `$args` parameter was added.
*
* @global array $posts
* @global WP_Post $post Global post object.
* @global bool $wp_did_header
* @global WP_Query $wp_query WordPress Query object.
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/themes/ctasc-2017/category.php
<?php
// Child of problem types goes to expert answers
// $cat_ID = get_query_var('cat');
// $categories = get_the_category();
// print_r($_SERVER['REQUEST_URI']);
// $categ = get_category_by_path($_SERVER['REQUEST_URI'], true, ARRAY_A);
global $wp_the_query;
$cat_ID = $wp_the_query->query_vars['cat'];
if (cat_is_ancestor_of(72, $cat_ID ) or is_category(72)) {
locate_template( 'archive-expert_answers.php', true, true );
// Child of resources goes to directory listings
} else if ( cat_is_ancestor_of( 73, $cat_ID ) || is_category( 73 ) ) {
locate_template( 'archive-directory_listings.php', true, true );
// Child of resources goes to directory listings
} else if ( cat_is_ancestor_of( 117, $cat_ID ) || is_category( 117 ) ) {
locate_template( 'archive-case_studies.php', true, true );
} else {
locate_template( 'archive-posts.php', true, true);
// locate_template( 'index.php', true, true );
} // Endif from non-selector above
// wp_die('TEST template: ' . $template . '.');
?>
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/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/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/themes/ctasc-2017/category.php"
/home/743387.cloudwaysapps.com/savqkkqzqr/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/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-includes/template-loader.php"
/home/743387.cloudwaysapps.com/savqkkqzqr/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/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-blog-header.php"