/home/sc2xegu4502/public_html/web/app/themes/ariane_theme/views/jobs/alert.twig
{% extends "base.twig" %}
{% block main %}
{# <div class="m_page__content">
{{ post.content }}
</div> #}
<div class="job_alerts">
{{ fn.do_shortcode('[job_alerts]') }}
</div>
{% endblock %}
/home/sc2xegu4502/public_html/web/app/plugins/wp-job-manager/includes/ui/class-ui-elements.php
if ( empty( $args ) ) {
return '';
}
$args = wp_parse_args(
$args,
[
'label' => '',
'url' => '',
'onclick' => '',
'class' => '',
]
);
if ( empty( $args['url'] ) ) {
$args['url'] = '#';
}
$attrs = [
'class' => implode( ' ', [ $class, $args['class'] ] ),
'href' => esc_url( $args['url'] ),
];
if ( ! empty( $args['onclick'] ) ) {
$attrs['onclick'] = $args['onclick'];
$attrs['role'] = 'button';
}
return '<a ' . self::html_attrs( $attrs ) . '><span>' . esc_html( $args['label'] ) . '</span></a>';
}
/**
* Generate HTML for a row of actions. Can contain button and/or link actions.
*
* Unless set otherwise, the first button will be styled as primary, and the rest as outline.
* Links will match button dimensions if buttons are also present.
*
* @param array $buttons Button definitions.
* @param array $links Link definitions.
*
/home/sc2xegu4502/public_html/web/app/plugins/wp-job-manager/includes/ui/class-ui-elements.php
if ( empty( $args ) ) {
return '';
}
$args = wp_parse_args(
$args,
[
'label' => '',
'url' => '',
'onclick' => '',
'class' => '',
]
);
if ( empty( $args['url'] ) ) {
$args['url'] = '#';
}
$attrs = [
'class' => implode( ' ', [ $class, $args['class'] ] ),
'href' => esc_url( $args['url'] ),
];
if ( ! empty( $args['onclick'] ) ) {
$attrs['onclick'] = $args['onclick'];
$attrs['role'] = 'button';
}
return '<a ' . self::html_attrs( $attrs ) . '><span>' . esc_html( $args['label'] ) . '</span></a>';
}
/**
* Generate HTML for a row of actions. Can contain button and/or link actions.
*
* Unless set otherwise, the first button will be styled as primary, and the rest as outline.
* Links will match button dimensions if buttons are also present.
*
* @param array $buttons Button definitions.
* @param array $links Link definitions.
*
/home/sc2xegu4502/public_html/web/app/plugins/wp-job-manager/includes/ui/class-ui-elements.php
/**
* Generate HTML for a row of actions. Can contain button and/or link actions.
*
* Unless set otherwise, the first button will be styled as primary, and the rest as outline.
* Links will match button dimensions if buttons are also present.
*
* @param array $buttons Button definitions.
* @param array $links Link definitions.
*
* @return string Actions HTML.
*/
public static function actions( array $buttons = [], array $links = [] ) {
$actions_html = [];
if ( ! empty( $buttons ) ) {
foreach ( $buttons as $index => $button ) {
$primary = $button['primary'] ?? ( 0 === $index );
$class = $primary ? 'jm-ui-button' : 'jm-ui-button--outline';
$actions_html[] = self::button( $button, $class );
}
}
if ( ! empty( $links ) ) {
foreach ( $links as $link ) {
$class = $buttons ? 'jm-ui-button--link' : 'jm-ui-link';
$actions_html[] = self::button( $link, $class );
}
}
if ( empty( $actions_html ) ) {
return '';
}
return '<div class="jm-ui-actions-row">' . implode( '', $actions_html ) . '</div>';
}
/**
* Generate an actions button with a dropdown menu.
/home/sc2xegu4502/public_html/web/app/plugins/wp-job-manager/includes/ui/class-notice.php
*/
public static function render( $options ) {
UI::ensure_styles();
$options = wp_parse_args(
$options,
[
'id' => '',
'title' => '',
'icon' => '',
'message' => '',
'html' => '',
'buttons' => [],
'links' => [],
'classes' => [],
]
);
$actions = UI_Elements::actions( $options['buttons'], $options['links'] );
$icon = UI_Elements::icon( $options['icon'] );
ob_start();
$template_options = [
'options' => $options,
'title' => $options['title'],
'classes' => $options['classes'] ?? [],
'message' => $options['message'],
'content_html' => $options['html'],
'icon_html' => $icon,
'actions_html' => $actions,
];
get_job_manager_template(
'notice.php',
$template_options
);
/home/sc2xegu4502/public_html/web/app/plugins/wp-job-manager/includes/ui/class-notice.php
return self::render(
array_merge(
$args,
[
'classes' => array_merge( [ 'type-hint' ], $args['classes'] ?? [] ),
],
)
);
}
/**
* A permanent message that requires action to proceed.
*
* @param string|array $args
*/
public static function dialog( $args ) {
$args = is_array( $args ) ? $args : [ 'message' => $args ];
return self::render(
array_merge(
$args,
[
'classes' => array_merge( [ 'type-dialog' ], $args['classes'] ?? [] ),
]
)
);
}
/**
* Notice element.
*
* @param array $options {
* Options for the notice.
*
* @type string $id Unique ID of the notice.
* @type string $title Optional title.
* @type string $icon Notice icon. Should be a supported icon name, or safe SVG code.
* @type string $message Main notice message.
* @type string $html Raw HTML content. User input must be escaped by the caller function.
/home/sc2xegu4502/public_html/web/app/plugins/wp-job-manager-alerts/templates/my-alerts-login.php
use WP_Job_Manager\Guest_Session;
use WP_Job_Manager\UI\Notice;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( Guest_Session::current_guest_has_account() ) {
echo Notice::hint( [
'message' => __( 'Sign in to manage your alerts.', 'wp-job-manager-alerts' ),
'buttons' => [
[
'url' => apply_filters( 'job_manager_alerts_login_url', wp_login_url( get_permalink() ) ),
'label' => __( 'Sign in', 'wp-job-manager-alerts' ),
'class' => [],
],
],
] );
} else {
echo Notice::dialog( [
'message' => __( 'Sign in or create an account to manage your alerts.', 'wp-job-manager-alerts' ),
'buttons' => [
[
'url' => apply_filters( 'job_manager_alerts_login_url', wp_login_url( get_permalink() ) ),
'label' => __( 'Sign in', 'wp-job-manager-alerts' ),
'class' => [],
],
[
'url' => apply_filters( 'job_manager_alerts_register_url', wp_registration_url() ),
'label' => __( 'Create Account', 'wp-job-manager-alerts' ),
'class' => [],
],
],
] );
}
?>
/home/sc2xegu4502/public_html/web/app/plugins/wp-job-manager/wp-job-manager-template.php
* @category Core
* @package wp-job-manager
* @version 1.25.3
*/
/**
* Gets and includes template files.
*
* @since 1.0.0
* @param mixed $template_name
* @param array $args (default: array()).
* @param string $template_path (default: '').
* @param string $default_path (default: '').
*/
function get_job_manager_template( $template_name, $args = [], $template_path = 'job_manager', $default_path = '' ) {
if ( $args && is_array( $args ) ) {
// phpcs:ignore WordPress.PHP.DontExtract.extract_extract -- Please, forgive us.
extract( $args );
}
include locate_job_manager_template( $template_name, $template_path, $default_path );
}
/**
* Locates a template and return the path for inclusion.
*
* This is the load order:
*
* yourtheme / $template_path / $template_name
* yourtheme / $template_name
* $default_path / $template_name
*
* @since 1.0.0
* @param string $template_name
* @param string $template_path (default: 'job_manager').
* @param string|bool $default_path (default: '') False to not load a default.
* @return string
*/
function locate_job_manager_template( $template_name, $template_path = 'job_manager', $default_path = '' ) {
// Look within passed path within the theme - this is priority.
$template = locate_template(
/home/sc2xegu4502/public_html/web/app/plugins/wp-job-manager-alerts/includes/class-shortcodes.php
}
/**
* Shortcode for the alerts page
*/
public function job_alerts() {
$alert_message = $this->get_alert_message();
ob_start();
if ( ! empty( $alert_message ) ) {
//phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
echo $alert_message;
}
if ( ! WP_Job_Manager_Alerts::instance()->can_user_add_alert() ) {
get_job_manager_template( 'my-alerts-login.php', [], 'wp-job-manager-alerts', JOB_MANAGER_ALERTS_PLUGIN_DIR . '/templates/' );
return ob_get_clean();
}
wp_enqueue_script( 'job-alerts' );
// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Input is used safely.
$alert_id = isset( $_REQUEST['alert_id'] ) ? absint( $_REQUEST['alert_id'] ) : '';
switch ( $this->action ) {
case 'add_alert':
$this->add_alert();
break;
case 'edit':
$this->edit_alert( $alert_id );
break;
case 'view':
$this->view_results( $alert_id );
break;
case 'unsubscribe':
/home/sc2xegu4502/public_html/web/wp/wp-includes/shortcodes.php
*
* Returning a non-false value from filter will short-circuit the
* shortcode generation process, returning that value instead.
*
* @since 4.7.0
* @since 6.5.0 The `$attr` parameter is always an array.
*
* @param false|string $output Short-circuit return value. Either false or the value to replace the shortcode with.
* @param string $tag Shortcode name.
* @param array $attr Shortcode attributes array, can be empty if the original arguments string cannot be parsed.
* @param array $m Regular expression match array.
*/
$return = apply_filters( 'pre_do_shortcode_tag', false, $tag, $attr, $m );
if ( false !== $return ) {
return $return;
}
$content = isset( $m[5] ) ? $m[5] : null;
$output = $m[1] . call_user_func( $shortcode_tags[ $tag ], $attr, $content, $tag ) . $m[6];
/**
* Filters the output created by a shortcode callback.
*
* @since 4.7.0
* @since 6.5.0 The `$attr` parameter is always an array.
*
* @param string $output Shortcode output.
* @param string $tag Shortcode name.
* @param array $attr Shortcode attributes array, can be empty if the original arguments string cannot be parsed.
* @param array $m Regular expression match array.
*/
return apply_filters( 'do_shortcode_tag', $output, $tag, $attr, $m );
}
/**
* Searches only inside HTML elements for shortcodes and process them.
*
* Any [ or ] characters remaining inside elements will be HTML encoded
* to prevent interference with shortcodes that are outside the elements.
/home/sc2xegu4502/public_html/web/wp/wp-includes/shortcodes.php
// Find all registered tag names in $content.
preg_match_all( '@\[([^<>&/\[\]\x00-\x20=]++)@', $content, $matches );
$tagnames = array_intersect( array_keys( $shortcode_tags ), $matches[1] );
if ( empty( $tagnames ) ) {
return $content;
}
// Ensure this context is only added once if shortcodes are nested.
$has_filter = has_filter( 'wp_get_attachment_image_context', '_filter_do_shortcode_context' );
$filter_added = false;
if ( ! $has_filter ) {
$filter_added = add_filter( 'wp_get_attachment_image_context', '_filter_do_shortcode_context' );
}
$content = do_shortcodes_in_html_tags( $content, $ignore_html, $tagnames );
$pattern = get_shortcode_regex( $tagnames );
$content = preg_replace_callback( "/$pattern/", 'do_shortcode_tag', $content );
// Always restore square braces so we don't break things like <!--[if IE ]>.
$content = unescape_invalid_shortcodes( $content );
// Only remove the filter if it was added in this scope.
if ( $filter_added ) {
remove_filter( 'wp_get_attachment_image_context', '_filter_do_shortcode_context' );
}
return $content;
}
/**
* Filter the `wp_get_attachment_image_context` hook during shortcode rendering.
*
* When wp_get_attachment_image() is called during shortcode rendering, we need to make clear
* that the context is a shortcode and not part of the theme's template rendering logic.
*
* @since 6.3.0
* @access private
/home/sc2xegu4502/public_html/web/app/mu-plugins/ariane/inc/function.php
<?php
namespace Minos\Extensions;
class _fn {
public function __call($name, array $arguments)
{
return call_user_func_array($name, $arguments);
}
}
add_post_type_support( 'page', 'excerpt' );
/home/sc2xegu4502/public_html/web/app/mu-plugins/ariane/inc/function.php
<?php
namespace Minos\Extensions;
class _fn {
public function __call($name, array $arguments)
{
return call_user_func_array($name, $arguments);
}
}
add_post_type_support( 'page', 'excerpt' );
/home/sc2xegu4502/public_html/web/app/mu-plugins/ariane/vendor/twig/twig/src/Extension/CoreExtension.php
if ($ignoreStrictCheck || !$env->isStrictVariables()) {
return;
}
throw new RuntimeError(sprintf('Neither the property "%1$s" nor one of the methods "%1$s()", "get%1$s()"/"is%1$s()"/"has%1$s()" or "__call()" exist and have public access in class "%2$s".', $item, $class), $lineno, $source);
}
if ($isDefinedTest) {
return true;
}
if ($sandboxed) {
$env->getExtension(SandboxExtension::class)->checkMethodAllowed($object, $method, $lineno, $source);
}
// Some objects throw exceptions when they have __call, and the method we try
// to call is not supported. If ignoreStrictCheck is true, we should return null.
try {
$ret = $object->$method(...$arguments);
} catch (\BadMethodCallException $e) {
if ($call && ($ignoreStrictCheck || !$env->isStrictVariables())) {
return;
}
throw $e;
}
return $ret;
}
/**
* Returns the values from a single column in the input array.
*
* <pre>
* {% set items = [{ 'fruit' : 'apple'}, {'fruit' : 'orange' }] %}
*
* {% set fruits = items|column('fruit') %}
*
* {# fruits now contains ['apple', 'orange'] #}
* </pre>
/home/sc2xegu4502/public_html/web/app/mu-plugins/ariane/vendor/twig/twig/src/Environment.php
$key = $this->cache->generateKey($name, $mainCls);
if (!$this->isAutoReload() || $this->isTemplateFresh($name, $this->cache->getTimestamp($key))) {
$this->cache->load($key);
}
$source = null;
if (!class_exists($cls, false)) {
$source = $this->getLoader()->getSourceContext($name);
$content = $this->compileSource($source);
$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);
}
}
}
// to be removed in 3.0
$this->extensionSet->initRuntime($this);
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.
*
* @param string $template The template source
/home/sc2xegu4502/public_html/web/app/mu-plugins/ariane/vendor/twig/twig/src/Template.php
{
if ($useBlocks && isset($blocks[$name])) {
$template = $blocks[$name][0];
$block = $blocks[$name][1];
} elseif (isset($this->blocks[$name])) {
$template = $this->blocks[$name][0];
$block = $this->blocks[$name][1];
} else {
$template = null;
$block = null;
}
// avoid RCEs when sandbox is enabled
if (null !== $template && !$template instanceof self) {
throw new \LogicException('A block must be a method on a \Twig\Template instance.');
}
if (null !== $template) {
try {
$template->$block($context, $blocks);
} catch (Error $e) {
if (!$e->getSourceContext()) {
$e->setSourceContext($template->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, $template->getSourceContext(), $e);
$e->guess();
throw $e;
}
} elseif (false !== $parent = $this->getParent($context)) {
$parent->displayBlock($name, $context, array_merge($this->blocks, $blocks), false, $templateContext ?? $this);
/home/sc2xegu4502/public_html/web/app/mu-plugins/ariane/vendor/twig/twig/src/Environment.php
$key = $this->cache->generateKey($name, $mainCls);
if (!$this->isAutoReload() || $this->isTemplateFresh($name, $this->cache->getTimestamp($key))) {
$this->cache->load($key);
}
$source = null;
if (!class_exists($cls, false)) {
$source = $this->getLoader()->getSourceContext($name);
$content = $this->compileSource($source);
$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);
}
}
}
// to be removed in 3.0
$this->extensionSet->initRuntime($this);
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.
*
* @param string $template The template source
/home/sc2xegu4502/public_html/web/app/mu-plugins/ariane/vendor/twig/twig/src/Template.php
} else {
ob_start(function () { return ''; });
}
try {
$this->display($context);
} 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/sc2xegu4502/public_html/web/app/mu-plugins/ariane/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 (\Throwable $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
}
/home/sc2xegu4502/public_html/web/app/mu-plugins/ariane/vendor/twig/twig/src/Environment.php
$key = $this->cache->generateKey($name, $mainCls);
if (!$this->isAutoReload() || $this->isTemplateFresh($name, $this->cache->getTimestamp($key))) {
$this->cache->load($key);
}
$source = null;
if (!class_exists($cls, false)) {
$source = $this->getLoader()->getSourceContext($name);
$content = $this->compileSource($source);
$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);
}
}
}
// to be removed in 3.0
$this->extensionSet->initRuntime($this);
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.
*
* @param string $template The template source
/home/sc2xegu4502/public_html/web/app/mu-plugins/ariane/vendor/twig/twig/src/Template.php
} else {
ob_start(function () { return ''; });
}
try {
$this->display($context);
} 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/sc2xegu4502/public_html/web/app/mu-plugins/ariane/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 (\Throwable $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
}
/home/sc2xegu4502/public_html/web/app/mu-plugins/ariane/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 (\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());
}
/home/sc2xegu4502/public_html/web/app/mu-plugins/ariane/vendor/twig/twig/src/TemplateWrapper.php
* directly (use Twig\Environment::load() instead).
*
* @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
*/
public function render(array $context = []): string
{
// 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_get_args()[1] ?? []);
}
/**
* Displays the template.
*
* @param array $context An array of parameters to pass to the template
*/
public function display(array $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_get_args()[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/sc2xegu4502/public_html/web/app/mu-plugins/ariane/vendor/timber/timber/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/sc2xegu4502/public_html/web/app/mu-plugins/ariane/vendor/timber/timber/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/sc2xegu4502/public_html/web/app/mu-plugins/ariane/vendor/timber/timber/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/sc2xegu4502/public_html/web/app/mu-plugins/ariane/vendor/timber/timber/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/sc2xegu4502/public_html/web/app/themes/ariane_theme/template-jobs-alert.php
<?php
/**
* Template Name: Jobs alert
*
* @package WordPress
*/
$templates = array( 'jobs/alert.twig' );
$context = Timber::context();
$timber_post = new Timber\Post();
$context['post'] = $timber_post;
Timber::render( $templates, $context );
/home/sc2xegu4502/public_html/web/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;
}
/home/sc2xegu4502/public_html/web/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';
}
/home/sc2xegu4502/public_html/web/index.php
<?php
/**
* WordPress View Bootstrapper
*/
define('WP_USE_THEMES', true);
require __DIR__ . '/wp/wp-blog-header.php';